Wiki source code of maven-japplication-plugin

Version 22.1 by Andrus Adamchik on 2006/09/30 19:01

Show last authors
1 == Description ==
2
3 "maven-japplication-plugin" is a plugin for assembling native launchers of Java applications for a number of target platforms. It is based on a similar [[JApplication Ant task>>JApplication]]. Currently supports native launchers for Mac and Windows operating systems and also a "java launcher" - a single jar file that can be run via "java --jar file.jar".--
4
5 == Prerequisites ==
6
7 Prerequisites and OS requirements are similar to those for [[JApplication Ant task>>JApplication]]. In particular for Windows you will need to install [[NSIS>>http://nsis.sourceforge.net/Main_Page]].
8
9 == Goals ==
10
11 The plugin defines a single goal ##"japplication"##.
12
13 == Examples ==
14
15 A POM that builds a Foo application on Mac. All declared and transitive dependencies (not shown here) will be included in Foo.app automatically:
16
17 {{code title="pom.xml"}}
18 <?xml version="1.0" encoding="UTF-8"?>
19 <project xmlns="http://maven.apache.org/POM/4.0.0"
20 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
22
23 ...
24 <build>
25 <plugins>
26 <plugin>
27 <groupId>org.objectstyle.woproject.maven2</groupId>
28 <artifactId>maven-japplication-plugin</artifactId>
29 <configuration>
30 <name>Foo</name>
31 <mainClass>org.example.foo.Main</mainClass>
32 <os>mac</os>
33 </configuration>
34 <executions>
35 <execution>
36 <phase>package</phase>
37 <goals>
38 <goal>japplication</goal>
39 </goals>
40 </execution>
41 </executions>
42 </plugin>
43 </plugins>
44 </build>
45 </project>
46
47 {{/code}}