How to ignore a Maven plugin -
we have groupid maven plugins:
com.company.maven.plugins
unfortunately, when created first plugin in groupid, used wrong naming convention.
maven-myplugin-plugin
the 1.x versions of plugin used name. when realized wrong changed name meet correct convention.
myplugin-maven-plugin
then updated version 2.x.
in local settings.xml file use plugingroups
access plugins command line. particular plugin not have specified in pom file.
unfortunately, when try access plugin command line without scoping name latest version of incorrect naming convention. so, 1.x version.
can tell maven ignore maven-myplugin-plugin
artifacts when accessing command line (i.e. mvn myplugin:mygoal
)?
some projects still use old 1.x plugins, don't want delete them our repository. also, using @ least maven 3.0.3.
it somehow seems maven3 resolves prefixes plugins in order of
1. maven-myplugin-plugin 2. myplugin-maven-plugin 3. ... hard-wired groups ...
following official naming convention should other way round imho. nevertheless, think not have chance fixed. tried set of things, playing around goalprefix in maven-plugin-plugin config. installing new version of deprecated-named plugin goalprefix did not work. guess 1 thing defining prefix correctly-named plugin, e.g.:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-plugin-plugin</artifactid> <version>3.2</version> <configuration> <skiperrornodescriptorsfound>true</skiperrornodescriptorsfound> <goalprefix>myplugin2</goalprefix> </configuration> </plugin>
another approach adjust old plugin's pom.xml, renaming different. imply colleagues need different execute different mvn command. or can rename current plugin - similar results.
if there better solution, interested!
Comments
Post a Comment