[
https://jira.codehaus.org/browse/MWEBSTART-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284428#comment-284428
]
Octavian Ciubotaru commented on MWEBSTART-188:
----------------------------------------------
I ended up filtering the dependencies in Velocity template. Quite ugly but
solves the problem:
{code}
<resources>
<j2se version="1.6+" initial-heap-size="32m" max-heap-size="512m" />
<property name="jnlp.versionEnabled" value="true"/>
<property name="jnlp.packEnabled" value="true"/>
#foreach( $dependency in $dependencies.split("\n") )
#set($dependency = $dependency.trim())
#if ( $dependency.indexOf("win32-x86") == -1 &&
$dependency.indexOf("gtk-linux-x86") == -1 )
$dependency
#end
#end
</resources>
<resources os="Windows">
#foreach( $dependency in $dependencies.split("\n") )
#set($dependency = $dependency.trim())
#if ( $dependency.indexOf("win32-x86") >= 0 )
$dependency.replace("<jar", "<nativelib")
#end
#end
</resources>
<resources os="Linux">
#foreach( $dependency in $dependencies.split("\n") )
#set($dependency = $dependency.trim())
#if ( $dependency.indexOf("gtk-linux-x86") >= 0 )
$dependency.replace("<jar", "<nativelib")
#end
#end
</resources>
{code}
> Filter just for $dependencies variable
> --------------------------------------
>
> Key: MWEBSTART-188
> URL: https://jira.codehaus.org/browse/MWEBSTART-188
> Project: Maven 2.x Webstart Plugin
> Issue Type: Improvement
> Components: build, jnlps
> Affects Versions: 1.0-beta-2
> Reporter: Octavian Ciubotaru
>
> I have to make a distribution that contains SWT jars (win & linux). One way
> would be to include in template explicitly with according 'os' attribute:
> {code:title=template.vm}
> <resources>
> <j2se version="1.6+" initial-heap-size="32m" max-heap-size="128m" />
> <property name="jnlp.versionEnabled" value="true"/>
> <property name="jnlp.packEnabled" value="true"/>
> $dependencies
> </resources>
> <resources os="Windows">
> <jar href="win32-x86-3.6.1.jar"/>
> </resources>
> <resources os="Linux">
> <jar href="gtk-linux-x86-3.6.1.jar"/>
> </resources>
> {code}
> But now I have to filter out both dependencies so that these won't appear in
> dependencies list when $dependencies will be replaced.
> If I use exclusion for dependencies these will be excluded from list but also
> from the zip archive.
> {code:title=pom.xml}
> <dependencies>
> <excludes>
> <exclude>org.eclipse.swt:gtk-linux-x86</exclude>
> <exclude>org.eclipse.swt:win32-x86</exclude>
> </excludes>
> </dependencies>
> {code}
> It would be nice to have a filter just for $dependencies variable.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email