Exception in thread “main” java.lang.AssertionError

I had the same issue. Forcing maven-compiler-plugin to use javac helped me discover actual compilation errors. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId>   <configuration>     <forceJavacCompilerUse>true</forceJavacCompilerUse>   </configuration> </plugin> More details can be found in this Maven Compiler Plugin bug report Edit: the issue is fixed in maven-compiler-plugin version 3.10.1

How to execute a maven plugin twice with different property

Given the simple Maven Source Plugin configuration (as an example) you have a shared configuration across all of its executions (outside the executions element) and then a custom configuration per each execution, for the same phase, as requested by your question: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>2.4</version> <configuration> <includePom>true</includePom> </configuration> <executions> <execution> <id>test-id1</id> <phase>verify</phase> <goals> … Read more

Different maven compiler versions for test and main

If you want to set compliance to the relevant Java version, you can configure the compiler plugin for each execution. Assuming Maven is using a JDK at least as current as the highest version you specify. By using properties you can override that configuration on the commandline or in a child if needed: <plugin> <groupId>org.apache.maven.plugins</groupId> … Read more

“mvn dependency:tree” – is there an equivalent available for “verbose” output?

You can use mvn dependency:tree -X which produces the debug output. Otherwise stated in the documentation about verbose – Notice this feature actually uses Maven 2 algorithm and may give wrong results when used with Maven 3. Edit: As pointed by Brad in the comments, the verbose flag has been reintroduced for the 3.2.0 release … Read more

What is the difference between “Maven Install” and “Maven Build” with M2Eclipse?

First of all, build is not a phase in the standard Maven lifecycles, whereas install is one. mvn install will invoke all the phases up to the phase install, which generally consists of compiling the source code, packaging the project and installing it in the local repository. To be clear, we’re talking about what M2Eclipse … Read more