From e3fbeb1560bc183366e4a1aa6c0396c5ae6b6f0e Mon Sep 17 00:00:00 2001 From: BONNe Date: Fri, 8 Mar 2019 21:36:53 +0200 Subject: [PATCH] Added profiles to POM (#596) Add 3 new profiles: - local profile is activated by default and it will add -SNAPSHOT at the end of version. - develop profile is activated when exist BUILD_NUMBER environment variable and it will add -SNAPSHOT #BUILD+_NUMBER at the end of version - master profile is activated when exists GIT_BRANCH environment variable with value origin/master and it will not add anything to version. Also, move most of dependencies versions to properties section. With these changes, it will be easier to process next release. Only change `build.version` in properties section. If you run maven package or install from IDE or console, it will add -SNAPSHOT at the end (unless you have local Jenkins server). [`bentobox-1.4.0-SNAPSHOT.jar`] In Jenkins server builds from develop branch will look like `bentobox-1.4.0-SNAPSHOT #21.jar`. In Jenkins server builds from master branch will look like `bentobox-1.4.0.jar`. --- pom.xml | 120 ++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 87 insertions(+), 33 deletions(-) diff --git a/pom.xml b/pom.xml index cdbd48908..d62662a3e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ world.bentobox bentobox - 1.4.0-SNAPSHOT + ${revision} BentoBox Expandable Minecraft Spigot plugin for island-type games like SkyBlock or AcidIsland. @@ -44,9 +44,90 @@ UTF-8 UTF-8 1.8 + 1.7.4 + 3.8.0 + + 1.13.2-R0.1-SNAPSHOT + 1.4 + 68f14ec + 2.9.2 + + ${build.version} + + 1.4.0 + + + + + + local + + true + + + ${build.version}-SNAPSHOT + + + + + + develop + + + env.BUILD_NUMBER + + + + + ${build.version}-SNAPSHOT-#${env.BUILD_NUMBER} + + + + + + master + + + env.GIT_BRANCH + origin/master + + + + + ${build.version} + + + + sonar + + https://sonarcloud.io + tastybento-github + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + 3.4.1.1168 + + + verify + + sonar + + + + + + + + + spigot-repo @@ -71,14 +152,14 @@ org.spigotmc spigot-api - 1.13.2-R0.1-SNAPSHOT + ${spigot.version} provided org.bstats bstats-bukkit - 1.4 + ${bstats.version} @@ -103,21 +184,21 @@ org.mongodb mongodb-driver - 3.8.0 + ${mongodb.version} com.github.MilkBowl VaultAPI - 68f14ec + ${vault.version} provided me.clip placeholderapi - 2.9.2 + ${placeholder.version} provided @@ -272,31 +353,4 @@ - - - - sonar - - https://sonarcloud.io - tastybento-github - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - 3.4.1.1168 - - - verify - - sonar - - - - - - - -