Skip to content

This plugin compiles ISML files of Intershop to Java class files

License

Notifications You must be signed in to change notification settings

ARogovskyy/isml-gradle-plugin

 
 

Repository files navigation

ISML Gradle Plugins

Note
Version 2 of this plugin will only work with Gradle 5 and JDK 8.

Summary

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.

Usage

To apply the ISML Gradle Plugins to your projects, add the following in your build script:

build.gradle
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.

Tasks

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 isml code generation task of a project. This task depends on all isml2class tasks.

isml2class<source set name>

com.intershop.gradle.isml.tasks.IsmlCompile

This task compiles ISML files to class files.

Project Extension 'isml'

This plugin adds an extension isml to the project.

Properties

Property

Type

Default value

Description

jspCompilerVersion

String

'7.0.42'

The version of JSP compiler.

eclipseCompilerVersion

String

'4.2.2'

The version of Eclipse Java compiler. This version depends on the JSP compiler. Please check the used Tomcat version.

encoding

String

'UTF-8'

Template encoding. This is also used for JSP and Java compilation.

sourceSetName

String

'main'

Name of the Java source set, which can be used for ISML compilation.

ismlConfigurationName

String

'runtime'

Name of the configuration, which is used for the classpath of ISML compilation.

sourceCompatibility

String

'1.6'

This Java source compatibility is used for the compilation of java files.

targetCompatibility

String

'1.6'

This Java target compatibility is used for the compilation of java files.

taglibFolder

File

null

Folder with WEB-INF and TagLib configuration files.

Methods

Method Values Description

sourceSets

IsmlSourceSet

This contains all folders with ISML templates.

Object 'sourceSet' (IsmlSourceSet)

Properties

Property

Type

Default value

Description

name

String

'main'

The name of the ISML source set

srcDir

File

'<project dir>/staticfiles/cartridge/templates'

The input directory of the task.

outputDir

File

'<project builddir>/generated/isml/main'

The output directory of the compiler task.

jspPackage

String

'ish.cartridges.<project name>

The package name of the compiled JSP files.

taskName

String

'isml2classMain'

The task name.

Example Configurations

Simple configuration

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>"
    ...
}

Configuration with additional Java VM settings for process runner

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>"
    ...
}

License

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.

About

This plugin compiles ISML files of Intershop to Java class files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 70.9%
  • Groovy 26.3%
  • Java 1.1%
  • Shell 1.1%
  • Smarty 0.6%