You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2015/12/30 12:27:49 UTC

[jira] [Resolved] (TOMEE-1690) [tomee maven plugin] add jsCustomizers and groovyCustomizers option

     [ https://issues.apache.org/jira/browse/TOMEE-1690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Manni-Bucau resolved TOMEE-1690.
---------------------------------------
    Resolution: Fixed

> [tomee maven plugin] add jsCustomizers and groovyCustomizers option
> -------------------------------------------------------------------
>
>                 Key: TOMEE-1690
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1690
>             Project: TomEE
>          Issue Type: New Feature
>    Affects Versions: 7.0.0-M1
>            Reporter: Romain Manni-Bucau
>            Assignee: Romain Manni-Bucau
>             Fix For: 7.0.0-M2
>
>
> 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:
> {code}
> <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>
> {code}
> 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)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)