I've hacked up a solution for generating a APPLICATION_TEMPLATE.JNLP or APPLICATION.JNLP. It includes a new JnlpInfMojo (derived from the JnlpSingleMojo) which simply chops out undesirable processing from the AbstractJnlpMojo allowing the execution to occur at the prepare-package stage (i.e. before the jar is built).

A patch is attached and an example usage is below. You do this execution in addition to the (in my case) jnlp-single during package. Your mileage may vary if you use something other than jnlp-single.

The patch also includes a LegacyDependencyFilenameStrategy because the ordering of the classifier has changed recently and I wasn't ready to deal with that now.

<execution>
	<!-- Step 1 of 2: Prepare APPLICATION_TEMPLATE.JNLP -->
	<id>generate-jnlp-template-for-signing</id>
	<phase>prepare-package</phase>
	<goals>
		<goal>jnlp-inf</goal>
	</goals>
	<configuration>
		<jnlp>
			<inputTemplate>application_template.vm</inputTemplate>
			<outputFile>../classes/JNLP-INF/APPLICATION_TEMPLATE.JNLP</outputFile>
			<mainClass>com.something.Application</mainClass>
		</jnlp>
		<filenameMapping>legacy</filenameMapping>
		<makeArchive>false</makeArchive>
		<!-- Have to include this setting here to ensure it appears in the APPLICATION_TEMPLATE.JNLP -->
		<pack200>
			<enabled>true</enabled>
		</pack200>
	</configuration>
</execution>

So hopefully this demonstrates that a proper solution might not be too hard. This is definitely a HACK for my own needs, but I present here in case it's any use to anyone.

Change By: James Olsen (14/Jan/14 10:42 AM)
Attachment: webstart-maven-plugin.patch
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