Click here to Skip to main content
15,946,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using NetBeans 7.4 RC1 to create Maven projects.

Let's say I create two Maven projects, named A and B, and a third named X which includes the other two projects as dependencies.

On building X Maven searches the local Maven repository (and the connected company-proxy) for the dependencies and obviously does not find any initially.

If I run the build command of NetBeans on projects A and B, it performs a maven install, which then installs the projects into my local repository. Now, when I build X it will find the dependency and all is well.

Is there a way to configure Maven (or NetBeans) to automatically build the dependencies (and install it to my local repository)? I know there's a solution to do this with POM Projects where the modules (in this case A, B and X I suppose) can be added to it, and the POM project specified as a parent in all the modules - this will allow me to select the "Build with Dependencies" option, which will then build all the modules in the POM project. But this is not a good solution if say project A is a utility project, used in many other projects.

Essentially what I'd like to avoid is building all the dependencies for a project every time I want to test my project; especially when I'm working on the project and its dependencies at the same time.

I hope I'm missing the point.
Posted

1 solution

I think you may be missing the point [or I am]

TTBOMK, once the dependencies are built for the first time then everything will look after itself. So there is no need to keep rebuilding all the projects all the time, the rebuilds are done as and when they are needed.
 
Share this answer
 
Comments
Thinus Prinsloo 27-Sep-13 2:32am    
With Maven it's not quite that simple. Not only should code be built, but it should also be installed into your local Maven repository, so that other projects using that code as dependency will get the latest version (automatically from the local repository).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900