Home > Net >  How to run a maven plugin without including it in pom.xml?
How to run a maven plugin without including it in pom.xml?

Time:05-31

I want to run the following plugin, but without having to include it into my pom.xml:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>versions-maven-plugin</artifactId>
</plugin>

Reason: I have a project that I build and deploy from gitlab-ci. I want to create a job stage that checks for new version regarding my pom.xml definition. But the check should not be part of the usual project, thus I'm trying to include this version check plugin only in the gitlab stage, and not in my code.

Is that possible to use a maven plugin on the fly onto another pom?

CodePudding user response:

No problem.

You can run

mvn versions:update-parent

for e.g. the update-parent goal.

or if you want a fixed version, you can run

mvn org.codehaus.mojo:versions-maven-plugin:2.11.0:update-parent

  • Related