Please discuss issues and tips related to Maven

+3 votes
asked May 14, 2014 in SzolgInt by szarnyasg (251 points)  

1 Answer

+1 vote
answered May 15, 2014 by cseppento (294 points)  
edited May 17, 2014 by cseppento

We have encountered a Maven + Eclipse m2e bug when building a fat JAR. Environment and build plug-ins:

  • Windows 8.1 64bit (Lajos), Windows 8 64bit (Ágnes), Windows 7 64 bit (Noémi), Ubuntu 12.04 64 bit (Lajos)
  • Eclipse 4.3 64 bit
  • maven-eclipse-plugin 2.9
  • maven-compiler-plugin 3.1 (with Oracle JDK 1.7 both Windows and Linux)
  • maven-assembly-plugin 2.4 (configuration: jar-with-dependencies)

The issue is independent from the project dependencies

Reproduction:

  • Create project with the following settings and at least on dependency (e.g.: Apache Commons Lang3)
  • Execute target "clean install" from Eclipse

Error: Moho Failure

Resolution:

  • Quit Eclipse
  • Remove the HOME/.m2 directory
  • Start Eclipse, let it to refresh the repositories
  • maven clean install
  • Error again
  • Quit Eclipse
  • Remove the HOME/.m2 directory
  • Start Eclipse, let it to refresh the repositories
  • maven clean install
  • Now it works and will not break

Please note that the resolution did not work in one of the 10-12 cases. After the "mass encounter" of this problem we avoided to create additional projects.

Ágnes Barta, Lajos Cseppentő, Noémi Szilvásy

...