|
|
maven build dependencies in STS multiple projects
I get build dependancy errors across projects, when using the Spring Templates.
I have a JPA project with a dependency upon a utility Jar project (both via STS Spring Templates). The utility jar is listed as a dependancy in the JPA pom amp; is listed under the 'Maven Dependencies' library in the Package Explorer. The JPA amp; utility jar projects have 'Dependency Management' enabled amp; 'automatically update dependencies from Maven pom.xml' ticked.
The utility jar builds successfully, but when I build the JPA project I get quot;[INFO] Failed to resolve artifact. Missing: UtilityProject:utilityjar:jar:1.0.0.CI-SNAPSHOTquot;. All Ids are correct, amp; poms are were all built by STS (except for edit below).
It probably finger trouble - But how may I diagnose / solve the problem?
The following sequence also fails with same error.
Create 2 Spring utility jar projects using the STS templates but with differing top level packages.
I get an eclipse build error quot;Could not calculate build plan: Could not find artifact com..bundlor:com..bundlor. maven:jar:1.0.0.RELEASE in Codehaus ()quot; The only way I can resolve this is by deleting plugin reference quot;com..bundlor:com..bundlor .maven:1.0.0.RELEASEquot; in the pom.
Update the poms so that jars are physically created. Update the pom to establish the dependancy of one project on the other. I need to restart STS before the dependancy appears in the project explorer view. Then modify one of the projects, so that the (provided sample) java files imports amp; uses a class in the other project. mvn build (package) the base project - this is okay. Attempt the mvn Build the dependent project, this fails with missing artifact reference. |
|