Issue Type: Improvement Improvement
Affects Versions: 1.0-beta-3
Assignee: Unassigned
Components: jnlps
Created: 17/Aug/12 4:04 AM
Description:

We generate a bunch of JNLP files for different environments, and these files are essentially based on the same template with slight variations in jnlp/resources/property values. In the velocity template I can potentially refer to ${project.properties.xxx}, but unfortunately I cannot pass custom properties per JNLP file. In the end I had to clone the template and hardcode all property variations, and use a customised template for each resulting JNLP file.

The proposal is to add an extra property to <jnlp> element in the plugin configuration:

<configuration>
    <jnlp>
        <inputTemplateResourcePath>${project.basedir}/src/main/jnlp</inputTemplateResourcePath>
        <inputTemplate>launch.jnlp.vm</inputTemplate>
        <outputFile>launch_prod_ldn.jnlp</outputFile>
        <mainClass>com.app.MainClass</mainClass>
        <properties>
            <environment>prod</environment>
            <location>ldn</location>
        <properties>
    </jnlp>
    <jnlp>
        <inputTemplateResourcePath>${project.basedir}/src/main/jnlp</inputTemplateResourcePath>
        <inputTemplate>launch.jnlp.vm</inputTemplate>
        <outputFile>launch_test_hkg.jnlp</outputFile>
        <mainClass>com.app.MainClass</mainClass>
        <properties>
            <environment>test</environment>
            <location>hkg</location>
        <properties>
    </jnlp>
    ...

Then in the launch.jnlp.vm I would be able to parameterise the properties:

<jnlp
        spec="$jnlpspec"
        codebase="" class="code-quote">"$jnlpCodebase"
        href="" class="code-quote">"$outputFile">
    ...
    <resources>
        ...
        <property name="environment" value="$environment"/>
        <property name="location" value="$location"/>
        ...
Project: Maven 2.x Webstart Plugin
Priority: Minor Minor
Reporter: Sergei Ivanov
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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

Reply via email to