Summary
This plugin collection contains plugins for building all necessary artifacts of an Intershop Commerce Management Server.
Intershop Commerce Management Cartridge Plugins
The abstract Cartridge plugin adds a pom property "cartridge.style" if the Gradle "Maven Publish Plugin" is applied.
Container Cartridge Plugin
This plugin applies the standard Cartridge plugin only and should be used for cartridges, that are only deployed to a container. It add an extra property "cartridge.style" to the Cartridge project. The value of the property is "container". There is no publishing configuration for an external Maven repository.
Groovy
plugins {
id 'com.intershop.icm.cartridge.container' version '{latestRevision}'
}
Kotlin
plugins {
id("com.intershop.icm.cartridge.container") version "{latestRevision}"
}
Product Cartridge Plugin
This plugin applies the "Public Cartridge Plugin" and add an extra property "cartridge.style" to the Cartridge project. The value of the property is "cartridge". This value is also set for the pom property. It should be applied to projects for further development. The following artifacts will be published to a Maven repository: jar, source jar and javadoc jar.
Groovy
plugins {
id 'com.intershop.icm.cartridge.product' version '{latestRevision}'
}
Kotlin
plugins {
id("com.intershop.icm.cartridge.product") version "{latestRevision}"
}
Adapter Cartridge Plugin
This plugin applies the "External Cartridge Plugin" and add an extra property "cartridge.style" to the Cartridge project. The value of the property is "adapter" and is also set to the pom property. This plugin should be applied to special adapter Cartridges like payment or search connectors.
Groovy
plugins {
id 'com.intershop.icm.cartridge.adapter' version '{latestRevision}'
}
Kotlin
plugins {
id("com.intershop.icm.cartridge.adapter") version "{latestRevision}"
}
Development Cartridge Plugin
This plugin applies the "External Cartridge Plugin" and add an extra property "cartridge.style" to the Cartridge project. The value of the property is "development". This plugin should be applied to special development projects. This kind of Cartridges are not available on a production or test container.
Groovy
plugins {
id 'com.intershop.icm.cartridge.development' version '{latestRevision}'
}
Kotlin
plugins {
id("com.intershop.icm.cartridge.development") version "{latestRevision}"
}
Test Cartridge Plugin
This plugin applies the "Cartridge Plugin" and add an extra property "cartridge.style" to the Cartridge project. The value of the property is "test". This plugin should be applied to special test projects. This kind of Cartridges are not available on a production container.
Groovy
plugins {
id 'com.intershop.icm.cartridge.test' version '{latestRevision}'
}
Kotlin
plugins {
id("com.intershop.icm.cartridge.test") version "{latestRevision}"
}
Cartridge Plugin
-
This plugin applies the Gradle "Java Plugin" to the project.
-
It applies two configurations
-
cartridge
and -
cartridgeRuntime
to the project.
-
-
The following tasks are added by the plugin:
-
writeCartridgeDescriptor
-
writeCartridgeClasspath
- depends on the Gradle propertyclasspath.file.enabled
-
copyThirdpartyLibs
-
The tasks "writeCartridgeDescriptor" and "writeCartridgeClasspath" are grouped by the task "writeCartridgeFiles". i It is not necessary to apply this plugin to a project separately, because it was applied by some of the plugins above.
Configurations
Configuration name | Transitive | Extends | Usage |
---|---|---|---|
cartridge |
|
|
for Cartridge dependencies |
cartridgeRuntime |
|
|
for Cartridge runtime dependencies |
Tasks
Task name | Class | Description |
---|---|---|
writeCartridgeDescriptor |
|
Creates a the Cartridge descriptor file |
writeCartridgeClasspath |
|
Creates a the Cartridge classpath file |
copyThirdpartyLibs |
|
Copies all 3rd party libraries to one build directory. File located in the container of the base project are not copied.[2] |
Public Cartrige Plugin
This plugin applies the Gradle "Maven Publish Plugin" to a project and configures the publication of a plugin for further development. It adds the project library, the source and and Java doc jars to the publication and the description and the inception year to the pom. Furthmore the pom property "cartridge.name" is added to the publishing configuration.
It is not necessary to apply this plugin to a project separately, because it was applied by some of the plugins above.
This plugin applies the Gradle "Maven Publish Plugin" to a project.
External Cartridge Plugin
This plugin applies the "Public Cartridge Plugin". It adds the task zipStaticFiles
for publishing. Furthermore the output of the task writeCartridgeDescriptor
is added
to the zipStaticFiles
. The pom property cartridge.type
is set to external
.
This plugin is used for Cartridges, that will be available for projects based on the Intershop Commerce Management server.
These Cartridges will be added to the project configuration for development, test purposes and also for
special feature sets.
Tasks
Task name | Class | Description |
---|---|---|
zipStaticFiles |
|
Creates a zip file with the static Cartridge content. |
Groovy
plugins {
id 'com.intershop.icm.cartridge.test' version '{latestRevision}'
id 'com.intershop.icm.cartridge.external' version '{latestRevision}'
}
Kotlin
plugins {
id("com.intershop.icm.cartridge.test") version "{latestRevision}"
id("com.intershop.icm.cartridge.external") version "{latestRevision}"
}
This will configure a test Cartridge for external usage.
Intershop Commerce Management Base Plugin
This plugin will be applied to a root project of an Intershop Commerce Management project with Cartridge sub projects. It configures all sub projects and the root project self.
The plugin applies the
Gradle "Maven Publish Plugin" to the root
project and it creates the configurations cartridge
and cartridgeRuntime
in the root and all sub projects.
Plugin Configuration
Groovy
plugins {
id 'com.intershop.gradle.icm.base' version '{latestRevision}'
}
intershop {
projectInfo {
productID = 'ICM 7 B2C'
productName = 'Intershop Commerce Management 7 B2C'
copyrightOwner = 'Intershop Communications'
copyrightFrom = '2005'
organization = 'Intershop Communications'
}
mavenPublicationName = 'ishmvn'
}
Kotlin
plugins {
id("com.intershop.gradle.icm.base") version "{latestRevision}"
}
intershop {
projectInfo {
productID.set("ICM 7 B2C")
productName.set("Intershop Commerce Management 7 B2C")
copyrightOwner.set("Intershop Communications")
copyrightFrom.set("2005")
organization.set("Intershop Communications")
}
mavenPublicationName.set("ishmvn")
}
The project information (projectInfo
) is used in the display of the login dialog of the the ICM backoffice.
Extension 'intershop' for Base Plugin
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
|
The property is used for the publishing configuration. |
Methods
Method | Parameter | Description |
---|---|---|
|
|
Configures a development configuration from an action. |
|
|
Configures a development configuration from a closure. |
|
|
Configures a project information from an action. |
|
|
Configures a project information from a closure. |
Object DevelopmentConfiguration
Properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
One of these values in the following order: |
Path of a directory with the Intershop license file. This is required by an ICM server instance. |
|
|
|
The absolute path of the license file. |
|
|
One of these values in the following order: |
Path of a directory with an local environment specific configuration file. This is necessary to overwrite an existing configuration of a server, such as the database settings. |
|
|
|
The absolute path of the configuration file. |
All properties are read only. |
Object ProjectInfo
Properties
Property | Type | Read only | Default value | Description |
---|---|---|---|---|
|
|
x |
|
Provider of the product ID of the project. |
|
|
|
Product ID property. |
|
|
|
x |
|
Provider of the product name of the project. |
|
|
|
Product name property. |
|
|
|
x |
|
Provider of the copyright owner of the project. |
|
|
|
Copyright owner property. |
|
|
|
x |
|
Provider of the 'copyright from' property. |
|
|
|
'Copyright from' property. |
|
|
|
x |
|
Provider of the organization property. |
|
|
|
Organization property. |
Dependency Configurations
Configuration name | Transitive | Extends | Usage |
---|---|---|---|
cartridge |
|
|
for Cartridge dependencies |
cartridgeRuntime |
|
|
for Cartridge runtime dependencies |
Tasks
Task name | Class | Description |
---|---|---|
allDependencies |
|
Displays the dependency tree for a project. An instance of this type is used when you execute the dependencies task from the command-line. |
createServerInfo |
|
Creates a properties file with all project information. This property is used by the server. |
createClusterID |
|
This taks creates an UID with Java functionality in the required format for the server. |
writeCartridgeFiles |
|
This task groups two tasks of a cartridge ( |
createMainPkg |
|
This is preconfigured Tar task. It creates |
createInitPkg |
|
This is preconfigured Tar task. It creates |
createTestPkg |
|
This is preconfigured Tar task. It creates |
createInitTestPkg |
|
This is preonfigured Tar task. It creates |
Intershop Commerce Management Project Plugin
This plugin applies the Intershop Commerce Management Base plugin to the project. It adds also additional tasks and configuration for projects that are based on an Intershop Commerce Management base project like Intershop Commerce Management B2X 7.11. A base project provides a container with an installed server configuration. The configuration of tasks created by the base plugin is extended by this plugin. It adds files configured by the extension of this plugin to the container packages.
Plugin Configuration
Groovy
plugins {
id 'com.intershop.gradle.icm.project' version '{latestRevision}'
}
intershop {
projectInfo {
productID = 'ICM 7 Project'
productName = 'Intershop Commerce Management 7 Project'
copyrightOwner = 'Intershop Communications'
copyrightFrom = '2005'
organization = 'Intershop Communications'
}
mavenPublicationName = 'ishmvn'
projectConfig {
cartridges = [ 'com.intershop.cartridge:cartridge_dev:1.0.0',
'projectCartridge_prod',
'com.intershop.cartridge:cartridge_prod:1.0.0',
'projectCartridge_test']
dbprepareCartridges = [ 'projectCartridge_prod',
'com.intershop.cartridge:cartridge_prod:1.0.0' ]
base {
dependency = "com.intershop.icm:icm-as:1.0.0"
platforms = [ "com.intershop.icm:versions:1.0.0" ]
}
modules {
solr {
dependency = "com.intershop.search:solrcloud:1.0.0"
}
payment {
dependency = "com.intershop.payment:payment:1.0.0"
}
}
serverDirConfig {
base {
config {
dirs {
main {
dir.set(file("config/altbase"))
}
}
}
}
prod { }
test { }
dev { }
}
}
}
Kotlin
plugins {
id("com.intershop.gradle.icm.project") version "{latestRevision}"
}
intershop {
projectInfo {
productID.set("ICM 7 B2C")
productName.set("Intershop Commerce Management 7 B2C")
copyrightOwner.set("Intershop Communications")
copyrightFrom.set("2005")
organization.set("Intershop Communications")
}
mavenPublicationName.set("ishmvn")
projectConfig {
cartridges.set(listOf("com.intershop.cartridge:cartridge_dev:1.0.0",
"projectCartridge_prod",
"com.intershop.cartridge:cartridge_prod:1.0.0",
"projectCartridge_test"))
dbprepareCartridges.set(listOf("projectCartridge_prod",
"com.intershop.cartridge:cartridge_prod:1.0.0"))
base {
dependency.set("com.intershop.icm:icm-as:1.0.0")
platforms("com.intershop.icm:versions:1.0.0")
}
modules {
register("solr") {
dependency.set("com.intershop.search:solrcloud:1.0.0")
}
register("payment") {
dependency.set("com.intershop.payment:payment:1.0.0")
}
}
serverDirConfig {
base {
config {
dirs {
named("main") {
dir.set(file("config/altbase"))
}
}
}
}
prod { }
test { }
dev { }
}
}
}
Extension 'intershop' for Project Plugin
This plugin uses additional methods and objects to configure all necessary tasks. See 'Extension 'intershop' for Project Plugin' for base configuration.
Methods
Method | Parameter | Description |
---|---|---|
|
|
Configures a configuration of a project based on Intershop Commerce Management from an action. |
|
|
Configures a configuration of a project based on Intershop Commerce Management from a closure. |
Object ProjectConfiguration
Properties of ProjectConfiguration
Read only properties
Property | Type | Default value | Description |
---|---|---|---|
|
|
|
Contains the complete configuration of a project container. |
|
|
|
Contains the test configuration only for a special test container of the project. |
|
|
|
Contains the complete configuration of a development server. It contains test as well development configuration. |
Property |
Type |
Default value |
Description |
|
|
|
If this property is true, the configuration release can be used as a new base project. |
|
|
optional |
If the base cartridge list configuration should not taken from the base project, it is necessary to specify a separate configuration. |
|
|
optional |
If the base library filter configuration should not taken from the base project, it is necessary to specify a separate configuration. |
|
|
This configuration is used to extend the base cartridge list for the project. It contains a set of cartridge dependencies and project names. |
|
|
|
This configuration is used to extend the base cartridge list for the project for Database preparation. It contains a set of cartridge dependencies and project names. |
Methods of ProjectConfiguration
Method | Parameter | Description |
---|---|---|
|
|
Add a cartridge to the list of cartridges. This can be a project name or a short module dependency configuration ( |
|
|
Add a cartridge to the list of cartridges for Database preparation. This can be a project name or a short module dependency configuration ( |
|
Action<in CartridgeProject> |
Configures the base project dependencies from an action. |
|
Closure<CartridgeProject> |
Configures the base project dependencies from a closure. |
|
Action<in ProjectServerDirs> |
Configures the usage of project directories for configuration from an action. |
|
Closure<ProjectServerDirs> |
Configures the usage of project directories for configuration from a closure. |
modules
is a NamedDomainObjectContainer
of CartridgeProject
a configuration is possible in a Closure
or in a Action
.
Methods are generated by Gradle automatically. This container contains a list of additional project for integration like search and payment integrations.
Object CartridgeProject
Properties of CartridgeProject
Property | Type | Default value | Description |
---|---|---|---|
|
|
It contains the dependency of the base project. Only a short module dependency configuration ( |
|
|
|
It contains the dependencies of BOM files to configure versions during the setup of external cartridges. Only short module dependency configurations ( |
Methods of CartridgeProject
Method | Parameter | Description |
---|---|---|
|
|
Configures the configuration package of the cartridge project from an action. |
|
|
Configures the configuration package of the cartridge project from a closure. |
Object FilePackage
This configuration prepares a CopySpec for the file packages of a cartridge project object.
Properties of FilePackage
Property | Type | Default value | Description |
---|---|---|---|
|
|
Optional |
This is a set Ant based exclude patterns. |
|
|
Optional |
This is a set Ant based include patterns. |
|
|
|
This is the specified duplication strategy. See also DuplicatesStrategy |
|
|
Optional |
The target path of this package. |
Methods of CartridgeProject
Method | Parameter | Description |
---|---|---|
|
|
Adds an include pattern to the set. |
|
|
Adds a collection of include pattern to the set. |
|
|
Adds an exclude pattern to the set. |
|
|
Adds a collection of exclude pattern to the set. |
Object ProjectServerDirs
This configures directories for environment types. These configurations are all optional.
Methods of ProjectServerDirs
Method | Parameter | Description |
---|---|---|
|
|
This configures basically directories and files of the project from an action. |
|
`Closure<ServerDirSet> |
This configures basically directories and files of the project from a closure. |
|
|
This configures production (container) directories and files of the project from an action. |
|
`Closure<ServerDirSet> |
This configures production (container) directories and files of the project from a closure. |
|
|
This configures test (testcontainer) directories and files of the project from an action. |
|
`Closure<ServerDirSet> |
This configures test (testcontainer) directories and files of the project from a closure. |
|
|
This configures development (server) directories and files of the project from an action. |
|
`Closure<ServerDirSet> |
This configures development (server) directories and files of the project from a closure. |
There is one preconfigured base configuration "main". The path for the configuration is 'configuration/base'. The directory must be available in a project.
Object ServerDirSet
This configuration prepares a CopySpec for the directories of the project.
The ServerDirSet
object contains a container dirs
of single real directories
Properties of ServerDirSet
Property |
Type |
Default value |
Description |
|
|
Required |
Path in the project structure. |
|
|
Optional |
This is a set Ant based exclude patterns. |
|
|
Optional |
This is a set Ant based include patterns. |
|
|
Optional |
The target path of this package. |
Methods of ServerDirSet
Method | Parameter | Description |
---|---|---|
|
|
Adds an include pattern to the set. |
|
|
Adds a collection of include pattern to the set. |
|
|
Adds an exclude pattern to the set. |
|
|
Adds a collection of exclude pattern to the set. |
Object DirConfig
This configuration prepares a CopySpec for the directories of the project.
Property | Type | Default value | Description |
---|---|---|---|
|
|
This is the source directory of the configuration. |
|
|
|
Optional |
This is a set Ant based exclude patterns. |
|
|
Optional |
This is a set Ant based include patterns. |
|
|
Optional |
The target path of this directory configuration. |
Methods of DirConfig
Method | Parameter | Description |
---|---|---|
|
|
Adds an include pattern to the set. |
|
|
Adds a collection of include pattern to the set. |
|
|
Adds an exclude pattern to the set. |
|
|
Adds a collection of exclude pattern to the set. |
Tasks
The Intershop Commerce Management Project Plugin add the following tasks to existing project. It configures the root project and sub projects. The main goal of all tasks is the preparation of a configuration directory of a development server, a container and a test container. Other tasks will prepare all external cartridges for the different server configurations.
Task name | Type | Description |
---|---|---|
|
|
Start all tasks to prepare a complete server file structure for development. |
|
|
Start all tasks to prepare a file structure to create a test container based on the container of the project. |
|
|
Start all tasks to prepare a complete file structure to create a container for the project. |
|
|
Creates the complete configuration file structure for the container creation. |
|
|
Creates the configuration file structure for the test container creation. |
|
|
Creates the complete configuration file structure of a development server. |
|
|
Download the base cartridge list configuration from a dependency. |
|
|
Extend the base cartridge list configuration for the container creation. |
|
|
Extend the base cartridge list configuration for the container creation. |
|
|
Extend the base cartridge list configuration of a development server. |
|
|
Download a file for lib filtering for the container creation from a dependency. |
|
|
Prepares a structure of external cartridges for the container creation. |
|
|
Prepares a structure of external cartridges for the test container creation. |
|
|
Prepares a structure of external cartridges of a development server. |
|
|
Sync libraries from all cartridges to a single libraries directory of a container. |
|
|
Sync libraries from all cartridges to a single libraries directory of a test container. |
|
|
Sync libraries from all cartridges to a single libraries directory of a development server. |
|
|
Creates a zip file of configuration files for publishing. The content depends on the property |
|
|
Prepares the directory for publishing of a configuration package from the extension configuration. |
Build Directory Overview for Further Usage
- build <build directory of the main project>
|
+- server <necessary directories and files of a server>
| |
| +- cartridges <contains all external cartridges, like payment, search etc.>
| | |
| | +- libs <contains all additional 3rd party libs of external cartridges>
| | +- cartridge1
| | +- cartridge2
| | ...
| |
| +- config_folder <target folder for configuration files>
| | |
| | +- system-conf
| | |
| | +- cluster
| | ...
| +- prjlibs <target of all additional 3rd party libs of the project>
| | |
| | +- <group>-<module>-<version>.jar
| | |
| | ...
| |
+- container <necessary directories and files of a container>
| |
| +- cartridges
| +- config_folder
| +- prjlibs
|
+- testcontainer <necessary directories and files of a test container>
|
+- cartridges
+- config_folder
+- prjlibs
License
Copyright 2014-2020 Intershop Communications.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.