Skip to content

Commit

Permalink
Fixes #2
Browse files Browse the repository at this point in the history
fvarrui committed Oct 1, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 8af4e64 commit 0a91b61
Showing 8 changed files with 186 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

<groupId>fvarrui.maven</groupId>
<artifactId>javapackager</artifactId>
<version>0.8.0</version>
<version>0.8.1</version>
<packaging>maven-plugin</packaging>

<name>JavaPackager Maven Plugin</name>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Tue Oct 01 22:02:25 BST 2019
javapackager-0.8.1.jar>=
javapackager-0.8.1.pom>=
Binary file not shown.
153 changes: 153 additions & 0 deletions releases/fvarrui/maven/javapackager/0.8.1/javapackager-0.8.1.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>fvarrui.maven</groupId>
<artifactId>javapackager</artifactId>
<version>0.8.1</version>
<packaging>maven-plugin</packaging>

<name>JavaPackager Maven Plugin</name>

<url>https://github.com/fvarrui/javapackager</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.6.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.twdata.maven</groupId>
<artifactId>mojo-executor</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.0</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<goalPrefix>javapackager</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>help-goal</id>
<goals>
<goal>help</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<localRepositoryPath>releases</localRepositoryPath>
<file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
</configuration>
<executions>
<execution>
<id>release</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>run-its</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.7</version>
<configuration>
<debug>true</debug>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
<goals>
<goal>clean</goal>
<goal>test-compile</goal>
</goals>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>install</goal>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

</build>
</profile>
</profiles>

<distributionManagement>
<repository>
<id>repo</id>
<url>file://${project.basedir}/releases</url>
</repository>
</distributionManagement>

</project>
7 changes: 4 additions & 3 deletions releases/fvarrui/maven/javapackager/maven-metadata-local.xml
Original file line number Diff line number Diff line change
@@ -3,14 +3,15 @@
<groupId>fvarrui.maven</groupId>
<artifactId>javapackager</artifactId>
<versioning>
<latest>0.8.0</latest>
<release>0.8.0</release>
<latest>0.8.1</latest>
<release>0.8.1</release>
<versions>
<version>0.4.0</version>
<version>0.5.0</version>
<version>0.7.0</version>
<version>0.8.0</version>
<version>0.8.1</version>
</versions>
<lastUpdated>20190524130639</lastUpdated>
<lastUpdated>20191001210225</lastUpdated>
</versioning>
</metadata>
11 changes: 11 additions & 0 deletions src/main/java/fvarrui/maven/plugin/javapackager/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package fvarrui.maven.plugin.javapackager;

import org.apache.commons.lang.SystemUtils;

public class Main {

public static void main(String[] args) {
System.out.println(SystemUtils.JAVA_VERSION.split("\\.")[0]);
}

}
13 changes: 12 additions & 1 deletion src/main/java/fvarrui/maven/plugin/javapackager/PackageMojo.java
Original file line number Diff line number Diff line change
@@ -619,7 +619,18 @@ private void createCustomizedJre(File jreFolder, File libsFolder) throws MojoExe
additionalArguments = new Object [] { "--ignore-missing-deps" };
}

modules += ProcessUtils.execute(jdeps.getAbsolutePath(), "-q", additionalArguments, "--print-module-deps", "--class-path", new File(libsFolder, "*"), jarFile);
String javaMajorVersion = SystemUtils.JAVA_VERSION.split("\\.")[0];

modules += ProcessUtils.execute(
jdeps.getAbsolutePath(),
"-q",
additionalArguments,
"--print-module-deps",
"--multi-release",
javaMajorVersion,
"--class-path", new File(libsFolder, "*"),
jarFile
);

}

2 changes: 1 addition & 1 deletion src/main/resources/windows/iss.vtl
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppFolder}
DefaultDirName={commonpf}\{#MyAppFolder}
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableFinishedPage=yes

0 comments on commit 0a91b61

Please sign in to comment.