I recently downloaded the source for MassiveCore.Factions
off GitHub (Downloaded as ZIP
) and I imported this Project as an "Existing Maven
Project" in Eclipse. I edited what I needed from the project but I am not sure what is the best practice to add dependencies
to this project.
The goal is to have the Jar
file which is compiled placed in the directory server/plugins/
along with other Jar
files (some which this project depends on). This is the POM
that is included with the GitHub download:
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>
<name>Factions</name>
<url>http://www.massivecraft.com/factions</url>
<groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId>
<version>2.7.5</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<defaultGoal>install</defaultGoal>
<finalName>Factions</finalName>
<sourceDirectory>${basedir}/src/main/java/</sourceDirectory>
<resources>
<resource>
<targetPath>.</targetPath>
<directory>${basedir}/src/main/resources/</directory>
<filtering>true</filtering>
<includes>
<include>*.yml</include>
<include>*.md</include>
<include>*.txt</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.massivecraft</groupId>
<artifactId>MassiveCore</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.dthielke</groupId>
<artifactId>HeroChat</artifactId>
<version>5.6.7</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/HeroChat-5.6.7.jar</systemPath>
</dependency>
<dependency>
<groupId>com.griefcraft</groupId>
<artifactId>LWC</artifactId>
<version>4.4.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/LWC-4.4.0.jar</systemPath>
</dependency>
</dependencies>
At first glance I have a few questions regarding this POM
file and would like input:
Some of the
dependencies
include aSystem Path
that should be included in a/lib
file for compile time, but for runtime, some of them are included in the same directory as theFactions
plugin itself. Can I just assume that everything will work out in runtime if I leave the files as is according to thePOM
in compile time?I need to add an extra
dependency
namedbukkit
. There are a fewbukkit Jars
in the server files and will need to test which one it is. However, there is only one that resides in theserver/plugins/
directory. If it isn't in that directory, how would I go about trying to compile then if theJar
file will eventually be in a different directory.There is a dependency for
MassiveCraft.MassiveCore
in thePOM
file but doesn't include aSystem Path
nor was it in the GitHub download. I have the file but how would I handle this situation based on this dependency?