Upgrade ChallengesPom

- Move all dependency versions to properties section.
- Add profiles that allows to change project version based on BUILD_NUMBER and GIT_BRANCH
This commit is contained in:
BONNe 2019-03-05 10:30:19 +02:00
parent e32b07b7fc
commit e04ed5fb75

51
pom.xml
View File

@ -6,7 +6,7 @@
<groupId>world.bentobox</groupId> <groupId>world.bentobox</groupId>
<artifactId>challenges</artifactId> <artifactId>challenges</artifactId>
<version>0.6.0</version> <version>${revision}</version>
<name>Challenges</name> <name>Challenges</name>
<description>Challenges is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like SkyBlock, AcidIsland or CaveBlock.</description> <description>Challenges is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like SkyBlock, AcidIsland or CaveBlock.</description>
@ -34,8 +34,47 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<powermock.version>1.7.4</powermock.version> <powermock.version>1.7.4</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.13.2-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.3.0</bentobox.version>
<level.version>1.3.0</level.version>
<vault.version>68f14ec</vault.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>0.6.1</build.version>
</properties> </properties>
<profiles>
<profile>
<id>develop</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
<properties>
<!-- Override only if necessary -->
<revision>${build.version}-SNAPSHOT #${env.BUILD_NUMBER}</revision>
<!-- GIT_BRANCH -->
</properties>
</profile>
<profile>
<id>master</id>
<activation>
<property>
<name>env.GIT_BRANCH</name>
<value>origin/master</value>
</property>
</activation>
<properties>
<!-- Override only if necessary -->
<revision>${build.version}</revision>
<!-- GIT_BRANCH -->
</properties>
</profile>
</profiles>
<distributionManagement> <distributionManagement>
<snapshotRepository> <snapshotRepository>
<id>codemc-snapshots</id> <id>codemc-snapshots</id>
@ -75,13 +114,13 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version> <version>${spigot.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId> <artifactId>spigot</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version> <version>${spigot.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -105,19 +144,19 @@
<dependency> <dependency>
<groupId>world.bentobox</groupId> <groupId>world.bentobox</groupId>
<artifactId>bentobox</artifactId> <artifactId>bentobox</artifactId>
<version>1.3.0</version> <version>${bentobox.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>world.bentobox</groupId> <groupId>world.bentobox</groupId>
<artifactId>level</artifactId> <artifactId>level</artifactId>
<version>1.3.0</version> <version>${level.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.MilkBowl</groupId> <groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId> <artifactId>VaultAPI</artifactId>
<version>68f14ec</version> <version>${vault.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>