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:
brought in via: POM
While building project:
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!
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.