Maven 1.x JNLP Plugin

Add support for os version and arch

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

We have a growing number of projects that rely on SWT/JFACE from eclipse that we need to distribute via JNLP. At the moment we hand code the JNLP file because we want to use a single file for multiple platforms/os's.

Would it be possible to add 2 properties to each dependency, such as:

<property key="jnlp.resource.os" value="SunOs" />
<property key="jnlp.resource.arch" value="SPARC" />

The plugin could then generate multiple <resource></resource> blocks for each combination of os/arch.

This would enable this plugin to build a project targeted at multiple platforms, but with a single jnlp file and code base.

If i decided to attempt this, what files should i post (in what format) and where?

Activity

Hide
Darren Bell added a comment -

Oops, properties should be

<jnlp.resource.os>SunOS</jnlp.resource.os>
<jnlp.resource.arch>SPARC</jnlp.resource.arch>

.

Show
Darren Bell added a comment - Oops, properties should be <jnlp.resource.os>SunOS</jnlp.resource.os> <jnlp.resource.arch>SPARC</jnlp.resource.arch> .
Hide
Emmanuel Venisse added a comment -

Can you post a patch?

Show
Emmanuel Venisse added a comment - Can you post a patch?
Hide
Jason Mac added a comment -

I use SWT and jnlp together quite a bit. The Maven JNLP plug-in wasn't very useful to me because it didn't support the 'OS' and 'ARCH' attributes.
http://lopica.sourceforge.net/ref.html#resources

I put together a patch to support these two elements.

I created the two new properties Darren Bell suggested.
jnlp.resource.os
jnlp.resource.arch

So to use this patch with SWT, I setup my project.xml like this:

<dependency>
<groupId>swt</groupId>
<artifactId>swt-win32</artifactId>
<version>3138</version>
<properties>
<jnlp.jar>true</jnlp.jar>
<jnlp.resource.os>Windows</jnlp.resource.os>
<jnlp.resource.arch>x86</jnlp.resource.arch>
</properties>
</dependency>

<dependency>
<groupId>swt</groupId>
<artifactId>swt-linux</artifactId>
<version>3138</version>
<properties>
<jnlp.jar>true</jnlp.jar>
<jnlp.resource.os>Linux</jnlp.resource.os>
<jnlp.resource.arch>i386</jnlp.resource.arch>
</properties>
</dependency>

Jå§òÑ M@¢þhè®$Øñ

Show
Jason Mac added a comment - I use SWT and jnlp together quite a bit. The Maven JNLP plug-in wasn't very useful to me because it didn't support the 'OS' and 'ARCH' attributes. http://lopica.sourceforge.net/ref.html#resources I put together a patch to support these two elements. I created the two new properties Darren Bell suggested. jnlp.resource.os jnlp.resource.arch So to use this patch with SWT, I setup my project.xml like this: <dependency> <groupId>swt</groupId> <artifactId>swt-win32</artifactId> <version>3138</version> <properties> <jnlp.jar>true</jnlp.jar> <jnlp.resource.os>Windows</jnlp.resource.os> <jnlp.resource.arch>x86</jnlp.resource.arch> </properties> </dependency> <dependency> <groupId>swt</groupId> <artifactId>swt-linux</artifactId> <version>3138</version> <properties> <jnlp.jar>true</jnlp.jar> <jnlp.resource.os>Linux</jnlp.resource.os> <jnlp.resource.arch>i386</jnlp.resource.arch> </properties> </dependency> Jå§òÑ M@¢þhè®$Øñ

People

Vote (3)
Watch (2)

Dates

  • Created:
    Updated: