Intershop Commerce Management 7.8 comes with new assembly, build and deployment tools. While 7.8-based projects should exclusively use the Intershop Gradle Tools 2.11, the new version of the tools can also be used alongside with Intershop Commerce Management 7.6 and 7.7.
Gradle Tools 2.11 are based on Gradle 2.11.
To use Gradle Tools 2.11 with Intershop Commerce Management 7.6 or 7.7, perform the following steps to migrate your environment:
createCorporateDistribution
.distributionUrl
in gradle/wrapper/gradle-wrapper.properties.In your gradle.properties files, remove the following properties if they exist:
filter.com.intershop.build.set.cartridge-plugins filter.com.intershop.build.set.extension-plugins version.com.intershop.deployment-bootstrap
and add the following property instead:
filter.com.intershop.build.gradle.gradle-tools = 2.11.4 version.com.intershop.build.gradle.deployment-launcher = 2.11.4
For more information regarding deployment-bootstrap, see section Product-Specific Deployment Components in Platform.
Use the sources of the Responsive Starter Store to configure the project (Recipe: Create Sources From Intershop Templates in Cookbook - Setup CI Infrastructure).
Note
Intershop recommends to change the project structure to reduce the efforts for the development, the build itself and the maintenance of a build.
Copy your assembly in the Gradle project with the store cartridges and adapt your assembly according to the sources of the assembly in the original source package.
Intershop delivers a Responsive Starter Store for an easy project start. There is a project with sources for components - component set 'a_responsive' - and an assembly project 'insprired-b2x' or 'inspired-b2c'. These projects were renamed with the creation of the project. The present document uses the original names for the migration of the projects. 'inspired-b2x' is a synonym for 'inspired-b2x' and 'inspired-b2c'.
Please use the document Cookbook - Setup CI Infrastructure for your changes on the CI process.
For the migration of your project, we use the generated sources of createProject
. The source are located in <sources>/projects/<project name, e.g., corporateshop>.
Copy the content of <sources>/projects/<project name, e.g., corporateshop> to the component set. Existing files must be overwritten.
Update your gradle.properties.
Change
filter.com.intershop.build.set.cartridge-plugins = 2.7.1
to
filter.com.intershop.build.gradle.gradle-tools = 2.11.4 version.com.intershop.deployment-bootstrap = 2.11.4
Update your build.gradle.
Use the template build.gradle and replace the following placeholder:
Placeholder | Content |
---|---|
<project description> | Project description |
<project group> | Group of the project, e.g., com.company.project |
<assembly name> | Name of the assembly project |
<sonar-host> | Host name of the SonarQube server. If no SonarQube is used in the project, it is possible to remove the SonarQube Gradle plugin. Remove SonarQube Gradle plugin apply plugin: 'com.intershop.gradle.sonarQube' sonarqube { sonarProperties { property 'sonar.host.url', 'https://<sonar-host>' } } |
It is also necessary to change the configuration com.intershop.assembly:commerce_management_b2x
to com.intershop.assembly:commerce_management_b2c
, if you use only Intershop Commerce Management B2C.
Update your settings.gradle.
Use the template settings.gradle and replace the following placeholder:
Placeholder | Content |
---|---|
<project name> | project name |
Update Gradle and Gradle build tools for the assembly project.
Copy the assembly project in the component set.
Using Subversion it is possible to use svn cp
.
Remove group and version configuration.
group = '<group>' version = '<version>'
Replace plugin and dependency configuration.
buildscript { repositories { maven { ... } } dependencies { classpath 'com.intershop.build.gradle:ish-assembly' classpath 'com.intershop.build.gradle:plugin-tests' classpath 'com.intershop.build.release:intershop-buildinfo-plugin:2.2.8' } } apply plugin: 'ish-assembly' apply plugin: 'ish-assembly-branding' apply plugin: 'buildinfo'
buildscript { dependencies { classpath 'com.intershop.build.gradle:ish-assembly' classpath 'com.intershop.build.gradle:plugin-tests' classpath 'com.github.groovy-wslite:groovy-wslite:1.+' } } apply plugin: 'ish-assembly' apply plugin: 'ish-assembly-branding' // optional apply plugin: 'project-report' apply plugin: 'jacoco'
assembly
block replace all dependencies contained in your component set with project dependencies, e.g., com.intershop.foo:bar
becomes project(':bar')
.fooCartridges.collect {"com.intershop.foo:$it"}
becomes fooCartridges.collect { project(":$it") }
Test your changes.
Execute gradlew publish
and gradlew deployServer
.
Note
It is necessary to configure your Gradle environment, before you run the commands. Please use the available scripts.
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.