It’s not what you where asking, but many rules can  and should be put into a 
common parent - helps with local builds as well.

Maven enforcer can use rules on the command line it seems: 
https://issues.apache.org/jira/plugins/servlet/mobile#issue/MENFORCER-142

Besides that some static analysis with your own plugin or tools like jqassist 
can be run in CI Jobs also.

Gruß
Bernd

--
https://Bernd.eckenfels.net

________________________________
Von: Martin D'Aloia <martindal...@gmail.com>
Gesendet: Mittwoch, März 27, 2019 6:46 PM
An: users@maven.apache.org
Betreff: Enforce rules defined outside the pom.xml or its parent

Hello,

Is it possible to enforce a set of rules defined outside the pom.xml being
built (i.e. not defined in the current pom or in a parent pom)?

Ideally, I would like to define maven-enforcer-plugin rules in an external
pom.xml and evaluate them over the pom.xml being build in order to not
force to use a specific parent pom.

*CONTEXT:*
I'm defining a CI/CD pipeline and I would like to enforce a set of rules
over the pom.xml in order to be deployed to our internal repository (sort
of validations performed to publish to Maven Central).

Thanks in advance for any suggestions!

Reply via email to