switched from the maven-assembly-plugin to the maven-shade-plugin

* this seems to work better when building fat jar files
* it replaced the default output jar file (without dependencies) by the fat jar file (including all dependencies)
* removed the script that replaced the default jar file by the fat jar file
* enabled the generation of the mac wrapper, since it should work
* the mac wrapper will contain all dependencies twice
master
Stefan Dollase 2015-12-24 03:18:08 +01:00
parent 9f1c93209e
commit 73d96e6264
7 changed files with 23 additions and 29 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@
history.txt
target/
/dependency-reduced-pom.xml

View File

@ -6,15 +6,13 @@ addons:
packages:
- libc6:i386 # these two packages are needed by the launch4j maven plugin to work
- libstdc++6:i386
install:
- mvn clean
- mvn package -DskipTests=true
before_install:
- mvn clean # this actually installs a dependency
before_deploy:
- bash travis-ci/scripts/create-mac-icon.sh
- bash travis-ci/scripts/create-windows-icon.sh
#- mvn package -DskipTests=true -f travis-ci/mac-wrapper/pom.xml
- mvn package -DskipTests=true -f travis-ci/mac-wrapper/pom.xml
- mvn package -DskipTests=true -f travis-ci/windows-wrapper/pom.xml
- bash travis-ci/scripts/rename-jar-file.sh
- export filename=$(bash travis-ci/scripts/get-amidst-filename.sh)
deploy:
provider: releases
@ -22,7 +20,7 @@ deploy:
secure: QMXa1QpW+mlTLlxCbKOAWIRUi2cR+Y2vMQDlwiV8BoUyZchvTBR+stDYuEdxd2fK8/aSRUWEgfUhKMJ4cIZEOOwz/UA/1RQmzumbFLexwTwDXfkTfCcDQFLtzywVoep2P3s1lpheo4f1G3z2sZTCxO5yRnpd/sBtWnaq3j5uifYZB+mv84eH+EsrQL7f+0KjycOPrAdiJ8xh/2twUtGMhaStrnhcH+RCi6qm6D5Dv4mwYM4wRxG3H9i2NceGa6lHIE4bU+kKY9lc3V6EzmTnnShwEcrf+4/ZfCe4A9aU3jzFhKCHKpJ4PlqLEtMeQ08ijaMrF4LaBqwRZ5il5nqKkFdfKOtx7EHqjxrQ1dT7JUXU/3lTfEX/DLbhPa3z5Tl9LgCu9flCS+ltQoPvx7MR1leaQeHNoFCfzWJQ8ytW2CEhnOqx3nr4AIW8q5akJxQB7USfHV5F8kw2T6QmzuniQRZex+15j9SLedaDXZCvno6C0+j59sABpiF9lRVww8jW6BxqklxDcjEtkMxyHiBCG0EgGlKJvVSyGGzDsjb8FweC1KQKBHuG+5UYNE1rJesj6rwfIIrbInjJRTPndb4GpuzzbqbTGxwHd2zqzkQhnxSjCoKIzyhpBzfyCJaqTv/DfimSc95sXH1w1d6zfcO01MkopXYUSlHvr/Rjxh8vE8U=
file:
- "target/${filename}.jar"
# - "target/${filename}.zip"
- "target/${filename}.zip"
- "target/${filename}.exe"
skip_cleanup: true
on:

27
pom.xml
View File

@ -71,28 +71,25 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>shade</goal>
</goals>
<configuration>
<archive>
<manifest>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>amidst.Amidst</mainClass>
</manifest>
<manifestEntries>
<Amidst-Version>${amidst.build.filename}</Amidst-Version>
<Built-On>${maven.build.timestamp}</Built-On>
</manifestEntries>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<manifestEntries>
<Amidst-Version>${amidst.build.filename}</Amidst-Version>
<Built-On>${maven.build.timestamp}</Built-On>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>

View File

@ -1,6 +0,0 @@
#!/bin/bash
filename="`source travis-ci/scripts/get-amidst-filename.sh`"
rm "target/${filename}.jar"
mv "target/${filename}-jar-with-dependencies.jar" "target/${filename}.jar"

View File

@ -2,6 +2,5 @@
filename="`source travis-ci/scripts/get-amidst-filename.sh`"
cd "travis-ci/wrapper-for-mac/target/${filename}/"
rm "${filename}.zip"
zip -r "${filename}.zip" "AMIDST.app/"
mv "${filename}.zip" "../../../../target/"

View File

@ -47,6 +47,11 @@
</plugins>
</build>
<dependencies>
<dependency>
<groupId>amidst</groupId>
<artifactId>amidst</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>sh.tak.appbundler</groupId>
<artifactId>appbundle-maven-plugin</artifactId>

View File

@ -39,7 +39,7 @@
<configuration>
<headerType>gui</headerType>
<outfile>../../target/${amidst.build.filename}.exe</outfile>
<jar>../../target/${amidst.build.filename}-jar-with-dependencies.jar</jar>
<jar>../../target/${amidst.build.filename}.jar</jar>
<dontWrapJar>false</dontWrapJar>
<errTitle>Error in Launcher</errTitle>
<classPath>