Allow multipe templates
-----------------------

                 Key: MWEBSTART-129
                 URL: http://jira.codehaus.org/browse/MWEBSTART-129
             Project: Maven 2.x Webstart Plugin
          Issue Type: New Feature
          Components: jnlps
            Reporter: Dimitar Dimitrov


h1. Problem

I have a scenario, where the same application is deployable as both JNLP applet 
and webstart.

It looks like the Java Plugin in JRE 1.5u10 does not support JNLP files that 
contain both <applet-desc> and <application-desc>, so I ended up with two JNLP 
files which are for the most part the same.

Right now I am using the same template and Velocity "if" statement to switch 
between applet and application modes. Unfortunately, this requires me to run my 
build twice with different profiles.

h1. Request

Allow to specify a list of "variations" in the JNLP plugin configuration. In my 
case, it would look like this:

{code}
<configuration>
    <jnlp>
        <mainClass>${mainClass}</mainClass>
        <variations>
            <variation>applet</applet>                
            <variation>application</applet>                
        </variations>
    </jnlp>
</configuration>
{code}

* Generate a new JNLP file from the template for each variation. 
* The final output name will be $\{outputFile}-$\{variation}.jnlp 
* In the velocity template, you will need to pass the current  $\{variation} 
and the adjusted $\{outputFile}
* If the variations element is not present, the plugin works as of now 
(backwards compatible).


*Alternative approach* is to allow specifying multiple velocity templates. I 
favour the 'variations' variable because the alternative encourages 
proliferation of templates (which probably would be quite similar and have to 
be kept in sync.) Each approach is expressible by the means of the other.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
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