• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

m2eclipse and Maven Multi Module Projects  RSS feed

Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the m2eclipse plugin in Eclipse and try to develop a multi-module Maven project, which I then want to package to a distribution directory.
I would like to ask if anyone had any success with the following, or similar, scenario:
- One Parent Maven project.
- One Library Maven module in the Parent project.
- One Application Maven module in the Parent project.
- A dependency from the Application module to the Library module.
- The following plugins in the Application module:

When trying to package the Application module, I get the following error:

The following mojo encountered an error while executing:
Group-Id: org.apache.maven.plugins
Artifact-Id: maven-dependency-plugin
Version: 2.0
Mojo: copy
brought in via: POM

While building project:
Group-Id: com.ivan.maven_multimodule
Artifact-Id: Application
Version: 0.0.1
From file: /Users/Shared/EclipseWorkspace/Parent/Application/pom.xml
Reason: Error copying artifact from /Users/Shared/EclipseWorkspace/Parent/Application/target/classes to /Users/Shared/EclipseWorkspace/Parent/Application/target/dist/classes

Many thanks in advance!
Ivan Krizsan
Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ivan!
I have been thinking a little about your problem.
I think the problem is caused by the artifact not being packaged when trying to copy it in the packaging phase.
If I have understand it correct, this is something that should be done in the assembly phase, correct?
I have myself encountered another problem; if I have a project A that has a dependency to project B and the project B artifact is NOT installed in the repository, the project B JAR will not show up in the project A JAR manifest. I don't want a binary dependency on the project B, but a dependency within Eclipse, so that, as soon as I change the project B, project A will use the latest version of project B when being executed in the Eclipse workspace.
At the same time, I want to be able to automatically create a distribution directory or archive, with all dependecies (classpaths) set.
Good luck!
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!