Reputation: 15891
I have a maven project
, which has lots of data-streaming processors and drop-wizard services.
Amongst them, are db-source
- holds all the DAO
s and Entities
& client-source
- holds external services end-points, these are used by all the apps in the project
.
So far, dependency of these are individually added by each child app in their own pom and its now supposed to me moved to common versioning using <dependencyManagement>
on project
s POM.
This is the project structure on the surface
+ project
+ db-source - pom.xml => picks version from build.properties
+ client-source - pom.xml => picks version from build.properties
+ fabric - pom.xml => has db and client and there versions are picked from project_POM
+ the_pain_repo - pom.xml => uses fabric and picks its version from project_POM
+ project_POM
project_POM
contains the <dependencyManagement>
for versions of db-source
and client-source
which is being used in fabric
and other repos ( the_pain_repo
is one of the sample repos mentioned )
So, if you observe, <dependencyManagement>
is as below
==> fabric -> project_POM
==> the_pain_repo -> fabric -> project_POM
Now, fabric builds fine after picking version from project_POM
but the_pain_repo
throws error that it cant pick db-source
( which is coming from fabric
) version.
Error:
[ERROR] Failed to execute goal on project inventory-processor: Could not resolve dependencies for project x.y.z:the_pain_repo:jar:1.7.4-SNAPSHOT: The following artifacts could not be resolved: x.y.z:db-source:jar:${db.source.version},
x.y.z:client-source:jar:${client.source.version}: Could not find artifact x.y.z:client-source:jar:${client.source.version} in systems-artifactory (http://artifactory.systems.com/content/groups/public) -> [Help 1]
[ERROR]
values as in Jenkins :
Root POM : the_pain_repo/pom.xml
Properties File Path : the_pain_repo/build.properties
Upvotes: 0
Views: 490
Reputation: 149
Deploy parent pom to your maven repository (or artifactory). You can try this out by doing a mvn clean install
or mvn -N clean install
(for parent module only) to deploy this to your local .m2
Upvotes: 1