[ https://issues.apache.org/jira/browse/ISIS-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Haywood updated ISIS-1977:
------------------------------
Notes while trial and error (this was done on incode-platform, but same principles apply for any multi-module project)
1
<configuration>
<flattenMode>bom</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<parent>resolve</parent>
<name>resolve</name>
<description>resolve</description>
<url>resolve</url>
<scm>resolve</scm>
<developers>resolve</developers>
<properties>resolve</properties>
<dependencyManagement>resolve</dependencyManagement>
<dependencies>resolve</dependencies>
<profiles>resolve</profiles>
</pomElements>
</configuration>
2
<configuration>
<flattenMode>bom</flattenMode>
<updatePomFile>true</updatePomFile>
<!--
<pomElements>
<parent>resolve</parent>
<name>resolve</name>
<description>resolve</description>
<url>resolve</url>
<scm>resolve</scm>
<developers>resolve</developers>
<properties>resolve</properties>
<dependencyManagement>resolve</dependencyManagement>
<dependencies>resolve</dependencies>
<profiles>resolve</profiles>
</pomElements>
-->
</configuration>
3.
<configuration>
<flattenMode>bom</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<parent>resolve</parent>
</pomElements>
<!--
<name>resolve</name>
<description>resolve</description>
<url>resolve</url>
<scm>resolve</scm>
<developers>resolve</developers>
<properties>resolve</properties>
<dependencyManagement>resolve</dependencyManagement>
<dependencies>resolve</dependencies>
<profiles>resolve</profiles>
-->
</configuration>
4.
<configuration>
<flattenMode>bom</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<parent>resolve</parent>
<name>resolve</name>
<description>resolve</description>
<url>resolve</url>
<scm>resolve</scm>
<developers>resolve</developers>
<properties>resolve</properties>
</pomElements>
<!--
<dependencyManagement>resolve</dependencyManagement>
<dependencies>resolve</dependencies>
<profiles>resolve</profiles>
-->
</configuration>
7. no real difference from 4 for bom.
<configuration>
<flattenMode>bom</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<parent>resolve</parent>
<name>resolve</name>
<description>resolve</description>
<url>resolve</url>
<scm>resolve</scm>
<developers>resolve</developers>
<properties>resolve</properties>
<dependencies>resolve</dependencies>
</pomElements>
<!--
<dependencyManagement>resolve</dependencyManagement>
--> <profiles>resolve</profiles>
</configuration>
-----------------------------------------------------------------------------------------------------
5. NO!!
<configuration>
<flattenMode>bom</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<parent>resolve</parent>
<name>resolve</name>
<description>resolve</description>
<url>resolve</url>
<scm>resolve</scm>
<developers>resolve</developers>
<properties>resolve</properties>
<profiles>resolve</profiles>
</pomElements>
<!--
<dependencyManagement>resolve</dependencyManagement>
<dependencies>resolve</dependencies>
-->
</configuration>
6. NO!!
<configuration>
<flattenMode>bom</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<parent>resolve</parent>
<name>resolve</name>
<description>resolve</description>
<url>resolve</url>
<scm>resolve</scm>
<developers>resolve</developers>
<properties>resolve</properties>
<dependencyManagement>resolve</dependencyManagement>
</pomElements>
<!--
<dependencies>resolve</dependencies>
--> <profiles>resolve</profiles>
</configuration>
8: same as 2, but -Dflatten (in profile); still only in incode-parent.
- rationale: we don't want regular pom's that inherit from incode-parent to have flattening applied
9: same as 3 but also properties, but in -Dflatten profile.
<configuration>
<flattenMode>bom</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<parent>resolve</parent>
<properties>resolve</properties>
</pomElements>
<!--
<name>resolve</name>
<description>resolve</description>
<url>resolve</url>
<scm>resolve</scm>
<developers>resolve</developers>
<dependencyManagement>resolve</dependencyManagement>
<dependencies>resolve</dependencies>
<profiles>resolve</profiles>
-->
</configuration>
10: as 9, but removes <properties>. For module-base, configures -Dflatten profile as 'defaults', ie simply:
<configuration>
<flattenMode>defaults</flattenMode>
<updatePomFile>true</updatePomFile>
</configuration>
10 (overwrites above), for module-base, add in: - NO
<configuration>
<flattenMode>defaults</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<name>resolve</name>
<description>resolve</description>
</pomElements>
</configuration>
11 for module-base, change to bom - NO
<configuration>
<flattenMode>bom</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<name>resolve</name>
<description>resolve</description>
</pomElements>
</configuration>
-- adds in a url, developers, license, scm, properties
12 for module-base, change to oss - NO
<configuration>
<flattenMode>oss</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<name>resolve</name>
<description>resolve</description>
</pomElements>
</configuration>
-- removes just properties
13 for module-base, back to bom and add: - YES
<configuration>
<flattenMode>defaults</flattenMode>
<updatePomFile>true</updatePomFile>
<pomElements>
<name>resolve</name>
<description>resolve</description>
<dependencies>resolve</dependencies>
</pomElements>
</configuration>
-- seems to flatten test dependencies also.
Post by Dan Haywood (JIRA)Improve flattening for -Drevision=...
-------------------------------------
Key: ISIS-1977
URL: https://issues.apache.org/jira/browse/ISIS-1977
Project: Isis
Issue Type: Improvement
Components: Core
Affects Versions: 1.16.2
Reporter: Dan Haywood
Assignee: Dan Haywood
Priority: Minor
Fix For: 1.16.3
Currently flatten-maven-plugin is inherited from the parent pom to all children, and this results in ,<dependencyManagement> being
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)