mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-11-22 18:46:02 +01:00
updates POM to use build numbers in filename
This commit is contained in:
parent
2beeb118f9
commit
e5bdb80982
91
pom.xml
91
pom.xml
@ -5,11 +5,23 @@
|
|||||||
<groupId>world.bentobox</groupId>
|
<groupId>world.bentobox</groupId>
|
||||||
<artifactId>limits</artifactId>
|
<artifactId>limits</artifactId>
|
||||||
<name>Limits</name>
|
<name>Limits</name>
|
||||||
<version>0.2.3-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
|
|
||||||
<description>An add-on for BentoBox that limits blocks and entities on islands.</description>
|
<description>An add-on for BentoBox that limits blocks and entities on islands.</description>
|
||||||
<url>https://github.com/BentoBoxWorld/Limits</url>
|
<url>https://github.com/BentoBoxWorld/Limits</url>
|
||||||
<inceptionYear>2018</inceptionYear>
|
<inceptionYear>2018</inceptionYear>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>tastybento</id>
|
||||||
|
<email>tastybento@bentobox.world</email>
|
||||||
|
<timezone>-8</timezone>
|
||||||
|
<roles>
|
||||||
|
<role>Lead Developer</role>
|
||||||
|
</roles>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:https://github.com/BentoBoxWorld/Limits.git</connection>
|
<connection>scm:git:https://github.com/BentoBoxWorld/Limits.git</connection>
|
||||||
<developerConnection>scm:git:git@github.com:BentoBoxWorld/Limits.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:BentoBoxWorld/Limits.git</developerConnection>
|
||||||
@ -30,9 +42,61 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<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>
|
<!-- Non-minecraft related dependencies -->
|
||||||
|
<powermock.version>2.0.2</powermock.version>
|
||||||
|
<!-- More visible way how to change dependency versions -->
|
||||||
|
<spigot.version>1.13.2-R0.1-SNAPSHOT</spigot.version>
|
||||||
|
<bentobox.version>1.6.0-SNAPSHOT</bentobox.version>
|
||||||
|
<!-- Revision variable removes warning about dynamic version -->
|
||||||
|
<revision>${build.version}-SNAPSHOT</revision>
|
||||||
|
<!-- Do not change unless you want different name for local builds. -->
|
||||||
|
<build.number>-LOCAL</build.number>
|
||||||
|
<!-- This allows to change between versions. -->
|
||||||
|
<build.version>1.6.0</build.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
<!-- Profiles will allow to automatically change build version. -->
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<!-- ci profile is activated if exist environment variable BUILD_NUMBER. -->
|
||||||
|
<!-- It replaces ${build.number} that is currently '-LOCAL' with
|
||||||
|
correct build number from JENKINS machine. -->
|
||||||
|
<id>ci</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env.BUILD_NUMBER</name>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<!-- Override only if necessary -->
|
||||||
|
<build.number>-b${env.BUILD_NUMBER}</build.number>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<!-- Master profile is activated if exist environment variable
|
||||||
|
GIT_BRANCH and its value is origin/master. -->
|
||||||
|
<!-- It will replace 'revision' with '${build.version}' so it
|
||||||
|
removes '-SNAPSHOT' string at the end. -->
|
||||||
|
<!-- Also, as this is release build, build number can be set
|
||||||
|
to empty string. -->
|
||||||
|
<!-- This profile will be used only if exist environment variable
|
||||||
|
GIT_BRANCH with value origin/master. -->
|
||||||
|
<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>
|
||||||
|
<!-- Empties build number variable. -->
|
||||||
|
<build.number></build.number>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>my-local-repo</id>
|
<id>my-local-repo</id>
|
||||||
@ -53,16 +117,18 @@
|
|||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- Spigot API -->
|
||||||
<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>
|
||||||
|
<!-- Mockito (Unit testing) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-all</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
<version>1.10.19</version>
|
<version>3.0.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -73,16 +139,17 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.powermock</groupId>
|
<groupId>org.powermock</groupId>
|
||||||
<artifactId>powermock-api-mockito</artifactId>
|
<artifactId>powermock-api-mockito2</artifactId>
|
||||||
<version>${powermock.version}</version>
|
<version>${powermock.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>world.bentobox</groupId>
|
<groupId>world.bentobox</groupId>
|
||||||
<artifactId>bentobox</artifactId>
|
<artifactId>bentobox</artifactId>
|
||||||
<version>1.6.0-SNAPSHOT</version>
|
<version>${bentobox.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- For EpicSpawners -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>EpicSpawners-API</artifactId>
|
<artifactId>EpicSpawners-API</artifactId>
|
||||||
@ -92,6 +159,16 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
<!-- By default ${revision} is ${build.version}-SNAPSHOT -->
|
||||||
|
<!-- If GIT_BRANCH variable is set to origin/master, then it will
|
||||||
|
be only ${build.version}. -->
|
||||||
|
|
||||||
|
<!-- By default ${build.number} is -LOCAL. -->
|
||||||
|
<!-- If the BUILD_NUMBER variable is set, then it will be -b[number]. -->
|
||||||
|
<!-- If GIT_BRANCH variable is set to origin/master, then it will
|
||||||
|
be the empty string. -->
|
||||||
|
<finalName>${project.name}-${revision}${build.number}</finalName>
|
||||||
|
|
||||||
<defaultGoal>clean package</defaultGoal>
|
<defaultGoal>clean package</defaultGoal>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
|
@ -67,6 +67,8 @@ public class JoinListenerTest {
|
|||||||
private IslandBlockCount ibc;
|
private IslandBlockCount ibc;
|
||||||
@Mock
|
@Mock
|
||||||
private OfflinePlayer owner;
|
private OfflinePlayer owner;
|
||||||
|
@Mock
|
||||||
|
private Island island;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws java.lang.Exception
|
* @throws java.lang.Exception
|
||||||
@ -80,7 +82,6 @@ public class JoinListenerTest {
|
|||||||
when(addon.getGameModePermPrefix(any())).thenReturn("bskyblock.");
|
when(addon.getGameModePermPrefix(any())).thenReturn("bskyblock.");
|
||||||
// Island Manager
|
// Island Manager
|
||||||
when(im.hasIsland(any(), any(UUID.class))).thenReturn(true);
|
when(im.hasIsland(any(), any(UUID.class))).thenReturn(true);
|
||||||
Island island = mock(Island.class);
|
|
||||||
when(island.getUniqueId()).thenReturn("unique_id");
|
when(island.getUniqueId()).thenReturn("unique_id");
|
||||||
when(im.getIsland(any(), any(UUID.class))).thenReturn(island);
|
when(im.getIsland(any(), any(UUID.class))).thenReturn(island);
|
||||||
// Default is that player has island
|
// Default is that player has island
|
||||||
@ -105,6 +106,9 @@ public class JoinListenerTest {
|
|||||||
when(owner.isOnline()).thenReturn(true);
|
when(owner.isOnline()).thenReturn(true);
|
||||||
when(owner.getPlayer()).thenReturn(player);
|
when(owner.getPlayer()).thenReturn(player);
|
||||||
when(Bukkit.getOfflinePlayer(any(UUID.class))).thenReturn(owner);
|
when(Bukkit.getOfflinePlayer(any(UUID.class))).thenReturn(owner);
|
||||||
|
|
||||||
|
// Island
|
||||||
|
when(island.getOwner()).thenReturn(UUID.randomUUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,7 +123,6 @@ public class JoinListenerTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testOnNewIslandWrongReason() {
|
public void testOnNewIslandWrongReason() {
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.BAN);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.BAN);
|
||||||
jl.onNewIsland(e);
|
jl.onNewIsland(e);
|
||||||
verify(island, never()).getWorld();
|
verify(island, never()).getWorld();
|
||||||
@ -130,7 +133,6 @@ public class JoinListenerTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testOnNewIslandRegistered() {
|
public void testOnNewIslandRegistered() {
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.REGISTERED);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.REGISTERED);
|
||||||
jl.onNewIsland(e);
|
jl.onNewIsland(e);
|
||||||
verify(island).getWorld();
|
verify(island).getWorld();
|
||||||
@ -141,7 +143,6 @@ public class JoinListenerTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testOnNewIslandResetted() {
|
public void testOnNewIslandResetted() {
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.RESETTED);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.RESETTED);
|
||||||
jl.onNewIsland(e);
|
jl.onNewIsland(e);
|
||||||
verify(island).getWorld();
|
verify(island).getWorld();
|
||||||
@ -153,7 +154,6 @@ public class JoinListenerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testOnNewIslandCreated() {
|
public void testOnNewIslandCreated() {
|
||||||
when(addon.inGameModeWorld(any())).thenReturn(true);
|
when(addon.inGameModeWorld(any())).thenReturn(true);
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.CREATED);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.CREATED);
|
||||||
jl.onNewIsland(e);
|
jl.onNewIsland(e);
|
||||||
verify(island).getWorld();
|
verify(island).getWorld();
|
||||||
@ -167,7 +167,6 @@ public class JoinListenerTest {
|
|||||||
public void testOnNewIslandCreatedOffline() {
|
public void testOnNewIslandCreatedOffline() {
|
||||||
when(owner.isOnline()).thenReturn(false);
|
when(owner.isOnline()).thenReturn(false);
|
||||||
when(addon.inGameModeWorld(any())).thenReturn(true);
|
when(addon.inGameModeWorld(any())).thenReturn(true);
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.CREATED);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.CREATED);
|
||||||
jl.onNewIsland(e);
|
jl.onNewIsland(e);
|
||||||
verify(island).getWorld();
|
verify(island).getWorld();
|
||||||
@ -182,7 +181,6 @@ public class JoinListenerTest {
|
|||||||
when(addon.getGameModeName(any())).thenReturn("");
|
when(addon.getGameModeName(any())).thenReturn("");
|
||||||
when(addon.getGameModePermPrefix(any())).thenReturn("bskyblock.");
|
when(addon.getGameModePermPrefix(any())).thenReturn("bskyblock.");
|
||||||
when(addon.inGameModeWorld(any())).thenReturn(true);
|
when(addon.inGameModeWorld(any())).thenReturn(true);
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.CREATED);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.CREATED);
|
||||||
jl.onNewIsland(e);
|
jl.onNewIsland(e);
|
||||||
when(addon.getGameModeName(any())).thenReturn("bskyblock");
|
when(addon.getGameModeName(any())).thenReturn("bskyblock");
|
||||||
@ -196,7 +194,6 @@ public class JoinListenerTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testOnOwnerChange() {
|
public void testOnOwnerChange() {
|
||||||
Island island = mock(Island.class);
|
|
||||||
TeamSetownerEvent e = mock(TeamSetownerEvent.class);
|
TeamSetownerEvent e = mock(TeamSetownerEvent.class);
|
||||||
when(e.getIsland()).thenReturn(island);
|
when(e.getIsland()).thenReturn(island);
|
||||||
when(e.getNewOwner()).thenReturn(UUID.randomUUID());
|
when(e.getNewOwner()).thenReturn(UUID.randomUUID());
|
||||||
@ -379,7 +376,6 @@ public class JoinListenerTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testOnUnregisterIslandNotUnregistered() {
|
public void testOnUnregisterIslandNotUnregistered() {
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.BAN);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.BAN);
|
||||||
jl.onUnregisterIsland(e);
|
jl.onUnregisterIsland(e);
|
||||||
verify(island, never()).getWorld();
|
verify(island, never()).getWorld();
|
||||||
@ -390,7 +386,6 @@ public class JoinListenerTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testOnUnregisterIslandNotInWorld() {
|
public void testOnUnregisterIslandNotInWorld() {
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.UNREGISTERED);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.UNREGISTERED);
|
||||||
jl.onUnregisterIsland(e);
|
jl.onUnregisterIsland(e);
|
||||||
verify(island).getWorld();
|
verify(island).getWorld();
|
||||||
@ -406,7 +401,6 @@ public class JoinListenerTest {
|
|||||||
Map<Material, Integer> map = mock(Map.class);
|
Map<Material, Integer> map = mock(Map.class);
|
||||||
when(ibc.getBlockLimits()).thenReturn(map);
|
when(ibc.getBlockLimits()).thenReturn(map);
|
||||||
when(addon.inGameModeWorld(any())).thenReturn(true);
|
when(addon.inGameModeWorld(any())).thenReturn(true);
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.UNREGISTERED);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.UNREGISTERED);
|
||||||
jl.onUnregisterIsland(e);
|
jl.onUnregisterIsland(e);
|
||||||
verify(island).getWorld();
|
verify(island).getWorld();
|
||||||
@ -425,7 +419,6 @@ public class JoinListenerTest {
|
|||||||
Map<Material, Integer> map = mock(Map.class);
|
Map<Material, Integer> map = mock(Map.class);
|
||||||
when(ibc.getBlockLimits()).thenReturn(map);
|
when(ibc.getBlockLimits()).thenReturn(map);
|
||||||
when(addon.inGameModeWorld(any())).thenReturn(true);
|
when(addon.inGameModeWorld(any())).thenReturn(true);
|
||||||
Island island = mock(Island.class);
|
|
||||||
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.UNREGISTERED);
|
IslandEvent e = new IslandEvent(island, null, false, null, IslandEvent.Reason.UNREGISTERED);
|
||||||
jl.onUnregisterIsland(e);
|
jl.onUnregisterIsland(e);
|
||||||
verify(island).getWorld();
|
verify(island).getWorld();
|
||||||
|
Loading…
Reference in New Issue
Block a user