extracted building of windows and mac wrappers to extra pom.xml files

* to prevent issues like the one that was fixed in commit 476f5a
* mac wrapper is still broken and thus disabled
master
Stefan Dollase 2015-12-24 02:43:32 +01:00
parent e0609cccdd
commit 9f1c93209e
14 changed files with 171 additions and 65 deletions

2
.gitignore vendored
View File

@ -15,4 +15,4 @@
/build
history.txt
/target/
target/

View File

@ -3,4 +3,3 @@ encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8

View File

@ -10,17 +10,19 @@ install:
- mvn clean
- mvn package -DskipTests=true
before_deploy:
- bash scripts/create-windows-icon.sh
- bash scripts/create-mac-icon.sh
- mvn install -DskipTests=true
- bash scripts/rename-jar-file.sh
- export filename=$(bash scripts/get-amidst-filename.sh)
- 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/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
api-key:
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}.exe"
skip_cleanup: true
on:

52
pom.xml
View File

@ -1,16 +1,14 @@
<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>AMIDST</groupId>
<artifactId>AMIDST</artifactId>
<groupId>amidst</groupId>
<artifactId>amidst</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
<jdk.version>1.8</jdk.version>
</properties>
<build>
<finalName>${amidst.filename}</finalName>
<finalName>${amidst.build.filename}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@ -67,8 +65,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<source>${amidst.build.jdk.version}</source>
<target>${amidst.build.jdk.version}</target>
</configuration>
</plugin>
<plugin>
@ -88,7 +86,7 @@
<mainClass>amidst.Amidst</mainClass>
</manifest>
<manifestEntries>
<Amidst-Version>${amidst.filename}</Amidst-Version>
<Amidst-Version>${amidst.build.filename}</Amidst-Version>
<Built-On>${maven.build.timestamp}</Built-On>
</manifestEntries>
</archive>
@ -99,37 +97,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.7.8</version>
<executions>
<execution>
<id>launch4j</id>
<phase>install</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<outfile>${project.build.directory}/${amidst.filename}.exe</outfile>
<jar>${project.build.directory}/${amidst.filename}-jar-with-dependencies.jar</jar>
<dontWrapJar>false</dontWrapJar>
<errTitle>Error in Launcher</errTitle>
<classPath>
<mainClass>amidst.Amidst</mainClass>
<addDependencies>false</addDependencies>
</classPath>
<icon>${project.build.directory}/icon.ico</icon>
<jre>
<minVersion>${jdk.version}.0</minVersion>
<initialHeapSize>512</initialHeapSize>
<maxHeapSize>1024</maxHeapSize>
</jre>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
@ -163,15 +130,8 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<type>maven-plugin</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.7.8</version>
<type>maven-plugin</type>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -1,3 +0,0 @@
#!/bin/bash
grep amidst.filename src/main/resources/amidst/metadata.properties | cut -d "=" -f 2

View File

@ -1,7 +0,0 @@
#!/bin/bash
filename="`source scripts/get-amidst-filename.sh`"
cd "target/${filename}/"
zip -r "${filename}.zip" "AMIDST.app/"
mv "${filename}.zip" ".."

View File

@ -1,4 +1,7 @@
amidst.filename=AMIDST-v4.0-alpha1
project.build.sourceEncoding=UTF-8
amidst.build.filename=AMIDST-v4.0-alpha1
amidst.build.jdk.version=1.8
amidst.version.major=4
amidst.version.minor=0
amidst.gui.mainWindow.title=Amidst v4.0-alpha1

View File

@ -0,0 +1,3 @@
#!/bin/bash
grep amidst.build.filename src/main/resources/amidst/metadata.properties | cut -d "=" -f 2

View File

@ -1,6 +1,6 @@
#!/bin/bash
filename="`source scripts/get-amidst-filename.sh`"
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

@ -0,0 +1,7 @@
#!/bin/bash
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

@ -0,0 +1,65 @@
<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>amidst</groupId>
<artifactId>mac-wrapper</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<finalName>${amidst.build.filename}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>../../src/main/resources/amidst/metadata.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>sh.tak.appbundler</groupId>
<artifactId>appbundle-maven-plugin</artifactId>
<version>1.0.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
<configuration>
<mainClass>amidst.Amidst</mainClass>
<iconFile>../../target/icon.icns</iconFile>
<jvmVersion>${amidst.build.jdk.version}+</jvmVersion>
<bundleName>AMIDST</bundleName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>sh.tak.appbundler</groupId>
<artifactId>appbundle-maven-plugin</artifactId>
<version>1.0.4</version>
<type>maven-plugin</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<type>maven-plugin</type>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,77 @@
<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>amidst</groupId>
<artifactId>windows-wrapper</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<finalName>${amidst.build.filename}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>../../src/main/resources/amidst/metadata.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.7.8</version>
<executions>
<execution>
<id>launch4j</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<outfile>../../target/${amidst.build.filename}.exe</outfile>
<jar>../../target/${amidst.build.filename}-jar-with-dependencies.jar</jar>
<dontWrapJar>false</dontWrapJar>
<errTitle>Error in Launcher</errTitle>
<classPath>
<mainClass>amidst.Amidst</mainClass>
<addDependencies>false</addDependencies>
</classPath>
<icon>../../target/icon.ico</icon>
<jre>
<minVersion>${amidst.build.jdk.version}.0</minVersion>
<initialHeapSize>512</initialHeapSize>
<maxHeapSize>1024</maxHeapSize>
</jre>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.7.8</version>
<type>maven-plugin</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<type>maven-plugin</type>
<scope>provided</scope>
</dependency>
</dependencies>
</project>