Restructured to use Maven resources folder

This commit is contained in:
tastybento 2018-08-15 20:23:38 -07:00
parent 74ec602117
commit 2caf744273
12 changed files with 207 additions and 74 deletions

267
pom.xml
View File

@ -1,63 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>us.tastybento</groupId>
<artifactId>Challenges</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Challenges</name>
<description>Challenges is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like ASkyBlock or AcidIsland.</description>
<url>https://github.com/BentoBoxWorld/addon-challenges</url>
<inceptionYear>2018</inceptionYear>
<scm>
<connection>scm:git:https://github.com/BentoBoxWorld/addon-challenges.git</connection>
<developerConnection>scm:git:git@github.com:BentoBoxWorld/addon-challenges.git</developerConnection>
<url>https://github.com/BentoBoxWorld/addon-challenges</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/BentoBoxWorld/addon-challenges/issues</url>
</issueManagement>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<powermock.version>1.7.1</powermock.version> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<powermock.version>1.7.4</powermock.version>
</properties> </properties>
<build>
<defaultGoal>clean package install</defaultGoal>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}</directory>
<includes>
<include>*.yml</include>
</includes>
</resource>
<resource>
<targetPath>locales</targetPath>
<filtering>false</filtering>
<directory>${basedir}/locales</directory>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
<plugins> <repositories>
<plugin> <repository>
<artifactId>maven-compiler-plugin</artifactId> <id>spigot-repo</id>
<version>3.5.1</version> <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
<configuration> </repository>
<source>1.8</source> </repositories>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.spigotmc</groupId>
<artifactId>bukkit</artifactId> <artifactId>spigot-api</artifactId>
<version>1.13-R0.1-SNAPSHOT</version> <version>1.13-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>world.bentobox</groupId>
<artifactId>bentobox</artifactId>
<version>FC-0.95</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>bskyblock.addon</groupId>
<artifactId>Level</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId> <artifactId>mockito-all</artifactId>
@ -76,23 +63,175 @@
<version>${powermock.version}</version> <version>${powermock.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>world.bentobox</groupId>
<artifactId>bentobox</artifactId>
<version>FC-1</version>
</dependency>
<dependency>
<groupId>bskyblock.addon</groupId>
<artifactId>Level</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<repositories>
<repository> <build>
<id>spigot-repo</id> <defaultGoal>clean package</defaultGoal>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> <resources>
</repository> <resource>
</repositories> <directory>src/main/resources</directory>
<artifactId>Challenges</artifactId> <filtering>false</filtering>
<groupId>bskyblock.addons</groupId> </resource>
<dependencyManagement> <resource>
<dependencies> <directory>src/main/resources/locales</directory>
<dependency> <targetPath>./locales</targetPath>
<groupId>bskyblock.addon</groupId> <filtering>false</filtering>
<artifactId>Level</artifactId> <includes>
<version>0.0.1-SNAPSHOT</version> <include>*.yml</include>
</dependency> </includes>
</dependencies> </resource>
</dependencyManagement> <resource>
<directory>src/main/resources/schems</directory>
<targetPath>./schems</targetPath>
<filtering>false</filtering>
<includes>
<include>*.schems</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<show>public</show>
<failOnError>false</failOnError>
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<minimizeJar>false</minimizeJar>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<configuration>
<append>true</append>
</configuration>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>sonar</id>
<properties>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>tastybento-github</sonar.organization>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.4.1.1168</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project> </project>

View File

@ -28,7 +28,7 @@ public class ChallengesCommand extends CompositeCommand {
public void setup() { public void setup() {
this.setOnlyPlayer(true); this.setOnlyPlayer(true);
this.setPermission(CHALLENGE_COMMAND); this.setPermission(CHALLENGE_COMMAND);
this.setParameters(CHALLENGE_COMMAND + ".parameters"); this.setParametersHelp(CHALLENGE_COMMAND + ".parameters");
this.setDescription(CHALLENGE_COMMAND + ".description"); this.setDescription(CHALLENGE_COMMAND + ".description");
this.setOnlyPlayer(true); this.setOnlyPlayer(true);
} }

View File

@ -28,7 +28,7 @@ public class CreateChallenge extends CompositeCommand {
public void setup() { public void setup() {
this.setOnlyPlayer(true); this.setOnlyPlayer(true);
this.setPermission("admin.challenges"); this.setPermission("admin.challenges");
this.setParameters("challaneges.admin.create.parameters"); this.setParametersHelp("challaneges.admin.create.parameters");
this.setDescription("challenges.admin.create.description"); this.setDescription("challenges.admin.create.description");
} }

View File

@ -46,7 +46,7 @@ public class CreateSurrounding extends CompositeCommand implements Listener {
public void setup() { public void setup() {
this.setOnlyPlayer(true); this.setOnlyPlayer(true);
this.setPermission("admin.challenges"); this.setPermission("admin.challenges");
this.setParameters("challaneges.admin.create.surrounding.parameters"); this.setParametersHelp("challaneges.admin.create.surrounding.parameters");
this.setDescription("challenges.admin.create.surrounding.description"); this.setDescription("challenges.admin.create.surrounding.description");
} }

View File

@ -4,8 +4,6 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import org.bukkit.Bukkit;
import bentobox.addon.challenges.ChallengesAddon; import bentobox.addon.challenges.ChallengesAddon;
import world.bentobox.bentobox.api.addons.Addon; import world.bentobox.bentobox.api.addons.Addon;
import world.bentobox.bentobox.api.commands.CompositeCommand; import world.bentobox.bentobox.api.commands.CompositeCommand;

View File

@ -35,7 +35,7 @@ public class SetIcon extends CompositeCommand {
*/ */
@Override @Override
public void setup() { public void setup() {
setParameters("challenges.admin.seticon.parameters"); setParametersHelp("challenges.admin.seticon.parameters");
setDescription("challenges.admin.seticon.description"); setDescription("challenges.admin.seticon.description");
} }

View File

@ -5,7 +5,6 @@ import org.bukkit.World;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import bentobox.addon.challenges.ChallengesAddon; import bentobox.addon.challenges.ChallengesAddon;
import bentobox.addon.challenges.ChallengesManager;
import bentobox.addon.challenges.database.object.Challenges; import bentobox.addon.challenges.database.object.Challenges;
import world.bentobox.bentobox.api.panels.builders.PanelBuilder; import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder; import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder;

View File

@ -23,9 +23,6 @@ import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.powermock.modules.junit4.PowerMockRunner; import org.powermock.modules.junit4.PowerMockRunner;
import bentobox.addon.challenges.ChallengesAddon;
import bentobox.addon.challenges.ParseItem;
@RunWith(PowerMockRunner.class) @RunWith(PowerMockRunner.class)
public class ParseItemTest { public class ParseItemTest {