Note
|
Version 2 of this plugin will only work with Gradle 5 and JDK 8. |
This package provides two plugins - one plugin for the ISML tag lib support and one for the compilation of ISML files. These plugins compile ISML files of Intershop to Java class files. It generates also JSP and Java files from ISML files. All files of the output have the same time stamp.
To apply the ISML Gradle Plugins to your projects, add the following in your build script:
plugins {
// only necessary to use additonal TagLibs
id 'com.intershop.gradle.ismltaglib' version '2.0.0'
// necessary for the compilation of ISML files
id 'com.intershop.gradle.isml' version '2.0.0'
}
The compiler plugin will create a default configuration for ISML templates of an Intershop project. The plugin uses the project dependencies for the ISML task and the compilation of the files.
The ISML Gradle plugin adds one task isml
to the project. This task depends on all ISML plugin tasks 'isml2class*'.
Task name |
Type |
Description |
prepareTagLibs |
com.intershop.gradle.isml.tasks.PrepareTagLibs |
This task prepares the environment for ISML compilation with TagLibs. The output of this task is directly used by the isml2class* tasks. |
isml |
Task |
Overall |
isml2class<source set name> |
com.intershop.gradle.isml.tasks.IsmlCompile |
This task compiles ISML files to class files. |
This plugin adds an extension isml
to the project.
Property |
Type |
Default value |
Description |
jspCompilerVersion |
|
'7.0.42' |
The version of JSP compiler. |
eclipseCompilerVersion |
|
'4.2.2' |
The version of Eclipse Java compiler. This version depends on the JSP compiler. Please check the used Tomcat version. |
encoding |
|
'UTF-8' |
Template encoding. This is also used for JSP and Java compilation. |
sourceSetName |
|
'main' |
Name of the Java source set, which can be used for ISML compilation. |
ismlConfigurationName |
|
'runtime' |
Name of the configuration, which is used for the classpath of ISML compilation. |
sourceCompatibility |
|
'1.6' |
This Java source compatibility is used for the compilation of java files. |
targetCompatibility |
|
'1.6' |
This Java target compatibility is used for the compilation of java files. |
taglibFolder |
|
null |
Folder with WEB-INF and TagLib configuration files. |
Method | Values | Description |
---|---|---|
sourceSets |
This contains all folders with ISML templates. |
Property |
Type |
Default value |
Description |
name |
|
'main' |
The name of the ISML source set |
srcDir |
|
'<project dir>/staticfiles/cartridge/templates' |
The input directory of the task. |
outputDir |
|
'<project builddir>/generated/isml/main' |
The output directory of the compiler task. |
jspPackage |
|
'ish.cartridges.<project name> |
The package name of the compiled JSP files. |
taskName |
|
'isml2classMain' |
The task name. |
plugins {
id 'com.intershop.gradle.ismltaglib' version '2.0.0'
id 'com.intershop.gradle.isml' version '2.0.0'
}
configurations {
compile
runtime.extendsFrom(compile)
}
dependencies {
compile "com.intershop.platform:core:<ICM platform version>"
compile "com.intershop.platform:isml:<ICM platform version>"
...
}
plugins {
id 'com.intershop.gradle.ismltaglib' version '2.0.0'
id 'com.intershop.gradle.isml' version '2.0.0'
}
configurations {
compile
runtime.extendsFrom(compile)
}
tasks.withType(com.intershop.gradle.isml.tasks.IsmlCompile) {
forkOptions { JavaForkOptions options ->
options.setMaxHeapSize('64m')
options.jvmArgs += ['-Dhttp.proxyHost=10.0.0.100', '-Dhttp.proxyPort=8800']
}
}
dependencies {
compile "com.intershop.platform:core:<ICM platform version>"
compile "com.intershop.platform:isml:<ICM platform version>"
...
}
Copyright 2014-2018 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.