It's not a secret anymore!*
The moose likes Ant, Maven and Other Build Tools and the fly likes I developed my own maven plugin how can I use it? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "I developed my own maven plugin how can I use it?" Watch "I developed my own maven plugin how can I use it?" New topic

I developed my own maven plugin how can I use it?

Marcelo Tataje
Ranch Hand

Joined: Jan 31, 2011
Posts: 64

I developed my own maven plugin(jar application), this plugin has been made to attend requirements of a specific application(dynamic web project). I also included this using the plugin tag on my project's pom.xml and I don't have any problems deploying my maven project since the plugin is in my local computer. But my main web application can be downloaded and tested from different parts and different computers so they would need to also to download the plugin project and run mvn install and then after that, execute mvn install with my main project, I don't know if there's a way in which everyone who downloads my application just run the mvn install with the mvn project and download the plugin into the repository. My plugin project which is separated from my main project because it is just a plugin, is located on a subversion, I don't know if there's a way in which I could include the plugin and reference the svn url or something like that, for example my web applicattion pom.xml includes this:

apconfig-plugin is the name of the plugin I developed using the MOJO api. When I execute my web application pom.xml I don't have any problem because I have the application in my repo. But when I go to another computer and execute the pom.xml it throws exceptions because the plugin app is not found.
Any idea on how to solve this? please, I would be very grateful. Thanks in advance.
Peter Johnson

Joined: May 14, 2008
Posts: 5812

You need a centralized repository manager, such as Nexus or Artifactory. Then you would deploy your plugin to the centralized repository and everyone would get it from there.

The only other option is to have everyone install the plugin manually in their local repository using install:install-file.

JBoss In Action
I agree. Here's the link:
subject: I developed my own maven plugin how can I use it?
Similar Threads
Strange problem - works on maven glassfish but not on Tomcat
Filtering problem using maven-read-properties plugin in pom.xml file
Could not resolve dependencies for maven project
Incorrect hibernate version or maven ignore and didn't download hibernate jar file.
how to make the plugin jar to take the specified version from the pom.