-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep parent node #78
Comments
You could try something like:
https://github.com/apache/isis/blob/master/core/pom.xml#L2391
This pom is the parent of a multi-module build, works ok I think. The leaf
modules get by with:
https://github.com/apache/isis/blob/master/core/applib/pom.xml#L153
HTH
…On Wed, 26 Sep 2018 at 17:05, Niels Bertram ***@***.***> wrote:
When building a multi module project, parent elements are removed from
the flattened pom. We want to build a parent pom for downstream consumption
that inherits from an upstream pom which includes some profiles used for CI
tasks. Unfortunately with $(revision} in the way and ${project.version}
expanding too early and not to the right value if used in downstream poms,
we have to resort to a flatten process. Unfortunately flatten strips all
parent pom elements. Also tried PR #77
<#77> to keep the
parent but the code falls over when we import something with properties in
the dependency management section. Would it be possible to add a
configuration item to keep a property expanded parent element in the pom?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#78>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AA-9yQJV6sD40dW2JNKnqTB1leytufWFks5ue5e4gaJpZM4W64NC>
.
|
Yes that works great - thanks heaps. I thought I was going mental but just checked again ... not a single ittest has this syntax as example and I cannot find anything in the docs either. $ find . -name 'pom.xml' -type f -exec grep '<parent>resolve' {} +
$ Even seems to works with the |
You're welcome. I got there by trial and error. It's still not ideal, would
rather it was possible to just substitute ${revision} and leave everything
else verbatim, so I'm watching this repo for when the pr that purports to
do this is accepted/released.
…On Wed, 26 Sep 2018, 18:10 Niels Bertram, ***@***.***> wrote:
Yes that works great - thanks heaps. I thought I was going mental but just
checked again ... not a single ittest has this syntax as example and I
cannot find anything in the docs either.
$ find . -name 'pom.xml' -type f -exec grep '<parent>resolve' {} +
$
Even seems to works with the ${revision} in maven 3.5.4 ... need to do
some more testing but looks promising.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#78 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-9yThKpqAc4ZOxkyfIjFh0dOPKKxOuks5ue6bYgaJpZM4W64NC>
.
|
Hmm would that not just be a variation of a flatten mode? Looks like some ticker time is required :) |
Maybe our documentation is not so great but what you want can be done with flatten plugin from the beginning: |
@hohwille Unfortunately the documentation is pretty unclear at this topic. It documents the existence of Fortunately it's Java type is documented: org.codehaus.mojo.flatten.FlattenDescriptor. Here we see some set of setters. I suppose each setter becomes an child XML tag of
The example of POM with
So, currently the only way to know all possible inner tags and their values is to guess them based on Javadocs. If I understand it right, the generic approach to know what to put inside
I hope this will help someone who will find this issue as I did when I wondered what I actually can put inside |
When building a multi module project,
parent
elements are removed from the flattened pom. We want to build a parent pom for downstream consumption that inherits from an upstream pom which includes some profiles used for CI tasks. Unfortunately with$(revision}
in the way and${project.version}
expanding too early and not to the right value if used in downstream poms, we have to resort to a flatten process. Unfortunately flatten strips all parent pom elements. Also tried PR #77 to keep the parent but the code falls over when we import something with properties in the dependency management section. Would it be possible to add a configuration item to keep a property expanded parent element in the pom?The text was updated successfully, but these errors were encountered: