File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes m2eclipse and Maven Multi Module Projects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "m2eclipse and Maven Multi Module Projects" Watch "m2eclipse and Maven Multi Module Projects" New topic
Author

m2eclipse and Maven Multi Module Projects

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: m2eclipse and Maven Multi Module Projects
 
Similar Threads
Sonar - Native Plugin
Maven assembly descriptor question
Google Web Toolkit (GWT): Practice
maven2 expert : explode war which is in a ear and then bundle war then bundle ear
Maven dependancy unpack