Question

I am working from Netbeans-8 & Maven. I've never worked with Maven before...

I am building two projects. Project1 is a dependency of Project2.

If I make changes in both project1 & project2, and "build with dependencies" project2 then: Project2 is linked with an old version of project1!

I happen to change project1 alot. Before using maven in my IDE, I was used that building a dependent project, also builds it's dependencies. I mean that's what dependencies in a build system is all about...

How do I fix this, so that "build with dependencies" on project2 also builds project1?

Was it helpful?

Solution

First of all, your dependency version needs to match the version of the project you depend on. Then you also need to have both projects in one reactor (include both projects as modules in one parent project). Then Build with dependencies should work with maven 3 at least.

You haven't mentioned what type of projects use (packaging) but please note that with Compile on Save turned on, you often don't need to do rebuilds of the changed projects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top