Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-1690

[tomee maven plugin] add jsCustomizers and groovyCustomizers option

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 7.0.0-M1
    • 7.0.0-M2
    • None
    • None

    Description

      Allows to customize tomee distribution using javascript.

      the property is jsCustomizers (respectively groovyCustomizers).

      Note: groovy usage needs to add groovy jar as a dependency of the tomee plugin.

      Sample:

      <configuration>
        <jsCustomizers>
          <jsCustomizer>
      <![CDATA[
      var File = Java.type('java.io.File');
      var Files = Java.type('java.nio.file.Files');
      var StandardCopyOption = Java.type('java.nio.file.StandardCopyOption');
      
      var junit = resolver.resolve('junit', 'junit', '4.12');
      Files.copy(junit.toPath(), new File(catalinaBase, 'lib/JsCustomizertest.jar').toPath(), StandardCopyOption.REPLACE_EXISTING);
      ]]>
          </jsCustomizer>
        </jsCustomizers>
      </configuration>
      

      Default available bindings are:

      • catalinaBase: the tomee base/home
      • resolver: a wrapper to use maven to resolve a variable. There are 3 signatures and all returns a File:
        • resolve(groupId, artifactId, version): classifier is null and type is jar
        • resolve(groupId, artifactId, version, type): classifier is null
        • resolve(groupId, artifactId, version, classifier, type)

      Attachments

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            romain.manni-bucau Romain Manni-Bucau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: