Permalink
Browse files

Enable automatic releases using Travis.

Add version.properties for version information inside built application.
Add Vagrantfile to give Windows users the same build process.
Ignore IntelliJ IDEA project files.
  • Loading branch information...
foxylion committed Apr 17, 2015
1 parent 687bd9a commit 2bdd8c217f4e30409523df84442946deb9060a48
Showing with 118 additions and 72 deletions.
  1. +3 −0 .gitignore
  2. +12 −1 .travis.yml
  3. +9 −0 Vagrantfile
  4. +89 −71 pom.xml
  5. +5 −0 src/main/resources/de/osmembrane/resources/version.properties
View
@@ -3,4 +3,7 @@ target/
.project
.classpath
.settings/
.idea/
.vagrant/
*.iml
*.DS_Store
View
@@ -1,8 +1,19 @@
language: java
sudo: no
jdk:
- oraclejdk8
- oraclejdk8
before_install:
- make dependencies
deploy:
skip_cleanup: true
provider: releases
api_key:
secure: "E+5kzuDWLLSTeShg1VDRrFHNQ/Slg/DrikU8LECryjeqxKMk0rqDPsEOtuaybnNbuT18X24GcZOQMb0/PVGBO5SgfpUDR27+Hh8R6T6M8mduDoyfcj2WAZ3zPsLBKym88rIMNC0cY1pP0SzwE3lwIWnZFlUq1nSEoEQrTZZ+DAc="
file: target/OSMembrane.jar
on:
tags: true
all_branches: true
View
@@ -0,0 +1,9 @@
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/wily64"
config.ssh.shell = "bash"
config.vm.provision "shell", inline: <<SCRIPT
apt-get install -y openjdk-8-jdk maven
gem install travis
SCRIPT
end
View
160 pom.xml
@@ -1,79 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
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>de.osmembrane</groupId>
<artifactId>osmembrane</artifactId>
<version>1.0-SNAPSHOT</version>
<name>OSMembrane - GUI for osmosis</name>
<groupId>de.osmembrane</groupId>
<artifactId>osmembrane</artifactId>
<version>1.0-SNAPSHOT</version>
<name>OSMembrane - GUI for osmosis</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<osmembrane.mainclass>de.osmembrane.Main</osmembrane.mainclass>
<osmembrane.splashimage>de/osmembrane/resources/images/splash.png</osmembrane.splashimage>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<dependencies>
<dependency>
<groupId>de.osmembrane.thirdparty</groupId>
<artifactId>bboxchooser</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>de.osmembrane.thirdparty</groupId>
<artifactId>jmapviewer</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<osmembrane.mainclass>de.osmembrane.Main</osmembrane.mainclass>
<osmembrane.splashimage>de/osmembrane/resources/images/splash.png</osmembrane.splashimage>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>${osmembrane.mainclass}</mainClass>
</manifest>
<manifestEntries>
<SplashScreen-Image>${osmembrane.splashimage}</SplashScreen-Image>
</manifestEntries>
</archive>
<finalName>${project.artifactId}-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<dependencies>
<dependency>
<groupId>de.osmembrane.thirdparty</groupId>
<artifactId>bboxchooser</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>de.osmembrane.thirdparty</groupId>
<artifactId>jmapviewer</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>${osmembrane.mainclass}</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>${osmembrane.mainclass}</mainClass>
</manifest>
<manifestEntries>
<SplashScreen-Image>${osmembrane.splashimage}</SplashScreen-Image>
</manifestEntries>
</archive>
<finalName>OSMembrane</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>${osmembrane.mainclass}</mainClass>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/version.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/version.properties</exclude>
</excludes>
</resource>
</resources>
</build>
</project>
@@ -0,0 +1,5 @@
maven.version = ${project.version}
travis.branch = ${env.TRAVIS_BRANCH}
travis.buildnumber = ${env.TRAVIS_BUILD_NUMBER}
travis.commit = ${env.TRAVIS_COMMIT}
travis.tag = ${env.TRAVIS_TAG}

0 comments on commit 2bdd8c2

Please sign in to comment.