Wiki source code of maven-japplication-plugin

Version 24.1 by Andrus Adamchik on 2006/09/30 19:05

Hide last authors
Andrus Adamchik 11.1 1 == Description ==
2
Andrus Adamchik 23.1 3 "maven-japplication-plugin" is a plugin for assembling native launchers of Java applications for a number of target platforms. Current project artifact and all its declared and transitive dependencies will be bundled into the launcher. 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". --
Andrus Adamchik 11.1 4
Andrus Adamchik 23.1 5 "maven-japplication-plugin" is based on a [[JApplication Ant task>>JApplication]] and has similar capabilities, however the Maven environment provides more information about the project, so plugin has no required parameters.
6
Andrus Adamchik 15.1 7 == Prerequisites ==
Andrus Adamchik 11.1 8
Andrus Adamchik 21.1 9 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]].
Andrus Adamchik 11.1 10
11 == Goals ==
12
Andrus Adamchik 21.1 13 The plugin defines a single goal ##"japplication"##.
Andrus Adamchik 11.1 14
15 == Examples ==
16
17 A POM that builds a Foo application on Mac. All declared and transitive dependencies (not shown here) will be included in Foo.app automatically:
18
19 {{code title="pom.xml"}}
20 <?xml version="1.0" encoding="UTF-8"?>
21 <project xmlns="http://maven.apache.org/POM/4.0.0"
22 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
24
25 ...
26 <build>
27 <plugins>
28 <plugin>
29 <groupId>org.objectstyle.woproject.maven2</groupId>
30 <artifactId>maven-japplication-plugin</artifactId>
31 <configuration>
32 <name>Foo</name>
33 <mainClass>org.example.foo.Main</mainClass>
34 <os>mac</os>
35 </configuration>
36 <executions>
37 <execution>
38 <phase>package</phase>
39 <goals>
40 <goal>japplication</goal>
41 </goals>
42 </execution>
43 </executions>
44 </plugin>
45 </plugins>
46 </build>
47 </project>
48
49 {{/code}}