Skip to content

Commit

Permalink
Get version from pom and add build number!
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoenix616 committed Apr 20, 2015
1 parent 7d47ff8 commit d522718
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 4 deletions.
72 changes: 70 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,87 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.themoep</groupId>
<artifactId>BetterBeds</artifactId>
<version>0.6.0-SNAPSHOT</version>
<description>Bukkit plugin to make sleeping in Beds a lot better!</description>
<version>0.6.1-SNAPSHOT</version>
<description>Make sleeping in Beds a lot better!</description>
<name>BetterBeds</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<build.number>${buildNumber}</build.number>
</properties>

<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.8-R0.1-SNAPSHOT</version>
</dependency>
</dependencies>

<profiles>
<profile>
<id>static_build_number</id>
<activation>
<property>
<name>!env.BUILD_NUMBER</name>
</property>
</activation>
<properties>
<buildNumber>0</buildNumber>
<buildDescription>(manually compiled)</buildDescription>
</properties>
</profile>
<profile>
<id>dynamic_build_number</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
<properties>
<buildNumber>${env.BUILD_NUMBER}</buildNumber>
<buildDescription>(build #${env.BUILD_NUMBER})</buildDescription>
</properties>
</profile>
</profiles>

<build>
<finalName>${project.name}</finalName>
<resources>
<resource>
<filtering>true</filtering>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>regex-property</id>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>minecraft.plugin.version</name>
<value>${project.version} ${buildDescription}</value>
<regex>[0-9\.]+ \(.+\)</regex>
<replacement>${project.version}</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
4 changes: 2 additions & 2 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: BetterBeds
name: ${project.name}
main: de.themoep.BetterBeds.BetterBeds
version: 0.6.1
description: Better bed and sleeping handling for large servers
description: '${minecraft.plugin.version}'
author: Phoenix616
authors: [NeoTiger]
website: https://github.com/Phoenix616/BetterBeds/
Expand Down

0 comments on commit d522718

Please sign in to comment.