Note
This Gradle Tools version are included in Intershop 7 version 7.5.2. It can also be used along with all Intershop 7 versions 7.4.6.1 - 7.5.x.
This Gradle Tools version is based on Gradle 2.3.
Warning
Verify Your Existing Projects
If you already have an environment for developing CI-based Intershop releases, please check your existing projects' gradle.properties files. If they contain properties like
filter.com.intershop.build.set.cartridge-plugins=2.+ filter.com.intershop.build.set.extension-plugins=2.+ version.com.intershop.deployment-bootstrap=2.+
then mere importing of the new Gradle Tools 2.3 delivery may break your existing builds. Please change those properties to point to a more specific version 2.0.+
or 2.1.+
accordingly.
To use Gradle Tools version 2.3 with Intershop 7 version 7.4.6.1 to 7.5.1, perform the following steps to migrate your environment:
createCorporateConfiguration
and createCorporateDistribution
.distributionUrl
in gradle/wrapper/gradle-wrapper.properties.In your gradle.properties files, change the following properties if existent:
filter.com.intershop.build.set.cartridge-plugins=2.3.+ filter.com.intershop.build.set.extension-plugins=2.3.+ version.com.intershop.deployment-bootstrap=2.3.+
'com.intershop:deployment-bootstrap:2.3.+'
.Intershop Gradle Tools 2.3 are based on Gradle 2.3. The previous version 2.1 was based on Gradle 2.1.
See Gradle's own release notes for changes:
Note
Incubating Feature
This feature is incubating and may change in future versions of Gradle Tools. This allows Intershop to incorporate invaluable feedback until the feature is completed, which will be announced in a future release note.
We introduced a new way for cartridges of dealing with dependencies to third-party libraries using Gradle-based dependency management. This approach can be used with all Intershop 7 CI releases, given that you are using Gradle Tools 2.3 or later.
See Cookbook - Gradle Build Tools (Using Third-party Libraries in a Cartridge) for further documentation on how to use this feature.
Gradle Tools 2.3 introduces the functionality to run integration tests during the assembly build, see Concept - Gradle Assembly Tools for details.
Problem
It was not possible to integrate JaCoCo in the SonarQube Analysis. It was also not possible to send the JUnit result files to SonarQube during the analysis.
Workaround
There was no workaround.
Solution
JUnit and JaCoCo result files are included in the SonarQube analysis, if this kind of files are available.
webserver
and solr
Problem
The database dump is deployed for those host types, that include the local directory. This is not useful for the webserver
or solr
hosts.
Workaround
Add the following snippet to your assembly deployment logic:
deployment { files { databaseDump { if (!(deploymentBootstrap?.hostType?.hostType?.name in ['appserver', 'all'])) exclude { true } } } }
Solution
Starting with Gradle Tools 2.3, the dump file will only be deployed for host types appserver
and all
by default.
When using custom host types, you can explicitly configure deployment of the dump file in the deployment DSL:
database { deployDump = true }
Problem
When executing the post-install script installServices.bat with administrator privileges, the following errors occur:
Could not create service Enfinity_AppServer1, check C:\eserver1\local\bin\isservice.exe Enfinity_AppServer1 \""C:\eserver1\local\bin\nodemanager.bat -win32service -background\install.log
[...]
Could not create service Enfinity_ApacheWebServer1, check C:\eserver1\local\httpd\bin\httpd.exe -k runservice -n Enfinity_ApacheWebServer1 -f C:\eserver1\local\httpd\conf\install.log
Workaround
Create the services manually with the following commands:
sc create Enfinity_AppServer1 binPath= "C:\eserver1\local\bin\isservice.exe Enfinity_AppServer1 \"C:\eserver1\local\bin\nodemanager.bat -win32service -background\"" displayname= "INTERSHOP Application Server (1)" obj= ".\username" password= "password" start= demand
sc create Enfinity_ApacheWebServer1 binPath= "C:\eserver1\local\httpd\bin\httpd.exe -k runservice -n Enfinity_ApacheWebServer1 -f C:\eserver1\local\httpd\conf\httpd.conf" displayname= "INTERSHOP HTTP Server (1)" obj= ".\username" password= "password
" start= auto
Replace the highlighted parts accordingly.
Solution
The problems are fixed in Gradle Tools 2.3.
all
Does Not Inherit includeJavadoc FlagProblem
When deploying the host type all
with environment development
, Javadoc is not deployed.
Workaround
Set the flag to include Javadoc manually in the deployment DSL:
developer { includeJavadoc = true javadocDirectory = new File('[...]') }
Solution
The host type all
will inherit the includeJavadoc flag, so that per default Javadoc is deployed when:
Any other host type defines includeJavadoc
as true
, and
development
.A patch release Gradle Tools 2.3.1 is available, that fixes the following issues:
Libraries defined as libs
dependency are not part of testRuntime
, i.e. the classes are not available while executing unit tests during the cartridge's build process. This may lead to test failures like
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
The newly introduced assembly task checkLibsCollisions
may fail with ConcurrentModificationException
if the defined libraries are not already present in the local Gradle cache.
Problem
The newly introduced assembly task checkLibsCollisions
inspects dependency metadata to find the jar files to analyse. This is problematic when excluding certain jar files from the tools cartridge, because this exclusion can only happen during deployment, which does not influence the current collision check.
Workaround
There are two ways to avoid assembly build failure because of a false positive:
-x checkLibsCollisions
. You should still execute this task periodically to spot conflicts not intended.Tell the task to ignore certain conflicting classes via regex:
[...] checkLibsCollisions { excludes << /^some.*Regex.*/ }