Thanks Dennis, I will give it a try.
On 4/14/10 10:42 AM, "Dennis Lundberg" <[email protected]> wrote: On 2010-04-13 20:53, Shahzad Bhatti wrote: > I have a project that builds a war file using Maven 2.2. I would like to > serve jnlp file that can be used to start an application remotely using Java > Web Start. I need to do following things: > > 1. Sign the project jar file as well as all dependent jar files > 2. Copy jar files in lib directory > 3. Build war file including above signed jar files, i.e., lib directory > will have all signed jar files and WEB-INF/lib directory will have unsigned > jar fields as before. > > I tried webstart-maven-plugin but not sure how it can be integrated with > maven-jar-plugin and maven-war-plugin to automate all this. I would > appreciate any examples. Thanks. Create one module that contains the web start application(s). It should have jar-packaging. Create (I guess you already have this) a module for your webapp. It should have war-packaging. In the webapp add a dependency on your webstart module. Add the configuration for the webstart-maven-plugin in your webapp module. The example below uses the jnlp-download-servlet, if you don't use that your configuration will look slightly different. <build> <plugins> <plugin> <groupId>org.codehaus.mojo.webstart</groupId> <artifactId>webstart-maven-plugin</artifactId> <version>1.0-beta-1-SNAPSHOT</version> <executions> <execution> <phase>package</phase> <goals> <goal>jnlp-download-servlet</goal> </goals> </execution> </executions> <configuration> <libPath>lib</libPath> <outputDirectoryName>webstart</outputDirectoryName> <jnlpFiles> <jnlpFile> <outputFilename>app.jnlp</outputFilename> <jarResources> <jarResource> <groupId>${project.groupId}</groupId> <artifactId>your-webstart-artifactid</artifactId> <version>${project.version}</version> <mainClass>packages.to.your.MainClass<mainClass> </jarResource> </jarResources> </jnlpFile> </jnlpFiles> <sign> <keystore>path.to.keystore.file}</keystore> <storepass>your.keystore.password</storepass> <alias>keystore-alias</alias> </sign> </configuration> </plugin> </plugins> </build> This will produce /webstart/app.jnlp together with a directory /webstart/lib that contains the signed dependencies of your webstart app. Note that I'm using the latest SNAPSHOT version here. That's because there are some bugs about <libPath> in the latest released version. I'm working to get a new release out the door. > > ______________________________________________ > > See http://www.peak6.com/email_disclaimer.php > for terms and conditions related to this email > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Dennis Lundberg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
