Author: tchemit Date: 2013-09-26 11:03:49 +0200 (Thu, 26 Sep 2013) New Revision: 2942 Url: http://chorem.org/projects/jtimer/repository/revisions/2942 Log: refs #953: Add jnlp deployement mode Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2013-09-26 08:07:54 UTC (rev 2941) +++ trunk/pom.xml 2013-09-26 09:03:49 UTC (rev 2942) @@ -167,6 +167,58 @@ </dependency> </dependencies> </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>webstart-maven-plugin</artifactId> + <version>${webstartPluginVersion}</version> + <configuration> + + <libPath>lib</libPath> + <makeArchive>false</makeArchive> + <verbose>false</verbose> + <canUnsign>false</canUnsign> + <jnlp> + <mainClass>${maven.jar.main.class}</mainClass> + <allPermissions>true</allPermissions> + <offlineAllowed>true</offlineAllowed> + </jnlp> + <sign> + <keystore>${keystorepath}</keystore> + <storepass>${keystorepass}</storepass> + <alias>${keyalias}</alias> + <keypass>${keypass}</keypass> + <verify>true</verify> + <keystoreConfig> + <delete>false</delete> + <gen>false</gen> + </keystoreConfig> + </sign> + <gzip>true</gzip> + <unsign>true</unsign> + <canUnsign>false</canUnsign> + <!--Can't use pack2000 since there is some already signed jar--> + <!--<pack200>true</pack200>--> + <jnlpExtensions> + <!--jnlpExtension> + <name>sun</name> + <title>Sun MicroSystems</title> + <vendor>Sun MicroSystems, Inc.</vendor> + <includes> + <include>javax.help:javahelp</include> + </includes> + </jnlpExtension--> + <jnlpExtension> + <name>jxlayer</name> + <title>Swing labs JXLayer</title> + <vendor>Swing Labs</vendor> + <includes> + <include>org.swinglabs:jxlayer</include> + </includes> + </jnlpExtension> + </jnlpExtensions> + </configuration> + </plugin> </plugins> </pluginManagement> </build> @@ -389,53 +441,81 @@ </execution> </executions> </plugin> - <!-- FIXME : utiliser le profile de mavenpom --> - <!--plugin> - <groupId>org.codehaus.mojo.webstart</groupId> - <artifactId>webstart-maven-plugin</artifactId> - <version>1.0-alpha-2</version> - <executions> - <execution> - <phase>pre-site</phase> - <goals> - <goal>jnlp-inline</goal> - </goals> - </execution> - </executions> - <configuration> - <libPath>lib</libPath> - <jnlp> - <mainClass>${exec.mainClass}</mainClass> - </jnlp> - <sign> - <keystore>${keystorepath}</keystore> - <storepass>${keystorepass}</storepass> - <alias>${keystorealias}</alias> - <verify>true</verify> - </sign> - <pack200>true</pack200> - <gzip>true</gzip> - </configuration> + </plugins> + </build> + </profile> + + <!-- by default jnlp is only perform on a release stage when using the maven-release-plugin --> + <profile> + <id>release-jnlp-profile</id> + <activation> + <property> + <name>performRelease</name> + <value>true</value> + </property> + </activation> + <build> + <plugins> + <!-- key store secrets availables --> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <executions> + <execution> + <id>get-keystore</id> + <goals> + <goal>share-server-secret</goal> + </goals> + <phase>package</phase> + <configuration> + <serverId>codelutin-keystore</serverId> + <privateKeyOut>keystorepath</privateKeyOut> + <passwordOut>keystorepass</passwordOut> + <usernameOut>keyalias</usernameOut> + <passphraseOut>keypass</passphraseOut> + </configuration> + </execution> + </executions> </plugin> + + <!-- make webstart --> <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <id>extract-jnlp-archive</id> - <phase>site</phase> - <configuration> - <tasks> - <unzip src="${project.build.directory}/${project.build.finalName}.zip" dest="${project.reporting.outputDirectory}" /> - </tasks> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - </executions> - </plugin--> + <groupId>org.codehaus.mojo</groupId> + <artifactId>webstart-maven-plugin</artifactId> + <executions> + <execution> + <id>generate-jnlp</id> + <phase>package</phase> + <goals> + <goal>jnlp-inline</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> </profile> + + <!-- by default jnlp is only perform on a release stage when using the maven-release-plugin --> + <profile> + <id>reporting</id> + <activation> + <property> + <name>performRelease</name> + <value>true</value> + </property> + </activation> + + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>webstart-maven-plugin</artifactId> + <version>${webstartPluginVersion}</version> + </plugin> + </plugins> + </reporting> + + </profile> </profiles> </project>