Op Sun, 18 Jan 2015 00:01:16 +0100 schreef Jörg Hohwiller <jo...@j-hohwiller.de>:

Hi there,

I would like to open a discussion about the design of flatten-maven-plugin.
Important issue is http://jira.codehaus.org/browse/MOJO-2041
Therefore I already applied the old code back onto trunk and did some
rework.

1. I will remove "build" and "parent" support as this really makes no
sense. I assume that there will only be pro arguments but let me know
otherwise.

Parent yes, build must stay in case in a plugin has <extensions>true</extensions>. This is required in case of custom packaging types.


2. As we now support additional elements such as properties or
dependencyManagement as part of the flattened POM there is an impact on
the flatten mode "minimum" that will also keep these elements. This
breaks a regression and a changed the verify.groovy. IMHO this is valid
because that is what "minimum" is actually about but there might be
other positions. However, I guess that nobody every reasonable used
"minimum".
You should split the requirements. For non-pom projects you know for sure that it cannot be used as a parent, so properties and dependencyManagement are useless. In case of a pom project it becomes a bit trickier. You probably want to keep it as is.


3. For the actual goal of deploying a BOM but making use of
flatten-maven-plugin, I discovered the need to use the original
dependencyManagement instead of the effective dependencyManagement
(where properties and als imports are completely resolved). For the
moment I changed this behaviour in case bom is the flatten mode.
However, I personally think that we should offer the possibility to
configure pomElements in such a way that you can configure if an element
is used from effective POM (default if configured empty) or from
original POM:

<pomElements>
  <dependencyManagement>originalPom</dependencyManagement>
  <properties>effectivePom</properties>
</pomElements>

or as attributed approach what I would prefer:

<pomElements>
  <dependencyManagement pom="original"/>
  <properties pom="effective"/>
</pomElements>

you can't use attributes unless you do the parsing yourself. I'd still love to see ITs showing the usage, it is still not there.


I know this looks all complicated but IMHO this is the only way to give
the flexibility for the upcoming real life needs. I also have a case
where I would like to use the original properties to prevent that
internal and secret properties from the parent POM get inherited into
the flattened POM that gets deployed.

BTW: Anything new about http://jira.codehaus.org/browse/HAUS-2412?

Thanks
  Jörg


Thanks,
Robert

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to