I have a project in eclipse (let's call it project A) which is a Maven project. It is a library which is used by other projects.
And I have project B which is also a Maven project and it depends on project A. In project B's pom.xml I have added a dependency referencing project A, and it builds and runs perfectly from Eclipse.
Now I want to build an executable JAR from project B. Previously I have done this by adding the maven-assembly-plugin
plugin to the pom.xml and then running mvn assembly:single
from the command line.
When I run mvn assembly:single
command within project B it throws an error saying it cannot find project A.
Now what would be the best way to build the executable JAR for B? Is there a way to build it from Eclipse (and presumably it will handle the dependency references as it has been doing) or is there a way to tell Maven that project A is local and it should build project B using the local project A.