I am developing a Maven 2.2.1 plugin that will leverage JAR file(s) that vary depending on the target runtime system.
These two examples describe the logic. 1) When the Maven plugin executes on a Linux box, it is going to fork off a Java application with a CLASSPATH that includes: a.jar and b.jar. 2) When the Maven plugin executes on a Windows box, it is going to fork off a Java application with a CLASSPATH that includes: x.jar and y.jar. The JAR files (i.e. a.jar, b.jar, x.jar, and y.jar) are private to the Maven plugin and not exposed to the Maven projects that use the plugin. I am trying to decide what is the best way to get the Maven plugin to access the JAR files (i.e. a.jar, b.jar, x.jar, and y.jar). Here are the options I am considering: 1) Add those JAR files as resources of the Maven plugin. 2) Add those JAR files to the Nexus repository and the Maven plugin downloads the JAR files via their GAV. 3) Add those JAR files to the Nexus repository and make all JAR files as dependencies on my plugin. The plugin will build up the CLASSPATH by parsing thru its dependencies. I do not like option 1), because I actually have multiple Maven plugins that are going to need to leverage the exact same functionality; and I do not want to store the same JAR files as resources of multiple plugins. I do not like option 2), because I am not sure of the best way to do this. I think that option 3) is probably the best solution, but in a way, I think option 2 might be a little cleaner. Q. Has anyone implemented option 2)? If so, could you provide some insight on how to do that? Thanks in advance, Bob *** ******* This message contains information which may be confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message.