Make Maven to copy dependencies into target/lib

This works for me: <project> … <profiles> <profile> <id>qa</id> <build> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <phase>install</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/lib</outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>

run main class of Maven project [duplicate]

Try the maven-exec-plugin. From there: mvn exec:java -Dexec.mainClass=”com.example.Main” This will run your class in the JVM. You can use -Dexec.args=”arg0 arg1″ to pass arguments. If you’re on Windows, apply quotes for exec.mainClass and exec.args: mvn exec:java -D”exec.mainClass”=”com.example.Main” If you’re doing this regularly, you can add the parameters into the pom.xml as well: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> … Read more

Making Maven run all tests, even when some fail

From the Maven Embedder documentation: -fae,–fail-at-end Only fail the build afterwards; allow all non-impacted builds to continue -fn,–fail-never NEVER fail the build, regardless of project result So if you are testing one module than you are safe using -fae. Otherwise, if you have multiple modules, and if you want all of them tested (even the … Read more

Is there a simple way to remove unused dependencies from a maven pom.xml?

The Maven Dependency Plugin will help, especially the dependency:analyze goal: dependency:analyze analyzes the dependencies of this project and determines which are: used and declared; used and undeclared; unused and declared. Another thing that might help to do some cleanup is the Dependency Convergence report from the Maven Project Info Reports Plugin.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)