adjusted the pom.xml

* removed timestamp from filename ... it is still in the manifest file
* filename is now read from resource file metadata.properties
master
Stefan Dollase 2015-12-20 03:45:25 +01:00
parent d1c83d1100
commit d13b08df4f
3 changed files with 33 additions and 5 deletions

View File

@ -1,4 +1,4 @@
Building Amidst
=====
Amidst uses maven for its build process. However, not all dependencies are available from public maven repositories, so they need to be installed in the local maven repository. To do so, you just need to run `mvn clean`. This will take the configured libraries from the `lib` directory and install them in the local repository. Afterwards, you just need to run `mvn package` to create the jar file with all dependencies and resources in it. It will be placed under `target/AMIDST-<version>-<timestamp>-jar-with-dependencies.jar`. Note, that there is also a file called `target/AMIDST-<version>-<timestamp>.jar`, however this file does not contain the dependencies. Just ignore it.
Amidst uses maven for its build process. However, not all dependencies are available from public maven repositories, so they need to be installed in the local maven repository. To do so, you just need to run `mvn clean`. This will take the configured libraries from the `lib` directory and install them in the local repository. Afterwards, you just need to run `mvn package` to create the jar file with all dependencies and resources in it. It will be placed under `target/AMIDST-<version>-jar-with-dependencies.jar`. Note, that there is also a file called `target/AMIDST-<version>.jar`, however this file does not contain the dependencies. Just ignore it.

32
pom.xml
View File

@ -6,13 +6,30 @@
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
<final.name>${project.artifactId}-${project.version}-${maven.build.timestamp}</final.name>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
<jdk.version>1.8</jdk.version>
</properties>
<build>
<finalName>${final.name}</finalName>
<finalName>${amidst.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>${basedir}/src/main/resources/amidst/metadata.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
@ -87,7 +104,8 @@
<mainClass>amidst.Amidst</mainClass>
</manifest>
<manifestEntries>
<Amidst-Version>${final.name}</Amidst-Version>
<Amidst-Version>${amidst.filename}</Amidst-Version>
<Built-On>${maven.build.timestamp}</Built-On>
</manifestEntries>
</archive>
<descriptorRefs>
@ -131,5 +149,11 @@
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<type>maven-plugin</type>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,4 @@
amidst.filename=AMIDST-3.7
amidst.version.major=3
amidst.version.minor=7
amidst.version.offset=