How-to articles, tricks, and solutions about MAVEN-2

Can I add jars to Maven 2 build classpath without installing them?

Yes, you can add jars to the Maven build classpath without installing them.

How can I create an executable/runnable JAR with dependencies using Maven?

To create an executable JAR with dependencies using Maven, you can use the maven-assembly-plugin. This plugin allows you to package your project and its dependencies into a single JAR file.

How do I tell Maven to use the latest version of a dependency?

To tell Maven to use the latest version of a dependency, you can use the [RELEASE] or [LATEST] version range in the <version> element of the dependency in your pom.xml file.

Including dependencies in a jar with Maven

To include dependencies in a JAR file with Maven, you can use the maven-assembly-plugin to create an assembly that includes all the dependencies of your project.

Run a single test method with maven

To run a single test method with Maven, you can use the surefire:test goal and specify the fully-qualified name of the test class and the method name using the test and method properties, respectively.