I created a maven plugin and tested it locally and it worked fine. So I placed it on a local repository where we have other maven artifacts and attempted to use this plugin on a second machine. On this second machine, I did the following:
- added the plugin repository info to the settings.xml file - on the target project's pom, I added the plugin under the <build>/<plugins> node - on the target project's pom, I added the the artifact under the <dependencies> node I proceeded to compile the project and use my plugin: mvn clean install -U mvn myPrefix:goal Maven concluded that it could not resolve some dependency for my project. So I tinkered a lot with it. And this is where I'm at now (all below is on the machine that wants to use this plugin): - I created a new version of my plugin, which I confirmed is identical to the original, except in version value. My original is 1.0. The new version is 1.1. - I updated the project's POM to use myPlugin version 1.1 - re-executed the maven commands above and everything worked great. - to test it out on a new install, i deleted myPlugin from the .m2/repository - i re-run the mvn commands hoping everything will resolve-- it doesn't - I update the POM file to go back to plugin version 1.0. - I rerun the mvn commands, and everything works again - if I delete the 1.0 plugin from the repository, and rerun the mvn command, all will fail. - I have to update the POM again to use 1.1 in order to get it to work In short, I'm stuck in a vicious cycle. Why do I need to update the POM of a project in order to get my plugin to be recognized? This is my first plugin so maybe there's something I'm missing. Is there an initializer or something I'm missing? Maybe a flag I need to pass to Maven? I've been stuck on this one for a few hours...any help would be greatly appreciated. Oh, and for kicks, I created a third version, 1.2, to see if there was a dependency between 1.0 and 1.1. Nope...it appears that the only thing I need is to see an updated in the projects pom.xml file. -- View this message in context: http://maven.40175.n5.nabble.com/Custom-plugin-will-not-resolve-on-first-try-tp5711894.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
