Merge pull request #1915 from Foorack/master

Fix maven compilation
This commit is contained in:
Alexander Söderberg 2018-04-09 17:05:27 +02:00 committed by GitHub
commit 0c7be7e11d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 14 deletions

View File

@ -13,16 +13,25 @@ public class PlotVersion {
this.year = Integer.parseInt(date[0]); this.year = Integer.parseInt(date[0]);
this.month = Integer.parseInt(date[1]); this.month = Integer.parseInt(date[1]);
this.day = Integer.parseInt(date[2]); this.day = Integer.parseInt(date[2]);
this.hash = Integer.parseInt(split[1], 16); if(split[1].equals("SNAPSHOT")) { // fallback when compiling with Maven
this.build = Integer.parseInt(split[2]); this.hash = 0;
this.build = 0;
} else {
this.hash = Integer.parseInt(split[1], 16);
this.build = Integer.parseInt(split[2]);
}
} }
@Override @Override
public String toString() { public String toString() {
return "PlotSquared-" + year + "." + month + "." + day + "-" + Integer.toHexString(hash) + "-" + build; if(hash == 0 && build == 0) {
return "PlotSquared-" + year + "." + month + "." + day + "-SNAPSHOT";
} else {
return "PlotSquared-" + year + "." + month + "." + day + "-" + Integer.toHexString(hash) + "-" + build;
}
} }
public boolean isNewer(PlotVersion other) { public boolean isNewer(PlotVersion other) {
return other.build < this.build; return other.build < this.build;
} }
} }

14
pom.xml
View File

@ -12,7 +12,7 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<build> <build>
<finalName>PlotSquared-Bukkit-${project.version}</finalName> <finalName>PlotSquared-Bukkit-${project.version}</finalName>
<sourceDirectory>Bukkit/src/main/java</sourceDirectory> <sourceDirectory>Bukkit/src</sourceDirectory>
<resources> <resources>
<resource> <resource>
<filtering>true</filtering> <filtering>true</filtering>
@ -22,7 +22,7 @@
<directory>Bukkit/src/main/resources/</directory> <directory>Bukkit/src/main/resources/</directory>
</resource> </resource>
<resource> <resource>
<filtering>false</filtering> <filtering>true</filtering>
<includes> <includes>
<include>**/*.*</include> <include>**/*.*</include>
</includes> </includes>
@ -52,7 +52,7 @@
</goals> </goals>
<configuration> <configuration>
<sources> <sources>
<source>Core/src/main/java</source> <source>Core/src</source>
</sources> </sources>
</configuration> </configuration>
</execution> </execution>
@ -82,7 +82,7 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.11-R0.1-SNAPSHOT</version> <version>1.12-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -97,12 +97,6 @@
<artifactId>VaultAPI</artifactId> <artifactId>VaultAPI</artifactId>
<version>1.5</version> <version>1.5</version>
<scope>provided</scope> <scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>