Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic CLI support & pom procyon changes #138

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
256 changes: 120 additions & 136 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<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>us.deathmarine</groupId>
<artifactId>luyten</artifactId>
<version>0.5.3</version>
<properties>
<procyon.version>0.5.32</procyon.version>
</properties>
<dependencies>
<dependency>
<groupId>com.fifesoft</groupId>
Expand All @@ -15,33 +19,33 @@
<artifactId>AppleJavaExtensions</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-core</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-expressions</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-reflection</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-compilertools</artifactId>
<version>LATEST</version>
</dependency>
<!--
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon</artifactId>
<version>0.5.27</version>
<artifactId>procyon-core</artifactId>
<version>${procyon.version}</version>
</dependency>
-->
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-expressions</artifactId>
<version>${procyon.version}</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-reflection</artifactId>
<version>${procyon.version}</version>
</dependency>
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-compilertools</artifactId>
<version>${procyon.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sourceforge.argparse4j/argparse4j -->
<dependency>
<groupId>net.sourceforge.argparse4j</groupId>
<artifactId>argparse4j</artifactId>
<version>0.8.1</version>
</dependency>

</dependencies>
<repositories>
<repository>
Expand Down Expand Up @@ -70,27 +74,12 @@
</excludes>
</resource>
</resources>
<plugins><!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon</artifactId>
<version>0.5.27</version>
<packaging>jar</packaging>
<file>${basedir}/lib/procyon-decompiler-0.5.27.jar</file>
</configuration>
</execution>
</executions>
</plugin>-->
<plugins><!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId>
<version>2.4</version> <executions> <execution> <phase>initialize</phase>
<goals> <goal>install-file</goal> </goals> <configuration> <groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon</artifactId> <version>0.5.27</version> <packaging>jar</packaging>
<file>${basedir}/lib/procyon-decompiler-0.5.27.jar</file> </configuration>
</execution> </executions> </plugin> -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
Expand All @@ -100,54 +89,36 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${project.groupId}.${project.artifactId}.Luyten</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- Replaced by maven-shade for Uber-jar
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${project.groupId}.${project.artifactId}.Luyten</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<finalName>${project.artifactId}</finalName>
<archive>
<manifest>
<mainClass>${project.groupId}.${project.artifactId}.Luyten</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
-->
</plugin>
<!-- Replaced by maven-shade for Uber-jar <plugin> <artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version> <executions> <execution> <phase>package</phase> <goals>
<goal>single</goal> </goals> </execution> </executions> <configuration> <descriptors>
<descriptor>assembly.xml</descriptor> </descriptors> <finalName>${project.artifactId}</finalName>
<archive> <manifest> <mainClass>${project.groupId}.${project.artifactId}.Luyten</mainClass>
</manifest> </archive> </configuration> </plugin> -->
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.7.4</version>
<executions>
<execution>
Expand Down Expand Up @@ -186,28 +157,28 @@
</execution>
</executions>
</plugin>
<plugin>
<!-- Download universalJavaApplicationStub for use in the OS X app -->
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/tofi86/universalJavaApplicationStub/master/src/universalJavaApplicationStub</url>
<outputDirectory>${project.build.directory}/resources</outputDirectory>
<!-- Needs to be named with ".sh" extension or OS X 10.11 gets confused -->
<outputFileName>universalJavaApplicationStub.sh</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Package the jar as an OS X application -->
<!-- Download universalJavaApplicationStub for use in the OS X app -->
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/tofi86/universalJavaApplicationStub/master/src/universalJavaApplicationStub</url>
<outputDirectory>${project.build.directory}/resources</outputDirectory>
<!-- Needs to be named with ".sh" extension or OS X 10.11 gets confused -->
<outputFileName>universalJavaApplicationStub.sh</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Package the jar as an OS X application -->
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
Expand All @@ -219,33 +190,45 @@
</goals>
<configuration>
<target>
<taskdef name="jarbundler" classname="com.ultramixer.jarbundler.JarBundler" />
<chmod file="${project.build.directory}/resources/universalJavaApplicationStub.sh" perm="+x" />
<jarbundler dir="${project.build.directory}" name="Luyten" shortname="Luyten" signature="Luyten"
jars="${project.build.directory}/${project.artifactId}-${project.version}.jar"
stubfile="${project.build.directory}/resources/universalJavaApplicationStub.sh"
useJavaXKey="true" workingdirectory="$JAVAROOT"
bundleid="${project.groupId}.${project.artifactId}"
mainclass="${project.groupId}.${project.artifactId}.LuytenOsx"
version="${project.version}" copyright="2015"
icon="${project.build.sourceDirectory}/resources/luyten.icns"
jvmversion="1.7+" screenmenu="true"
antialiasedgraphics="true" highresolutioncapable="true" >
<documenttype name="Class File" extensions="class" role="Viewer" />
<documenttype name="Java File" extensions="java" role="Viewer" />
<documenttype name="Jar File" extensions="jar" role="Viewer" />
<documenttype name="War File" extensions="war" role="Viewer" />
<documenttype name="Ear File" extensions="ear" role="Viewer" />
<documenttype name="Zip File" extensions="zip" role="Viewer" />
<taskdef name="jarbundler"
classname="com.ultramixer.jarbundler.JarBundler" />
<chmod
file="${project.build.directory}/resources/universalJavaApplicationStub.sh"
perm="+x" />
<jarbundler dir="${project.build.directory}"
name="Luyten" shortname="Luyten" signature="Luyten"
jars="${project.build.directory}/${project.artifactId}-${project.version}.jar"
stubfile="${project.build.directory}/resources/universalJavaApplicationStub.sh"
useJavaXKey="true" workingdirectory="$JAVAROOT"
bundleid="${project.groupId}.${project.artifactId}"
mainclass="${project.groupId}.${project.artifactId}.LuytenOsx"
version="${project.version}" copyright="2015"
icon="${project.build.sourceDirectory}/resources/luyten.icns"
jvmversion="1.7+" screenmenu="true" antialiasedgraphics="true"
highresolutioncapable="true">
<documenttype name="Class File" extensions="class"
role="Viewer" />
<documenttype name="Java File" extensions="java"
role="Viewer" />
<documenttype name="Jar File" extensions="jar"
role="Viewer" />
<documenttype name="War File" extensions="war"
role="Viewer" />
<documenttype name="Ear File" extensions="ear"
role="Viewer" />
<documenttype name="Zip File" extensions="zip"
role="Viewer" />
</jarbundler>
<!-- Produce a zip file of the application for distribution -->
<zip destfile="${project.build.directory}/${project.artifactId}-OSX-${project.version}.zip">
<zipfileset dir="${project.build.directory}"
includes="Luyten.app/**" excludes="Luyten.app/Contents/MacOS/*" />
<zipfileset dir="${project.build.directory}"
includes="Luyten.app/Contents/MacOS/*" filemode="755" />
</zip>
</target>
<!-- Produce a zip file of the application for distribution -->
<zip
destfile="${project.build.directory}/${project.artifactId}-OSX-${project.version}.zip">
<zipfileset dir="${project.build.directory}"
includes="Luyten.app/**"
excludes="Luyten.app/Contents/MacOS/*" />
<zipfileset dir="${project.build.directory}"
includes="Luyten.app/Contents/MacOS/*" filemode="755" />
</zip>
</target>
</configuration>
</execution>
</executions>
Expand All @@ -258,10 +241,11 @@
</dependencies>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<!--This plugin does nothing in maven, it is only to appease Eclipse and remove red squigglys.-->
<!--This plugin does nothing in maven, it is only to appease Eclipse
and remove red squigglys. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
Expand Down Expand Up @@ -313,6 +297,6 @@
</plugin>
</plugins>
</pluginManagement>

</build>
</project>
Loading