I have been told that the install goal should mean that my resulting jar file will have all required dependencies included into the deployment. This, however, doesn't appear to be working for me.
Here's my pom.xml:
<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> <groupId>org.zone.commandit</groupId> <artifactId>CommandIt</artifactId> <version>0.2</version> <name>CommandIt</name> <repositories> <repository> <id>bukkit-repo</id> <url>http://repo.bukkit.org/content/groups/public</url> </repository> <repository> <id>milkbowl-repo</id> <url>http://ci.herocraftonline.com/plugin/repository/everything/</url> </repository> </repositories> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.bukkit</groupId> <artifactId>bukkit</artifactId> <version>1.5.2-R1.0</version> <type>jar</type> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-io</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>net.milkbowl.vault</groupId> <artifactId>Vault</artifactId> <version>1.2.26-SNAPSHOT</version> <type>jar</type> <scope>provided</scope> </dependency> <dependency> <groupId>se.krka.kahlua</groupId> <artifactId>kahlua-cldc11</artifactId> <version>5.1_2.1.0</version> </dependency> <dependency> <groupId>se.krka.kahlua</groupId> <artifactId>kahlua-core</artifactId> <version>5.1_2.1.0</version> </dependency> <dependency> <groupId>se.krka.kahlua</groupId> <artifactId>kahlua-interpreter</artifactId> <version>5.1_2.1.0</version> </dependency> <dependency> <groupId>se.krka.kahlua</groupId> <artifactId>kahlua-j2se</artifactId> <version>5.1_2.1.0</version> </dependency> </dependencies> </project> From this, I expect a CommandIt-0.2.jar file with commons-io and the kahlua libraries (which are installed in the local repository). The bukkit and Vault dependencies should not be included as they are provided in the runtime environment.
However, upon inspecting the project jar file with 7zip, I find only META-INF and my own source code. What am I doing wrong?
installinstalls your artifact to the local repository, which is not something you need if you just want a package - depending on whether you have anything inintegration-test, eitherpackageofverifywill suffice.