You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by pi...@postfinance.ch on 2018/04/19 07:12:14 UTC
How to hide internal build details from deployed pom.xml ?
Hi
We have a maven project with many modules and a complex structure. The master pom inherited by all the modules is filled up with plugin configuration in pluginManagement. I'm looking for a way to hide these details from the pom.xml delivered with our artefacts: the applications using our libraries are not interested in the internal configuration of our components and all the details of our build. I think that the dependency information of the pom.xml should be sufficient for users of our libraries.
Is it possible to have a pom.xml generated and deployed with our artefacts which does not contain all this 'internal' stuff ? Or has someone an idea how we should structure our projects to achieve the same effect ?
Thanks in advance for any idea.
Regards,
Pierre
Remarque concernant la sécurité:
Ce courriel provenant de PostFinance est signé. Vous trouverez d'autres informations à ce sujet sous:
https://www.postfinance.ch/e-signature.
Ne divulguez jamais vos éléments de sécurité à des tiers.
Re: How to hide internal build details from deployed pom.xml ?
Posted by Eric B <eb...@gmail.com>.
Take a look at the maven-flatten-plugin. It can do exactly what you are
describing, reducing a pom to only the dependency definitions required.
Eric
On Thu, Apr 19, 2018, 5:24 PM , <pi...@postfinance.ch> wrote:
> Hi
>
>
>
> We have a maven project with many modules and a complex structure. The
> master pom inherited by all the modules is filled up with plugin
> configuration in pluginManagement. I’m looking for a way to hide these
> details from the pom.xml delivered with our artefacts: the applications
> using our libraries are not interested in the internal configuration of our
> components and all the details of our build. I think that the dependency
> information of the pom.xml should be sufficient for users of our libraries.
>
>
>
> Is it possible to have a pom.xml generated and deployed with our artefacts
> which does not contain all this ‘internal’ stuff ? Or has someone an idea
> how we should structure our projects to achieve the same effect ?
>
>
>
> Thanks in advance for any idea.
>
>
>
> Regards,
>
> Pierre
>
>
>
>
>
>
> Remarque concernant la sécurité:
> Ce courriel provenant de PostFinance est signé. Vous trouverez d'autres
> informations à ce sujet sous:
> https://www.postfinance.ch/e-signature.
> Ne divulguez jamais vos éléments de sécurité à des tiers.
>
Re: How to hide internal build details from deployed pom.xml ?
Posted by Laird Nelson <lj...@gmail.com>.
On Thu, Apr 19, 2018 at 9:24 PM <pi...@postfinance.ch> wrote:
> We have a maven project with many modules and a complex structure. The
> master pom inherited by all the modules is filled up with plugin
> configuration in pluginManagement. I’m looking for a way to hide these
> details from the pom.xml delivered with our artefacts
>
Bonjour,
This might be as simple as (a) having a grandparent pom.xml with your
corporate information etc., (b) having a parent pom.xml with your plugin
management, and (c) having a child/grandchild pom.xml for your project.
You can see an (arbitrary) example here:
https://github.com/microbean/microbean-helm/blob/v2.8.2.1.0.4/pom.xml#L9-L13.
This is the child/grandchild pom.xml.
Its parent pom.xml is here:
https://github.com/microbean/microbean-pluginmanagement-pom/blob/v5/pom.xml
Its grandparent pom.xml is here:
https://github.com/microbean/microbean-parent/blob/microbean-parent-pom-5/pom.xml
Best,
Laird
--
https://github.com/microbean