We have an organizational parent POM deployed to Artifactory, com.lgc:master:1.0.0-SNAPSHOT. The top-level aggregator POM in each repo uses this as the parent, with <relativePath/>. Then the individual projects in that repo use the aggregator as the parent. In the com.lgc:master POM I would like to have something like this
<properties>
<globalProp1>defaultValue</globalProp1>
....
</properties>
<profiles>
<profile>
<id>product-properties</id>
<activation>
<file>${productName}.properties</file>
<activation>
<build>
<filters>
<filter>${productName}.properties</filter>
</filters>
</build>
</profile>
</profiles>
Each of these properties files would just be overriding the global defaults, and only when necessary. I want those properties files to be deployed to Artifactory as secondary artifacts to the com.lgc:master POM so that no matter what subfolder/repo someone is building in, it's consistent and predictable. I know how to do the deploy? but how do I specify the path to the properties files. Are secondary artifacts automatically retrieved or is there something special I need to setup?
Or if I'm going about this all wrong, feel free to say so and point me in the right direction [1].
Thanks,
-Justin
[1] - When I said the individual projects use the aggregator as the parent, you might suggest just putting the properties in the aggregator. The caveat here is that in a few places we have a mostly empty SVN repo with the aggregator POM, the folder structure, and a ton of svn:externals to the individual projects (so essentially an aggregator _repo_). We end up sometimes using a common branch of some of the projects in 2 or more aggregator repos because the only thing we would need to branch them for is to change the parent GAV, but we can't put a property reference in the parent section of the pom, so those projects only have the 'correct' aggregator POM GAV as the parent in at most one aggregator repo. So we can't reliably set properties in the aggregator POMs, so they have to be in either the com.lgc:master or directly in the jar|war|eclipse-plugin|etc POM files (which would be horrible to have all that redundancy) to be reliably set.
<properties>
<globalProp1>defaultValue</globalProp1>
....
</properties>
<profiles>
<profile>
<id>product-properties</id>
<activation>
<file>${productName}.properties</file>
<activation>
<build>
<filters>
<filter>${productName}.properties</filter>
</filters>
</build>
</profile>
</profiles>
Each of these properties files would just be overriding the global defaults, and only when necessary. I want those properties files to be deployed to Artifactory as secondary artifacts to the com.lgc:master POM so that no matter what subfolder/repo someone is building in, it's consistent and predictable. I know how to do the deploy? but how do I specify the path to the properties files. Are secondary artifacts automatically retrieved or is there something special I need to setup?
Or if I'm going about this all wrong, feel free to say so and point me in the right direction [1].
Thanks,
-Justin
[1] - When I said the individual projects use the aggregator as the parent, you might suggest just putting the properties in the aggregator. The caveat here is that in a few places we have a mostly empty SVN repo with the aggregator POM, the folder structure, and a ton of svn:externals to the individual projects (so essentially an aggregator _repo_). We end up sometimes using a common branch of some of the projects in 2 or more aggregator repos because the only thing we would need to branch them for is to change the parent GAV, but we can't put a property reference in the parent section of the pom, so those projects only have the 'correct' aggregator POM GAV as the parent in at most one aggregator repo. So we can't reliably set properties in the aggregator POMs, so they have to be in either the com.lgc:master or directly in the jar|war|eclipse-plugin|etc POM files (which would be horrible to have all that redundancy) to be reliably set.