Reputation: 660
I'm building a Java Project MaterialsDep
that is a plugin for project craftbukkit
[loaded in my workspace and a direct dependency of MaterialsDep of type jar and scope compile]. Looking at MaterialsDep's pom's dependency hierarchy in eclipse all jars needed by CB show up as resolved and listed correctly. However running mvn dependency:copy-dependencies
on project AP only copies direct dependencies and nothing else.
Running dependency:tree shows:
[INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ MaterialsDep ---
[INFO] MaterialsDep:MaterialsDep:jar:0.0.1-SNAPSHOT
[INFO] +- org.bukkit:craftbukkit:jar:1.3.1-R1.1-SNAPSHOT:compile
[INFO] +- org.pircbotx:pircbotx:jar:1.7:compile
[INFO] \- org.bukkit:bukkit:jar:1.3.1-R1.1-SNAPSHOT:compile
which are the direct dependencies.
How should I go about ensuring that craftbukkit
's dependency are recognized and copied ?
[EDIT]
dependency:tree
for craftbukkit:
[INFO] org.bukkit:craftbukkit:jar:1.3.1-R1.1-SNAPSHOT
[INFO] +- org.bukkit:bukkit:jar:1.3.1-R1.1-SNAPSHOT:compile
[INFO] +- org.bukkit:minecraft-server:jar:1.3.1:compile
[INFO] +- net.sf.jopt-simple:jopt-simple:jar:3.2:compile
[INFO] +- jline:jline:jar:2.6:compile
[INFO] +- org.fusesource.jansi:jansi:jar:1.8:compile
[INFO] +- org.xerial:sqlite-jdbc:jar:3.7.2:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.14:compile
[INFO] +- org.avaje:ebean:jar:2.7.3:provided
[INFO] | \- javax.persistence:persistence-api:jar:1.0:provided
[INFO] +- org.yaml:snakeyaml:jar:1.9:provided
[INFO] +- com.google.guava:guava:jar:10.0:provided
[INFO] | \- com.google.code.findbugs:jsr305:jar:1.3.9:provided
[INFO] +- commons-lang:commons-lang:jar:2.3:provided
[INFO] +- junit:junit-dep:jar:4.10:test
[INFO] +- org.hamcrest:hamcrest-library:jar:1.2.1:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.2.1:test
[INFO] \- com.google.code.gson:gson:jar:2.1:compile
Upvotes: 2
Views: 2007
Reputation: 328840
By configuring the dependency
plugin correctly. The property excludeTransitive defines whether transitive dependencies will be ignored or not. Make sure it's value is false
.
mvn help:effective-pom
might help to find out how the plugin is configured.
[EDIT] copy-dependencies
will only copy what dependency:tree
shows. As you can see in the output above, craftbukkit
itself doesn't have any further dependencies. My guess is that all dependencies in craftbukkit
's POM have <optional>true</optional>
.
If that is the case, then you will have to mention all of them again in your POM.
Upvotes: 0