Browse Source

Few Maven changes and added a build script.

master
JitseB 4 years ago
parent
commit
63f60c4208
4 changed files with 46 additions and 24 deletions
  1. +6
    -5
      .gitignore
  2. +10
    -0
      build.sh
  3. +1
    -1
      plugin/pom.xml
  4. +29
    -18
      pom.xml

+ 6
- 5
.gitignore View File

@ -1,10 +1,10 @@
# Eclipse
.classpath
.project
.settings/
.settings
# IntelliJ
.idea/
.idea
*.iml
*.iws
out
@ -13,6 +13,7 @@ out
.DS_Store
# Maven
log/
target/
dependency-reduced-pom.xml
log
target
dependency-reduced-pom.xml
jars

+ 10
- 0
build.sh View File

@ -0,0 +1,10 @@
echo "Building NPCLib jars..."
ls jars >> /dev/null 2>&1 || mkdir jars
echo "Building NPCLib-API.jar..."
mvn clean install >> /dev/null 2>&1 && cp ./api/target/*.jar ./jars && echo "Finished building NPCLib-API.jar." || echo "Failed building NPCLib-API.jar. Please rebuild manually!"
echo "Building NPCLib-Plugin.jar..."
mvn clean install -Pplugin >> /dev/null 2>&1 && cp ./target/*.jar ./jars && echo "Finished building NPCLib-Plugin.jar." || echo "Failed building NPCLib-Plugin.jar. Please rebuild manually!"
echo "Finished building NPCLib jars!"

+ 1
- 1
plugin/pom.xml View File

@ -14,7 +14,7 @@
<build>
<directory>../target</directory>
<finalName>NPCLib-v${project.parent.version}</finalName>
<finalName>NPCLib-Plugin-v${project.parent.version}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>


+ 29
- 18
pom.xml View File

@ -25,6 +25,23 @@
</license>
</licenses>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<!--Spigot API-->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean install</defaultGoal>
<plugins>
@ -53,27 +70,21 @@
</plugins>
</build>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<!--Spigot API-->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<modules>
<module>commons</module>
<module>nms</module>
<module>api</module>
<module>plugin</module>
</modules>
<profiles>
<profile>
<id>plugin</id>
<modules>
<module>commons</module>
<module>nms</module>
<module>api</module>
<module>plugin</module>
</modules>
</profile>
</profiles>
</project>

Loading…
Cancel
Save