Skip to content

Commit 0a91b61

Browse files
committed
Fixes #2
1 parent 8af4e64 commit 0a91b61

File tree

8 files changed

+186
-6
lines changed

8 files changed

+186
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>fvarrui.maven</groupId>
77
<artifactId>javapackager</artifactId>
8-
<version>0.8.0</version>
8+
<version>0.8.1</version>
99
<packaging>maven-plugin</packaging>
1010

1111
<name>JavaPackager Maven Plugin</name>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
2+
#Tue Oct 01 22:02:25 BST 2019
3+
javapackager-0.8.1.jar>=
4+
javapackager-0.8.1.pom>=
Binary file not shown.
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>fvarrui.maven</groupId>
7+
<artifactId>javapackager</artifactId>
8+
<version>0.8.1</version>
9+
<packaging>maven-plugin</packaging>
10+
11+
<name>JavaPackager Maven Plugin</name>
12+
13+
<url>https://github.com/fvarrui/javapackager</url>
14+
15+
<properties>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
<maven.compiler.source>1.8</maven.compiler.source>
18+
<maven.compiler.target>1.8</maven.compiler.target>
19+
</properties>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>org.apache.maven</groupId>
24+
<artifactId>maven-plugin-api</artifactId>
25+
<version>3.6.0</version>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.apache.maven.plugin-tools</groupId>
29+
<artifactId>maven-plugin-annotations</artifactId>
30+
<version>3.6.0</version>
31+
<scope>provided</scope>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.codehaus.plexus</groupId>
35+
<artifactId>plexus-utils</artifactId>
36+
<version>3.1.1</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>junit</groupId>
40+
<artifactId>junit</artifactId>
41+
<version>4.12</version>
42+
<scope>test</scope>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.twdata.maven</groupId>
46+
<artifactId>mojo-executor</artifactId>
47+
<version>2.3.0</version>
48+
</dependency>
49+
<dependency>
50+
<groupId>commons-lang</groupId>
51+
<artifactId>commons-lang</artifactId>
52+
<version>2.2</version>
53+
</dependency>
54+
<dependency>
55+
<groupId>commons-io</groupId>
56+
<artifactId>commons-io</artifactId>
57+
<version>2.6</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.apache.velocity</groupId>
61+
<artifactId>velocity-engine-core</artifactId>
62+
<version>2.0</version>
63+
</dependency>
64+
</dependencies>
65+
66+
<build>
67+
<plugins>
68+
<plugin>
69+
<groupId>org.apache.maven.plugins</groupId>
70+
<artifactId>maven-plugin-plugin</artifactId>
71+
<version>3.6.0</version>
72+
<configuration>
73+
<goalPrefix>javapackager</goalPrefix>
74+
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
75+
</configuration>
76+
<executions>
77+
<execution>
78+
<id>help-goal</id>
79+
<goals>
80+
<goal>help</goal>
81+
</goals>
82+
</execution>
83+
</executions>
84+
</plugin>
85+
<plugin>
86+
<groupId>org.apache.maven.plugins</groupId>
87+
<artifactId>maven-install-plugin</artifactId>
88+
<version>3.0.0-M1</version>
89+
<configuration>
90+
<localRepositoryPath>releases</localRepositoryPath>
91+
<file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
92+
</configuration>
93+
<executions>
94+
<execution>
95+
<id>release</id>
96+
<phase>install</phase>
97+
<goals>
98+
<goal>install-file</goal>
99+
</goals>
100+
</execution>
101+
</executions>
102+
</plugin>
103+
</plugins>
104+
</build>
105+
106+
<profiles>
107+
<profile>
108+
<id>run-its</id>
109+
<build>
110+
<plugins>
111+
<plugin>
112+
<groupId>org.apache.maven.plugins</groupId>
113+
<artifactId>maven-invoker-plugin</artifactId>
114+
<version>1.7</version>
115+
<configuration>
116+
<debug>true</debug>
117+
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
118+
<pomIncludes>
119+
<pomInclude>*/pom.xml</pomInclude>
120+
</pomIncludes>
121+
<postBuildHookScript>verify</postBuildHookScript>
122+
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
123+
<settingsFile>src/it/settings.xml</settingsFile>
124+
<goals>
125+
<goal>clean</goal>
126+
<goal>test-compile</goal>
127+
</goals>
128+
</configuration>
129+
<executions>
130+
<execution>
131+
<id>integration-test</id>
132+
<goals>
133+
<goal>install</goal>
134+
<goal>integration-test</goal>
135+
<goal>verify</goal>
136+
</goals>
137+
</execution>
138+
</executions>
139+
</plugin>
140+
</plugins>
141+
142+
</build>
143+
</profile>
144+
</profiles>
145+
146+
<distributionManagement>
147+
<repository>
148+
<id>repo</id>
149+
<url>file://${project.basedir}/releases</url>
150+
</repository>
151+
</distributionManagement>
152+
153+
</project>

releases/fvarrui/maven/javapackager/maven-metadata-local.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
<groupId>fvarrui.maven</groupId>
44
<artifactId>javapackager</artifactId>
55
<versioning>
6-
<latest>0.8.0</latest>
7-
<release>0.8.0</release>
6+
<latest>0.8.1</latest>
7+
<release>0.8.1</release>
88
<versions>
99
<version>0.4.0</version>
1010
<version>0.5.0</version>
1111
<version>0.7.0</version>
1212
<version>0.8.0</version>
13+
<version>0.8.1</version>
1314
</versions>
14-
<lastUpdated>20190524130639</lastUpdated>
15+
<lastUpdated>20191001210225</lastUpdated>
1516
</versioning>
1617
</metadata>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package fvarrui.maven.plugin.javapackager;
2+
3+
import org.apache.commons.lang.SystemUtils;
4+
5+
public class Main {
6+
7+
public static void main(String[] args) {
8+
System.out.println(SystemUtils.JAVA_VERSION.split("\\.")[0]);
9+
}
10+
11+
}

src/main/java/fvarrui/maven/plugin/javapackager/PackageMojo.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,18 @@ private void createCustomizedJre(File jreFolder, File libsFolder) throws MojoExe
619619
additionalArguments = new Object [] { "--ignore-missing-deps" };
620620
}
621621

622-
modules += ProcessUtils.execute(jdeps.getAbsolutePath(), "-q", additionalArguments, "--print-module-deps", "--class-path", new File(libsFolder, "*"), jarFile);
622+
String javaMajorVersion = SystemUtils.JAVA_VERSION.split("\\.")[0];
623+
624+
modules += ProcessUtils.execute(
625+
jdeps.getAbsolutePath(),
626+
"-q",
627+
additionalArguments,
628+
"--print-module-deps",
629+
"--multi-release",
630+
javaMajorVersion,
631+
"--class-path", new File(libsFolder, "*"),
632+
jarFile
633+
);
623634

624635
}
625636

src/main/resources/windows/iss.vtl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ AppPublisher={#MyAppPublisher}
1616
AppPublisherURL={#MyAppURL}
1717
AppSupportURL={#MyAppURL}
1818
AppUpdatesURL={#MyAppURL}
19-
DefaultDirName={pf}\{#MyAppFolder}
19+
DefaultDirName={commonpf}\{#MyAppFolder}
2020
DisableDirPage=yes
2121
DisableProgramGroupPage=yes
2222
DisableFinishedPage=yes

0 commit comments

Comments
 (0)