springmavenspring-mvcmaven-package

mvn package puts a billion jar files in my /target folder. Now what?


I'm running mvn package from command line which leaves my /target folder containing a billion jar files. Now how do I take that and run it in my vfabric tc server from command line?

Basically, find ./ -iname "*jar*" shows:

./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/log4j-1.2.15.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/antlr-2.7.7.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/aopalliance-1.0.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/aspectjrt-1.6.10.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/commons-dbcp-20030825.184428.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/commons-fileupload-1.3.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/commons-io-2.2.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/commons-lang3-3.1.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/dom4j-1.6.1.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/hibernate-commons-annotations-4.0.1.Final.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/hibernate-core-4.2.1.Final.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/hibernate-entitymanager-4.2.1.Final.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/jackson-core-asl-1.9.13.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/jackson-mapper-asl-1.9.13.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/javassist-3.15.0-GA.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/javax.inject-1.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/jboss-logging-3.1.0.GA.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/jboss-transaction-api_1.1_spec-1.0.1.Final.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/jcl-over-slf4j-1.6.6.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/json-path-0.9.1.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/json-smart-1.2.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/jstl-1.2.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/ognl-3.0.6.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/opencsv-2.3.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/postgresql-9.3-1100-jdbc41.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/slf4j-api-1.6.6.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/slf4j-log4j12-1.6.6.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-aop-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-asm-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-beans-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-context-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-context-support-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-core-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-expression-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-jdbc-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-security-config-3.2.0.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-security-core-3.2.0.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-security-web-3.2.0.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-tx-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-web-3.2.6.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/spring-webmvc-3.1.1.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/thymeleaf-2.1.2.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/thymeleaf-spring3-2.1.2.RELEASE.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/tomcat-jdbc-7.0.47.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/tomcat-juli-7.0.47.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/xpp3_min-1.1.3.4.O.jar
./target/hp-dsat-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/xstream-1.2.jar

I don't see a specific jar file for my project though. Should I see something like hp-dsat.jar?


Solution

  • there should be a WAR or JAR file in the target folder named hp-dsat-1.0.0-BUILD-SNAPSHOT. That would be the one you put into the webapps folder.

    You have 2 choices, either copy the entire hp-dsat-1.0.0-BUILD-SNAPSHOT folder or the WAR file.