NetBeans allows you to manage the whole lifecycle of your java projects through the Maven plugin. If you want to deeply customize all the steps regarding the generation, installation and distribution of your library files relying on a Maven repository, you must prepare your building environment as follows:
- check the existence of a Maven plugin installed in NetBeans (with latest versions, it can be assumed to be satisfied)
- define a settings.xml file, specific for the user logged on the host
- define both pom.xml and nbactions.xml files, which are specific for the project and will be (eventually) committed to SVN
- configure the Maven plugin with appropriate options
- replace your original Maven Deploy Plugin library with the one I have conveniently modified
Remember that Maven uses two repositories, by default:
- a LOCAL one: C:\Users\my-user\.m2\repository
- a REMOTE one: http://repo.maven.apache.org/maven2
In addition, here comes into play the Artifactory repository you installed and configured using my previous post, which should be available at the URL:
http://my-server:8081/artifactory
In the following article you’ll learn how to use it as a true Maven repository directly from your NetBeans GUI! So, what you’re waiting for? Stop doing anything else and follow me, taking up the challenge! 😎