Add a cbdev profile for building.

This commit is contained in:
asofold 2016-03-13 23:23:04 +01:00
parent 0be4373310
commit 1be694d869
3 changed files with 81 additions and 9 deletions

View File

@ -141,6 +141,56 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>cbdev</id>
<activation>
<property>
<name>cbdev</name>
<value>true</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcore</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatbukkit</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<!-- Non minimal below. -->
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatcbdev</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<!-- Non minimal above. -->
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatprotocollib</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatglowstone</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>minimal</id>
<activation>

View File

@ -19,7 +19,12 @@ Tips
Compiling NoCheatPlus
---------
* We use [Maven] (http://maven.apache.org/download.cgi) 3 to handle the dependencies.
* You can compile it with this Maven goal: `mvn clean package`, if you don't want any dedicated CraftBukkit modules, or if you are lacking the jar files. If you do have all the dependencies, you can set the parameter `cbdedicated` to `true` and activate the profile `all` adding `-P all` to the goals (e.g. on Jenkins, for some setups setting the property may suffice). If you want to build only using the compat module for your current server version, you can remove all the unneeded module references from the root pom.xml and the corresponding dependencies from NCPPlugin/pom.xml. Custom modules not put under the group id `fr.neatmonster` might need to be added to the `includes` section in NoCheatPlus/pom.xml as well.
* You can compile it with this Maven goal: `mvn clean package`, if you don't want any dedicated CraftBukkit modules, or if you are lacking the jar files. If you do have all the dependencies, you can set the parameter `cbdedicated` to `true` and activate the profile `all` adding `-P all` to the goals (e.g. on Jenkins, for some setups setting the property may suffice). For more options, see the table below. If you want to build only using the compat module for your current server version, you can remove all the unneeded module references from the root pom.xml and the corresponding dependencies from NCPPlugin/pom.xml. Custom modules not put under the group id `fr.neatmonster` might need to be added to the `includes` section in NoCheatPlus/pom.xml as well.
* All profiles for reference:
| Profile | Parameter set to `true` | Description |
| `-P minimal` | _default_ | Default profile without native access modules. |
| `-P all` | `cbdedicated` | All compat modules. |
| `-P cbdev` | `cbdev` | Only the dev-module, usually the latest. Might get removed on very stable versions, in favor of a dedicated module (!). |
* Jar files for the dedicated compat modules, which your local maven repository might be missing, can also be installed manually.
Example for Eclipse with embedded maven:
Add a new maven build run configuration, name it appropriately, e.g. ```Install CB 1.7.5```.

33
pom.xml
View File

@ -56,6 +56,28 @@
<module>NoCheatPlus</module>
</modules>
</profile>
<profile>
<id>cbdev</id>
<activation>
<property>
<name>cbdev</name>
<value>true</value>
</property>
</activation>
<modules>
<module>NCPBuildBase</module>
<module>NCPCommons</module>
<module>NCPCore</module>
<module>NCPCompatBukkit</module>
<!-- Non minimal below. -->
<module>NCPCompatCBDev</module>
<!-- Non minimal above. -->
<module>NCPCompatProtocolLib</module>
<module>NCPCompatGlowstone</module>
<module>NCPPlugin</module>
<module>NoCheatPlus</module>
</modules>
</profile>
<profile>
<id>minimal</id>
<activation>
@ -79,14 +101,9 @@
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
</repository>
<!-- <repository>
<id>md_5-releases</id>
<url>http://repo.md-5.net/content/repositories/releases/</url>
</repository>
<repository>
<id>md_5-snapshots</id>
<url>http://repo.md-5.net/content/repositories/snapshots/</url>
</repository> -->
<!-- <repository> <id>md_5-releases</id> <url>http://repo.md-5.net/content/repositories/releases/</url>
</repository> <repository> <id>md_5-snapshots</id> <url>http://repo.md-5.net/content/repositories/snapshots/</url>
</repository> -->
<repository>
<id>bukkit</id>
<url>http://repo.bukkit.org/content/groups/public/</url>