[ANN] JavaFX Maven Plugin and WebStart final version

178 views
Skip to first unread message

Frederic Simon

unread,
Oct 20, 2009, 2:34:12 PM10/20/09
to The Java Posse
I did not manage to convince the NetBeans team that merging Maven and
JavaFX will be a good idea, but anyway we (JFrog) just released
version 1.1 (for JavaFX 1.2.1) of our plugin.
I personally enjoy the fact that Hudson directly deploy my WebStart
application with the defined dependencies without creating the uber
signed jar, like we used to.
The documentation is here:
http://wiki.jfrog.org/confluence/display/JP/JavaFX+Maven+Plugin

And we did also a screencast:
http://wiki.jfrog.org/confluence/display/RTF/WebStart+and+Jar+Signing

Enjoy!

Carl

unread,
Oct 31, 2009, 9:24:38 PM10/31/09
to The Java Posse
I am trying to get to the repository (or download the binary) for the
maven plugin but it's not working for me. Is your site down at the
moment?

Carl

unread,
Oct 31, 2009, 10:00:04 PM10/31/09
to The Java Posse
Never mind...I finally did get a maintenance message.

Brian

unread,
Oct 31, 2009, 10:13:09 PM10/31/09
to The Java Posse
What are the advantages of using your webstart plugin over the
"standard" maven webstart plugin:
http://mojo.codehaus.org/webstart/webstart-maven-plugin/

As far as I can tell, the JavaFX support, and publishing to the
artifactory repository are you're two main advantages. Are there any
others?

One thing that really bugs me about the "standard" webstart plugin is
that I can't seem to disable the jar signing with a maven profile.

Carl

unread,
Nov 1, 2009, 9:21:53 AM11/1/09
to The Java Posse
Brian,

Since you have the standard one working (except for the issue about
jar signing you mentioned), would you mind posting a complete working
example? I did a good bit of reading about it yesterday and ran into
several issues. The most popular one for which I could not find a
solution is the "mainClass" issue. This seems to be related to an
issue with a plugin version mixup best I can tell.

I am guessing it's something simple I am doing wrong but the
documentation is not all that great and there does not seem to be much
activity on the project (perhaps they are working on maven 3).

TIA,
Carl

Frederic Simon

unread,
Nov 1, 2009, 11:55:34 AM11/1/09
to java...@googlegroups.com
Yes, sorry about the maintenance, we upgraded the demo to 2.1.2 which should be out soon (with Ivy support :)
Should be OK now.

For the plugin the main advantages are like Brian said:
- JavaFX compilation (allowing mix of Java and JavaFX files in the same project)
- Keeping Maven repository layout for JNLP dependencies to avoid re-signing identical jars
- Deploy and Run directly against an Artifactory instance and so no local signing needed (You can test it with Artifactory Online no questions asked)
- The basic JNLP templates get you started but you can override them

About Carl mainClass our plugin is finding it by name or jar and assigning it correctly depending on the kind of JNLP files: Standard Web Start, JavaFX Applet.

Anyway, if you have problems or ideas,
please leave some feedback on our JIRA: http://issues.jfrog.org/jira/browse/JFXMP

Thanks for using the plugin,
Fred.
--
Co. Founder and Chief Architect
JFrog Ltd
5 Habonim st., P.O.Box 8187
Netanya, Israel 42504.
Tel: +972 9 8941444    
Fax: +972 9 8659977
http://www.jfrog.org/
http://twitter.com/freddy33

Brian

unread,
Nov 1, 2009, 11:29:59 PM11/1/09
to The Java Posse
On Nov 1, 6:21 am, Carl <carljmo...@gmail.com> wrote:
> Brian,
>
> Since you have the standard one working (except for the issue about
> jar signing you mentioned), would you mind posting a complete working
> example?  

Here's my working pom.xml:
[...]
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>jnlp-download-servlet</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectoryName>/webstart</
outputDirectoryName>
<jnlpFiles>
<jnlpFile>
<templateFilename>template.vm</
templateFilename>
<jarResources>
<jarResource>
<groupId>ca.triumf.mis.science</
groupId>
<artifactId>ScienceClient</
artifactId>
<version>${project.version}</
version>

<mainClass>ca.triumf.mis.science.ScienceApp</mainClass>
</jarResource>
</jarResources>
</jnlpFile>
</jnlpFiles>

<!--

<sign>
<keystore>/var/build/keys/key.jks</
keystore>
<storepass>***</
storepass>
<alias>jarsigner</
alias>
<verify>true</
verify>
</
sign>
-->
<verbose>true</verbose>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.sun.java.jnlp</groupId>
<artifactId>jnlp-servlet</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
[...]

This one uses the sun servlet. I did a "standalone a while back that
I could probably dig up if it's useful.

The templat.vm file looks like:
<?xml version="1.0" encoding="utf-8"?>

<jnlp spec="$jnlpspec" codebase="$$codebase" context="$$context"
href="$$name">
<information>
<title>Science App</title>
<vendor>$project.Organization.Name</vendor>
<shortcut online="true">
<desktop/>
<menu submenu="TRIUMF"/>
</shortcut>
<icon href="images/mis_icon.gif"/>
<icon kind="splash" href="images/splash.gif"/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<property name="java.security.auth.login.config" value="jar:$
$codebaseScienceClient-${project.Version}.jar!/META-INF/
appclientlogin.conf" />
<property name="apple.laf.useScreenMenuBar" value="true"/>
<property name="ca.triumf.mis.codebase" value="$$codebase" />
<j2se version="1.6+"/>
$dependencies
</resources>
<application-desc main-class="$mainClass"/>
</jnlp>

This is in maven 2.

Carl

unread,
Nov 3, 2009, 11:19:57 AM11/3/09
to The Java Posse
Thank you Brian.

Brian Leathem

unread,
Nov 3, 2009, 12:46:59 PM11/3/09
to The Java Posse
No Problem!
Reply all
Reply to author
Forward
0 new messages