Reputation: 3071
I have two maven projects in Netbeans. How can I add one as dependency for another?
In Intellij IDEA I can just add <dependency>
and it works fine. But Netbeans can't resolve this dependency this way.
Upvotes: 0
Views: 33
Reputation: 22343
You should be able to do so, in Netbeans. Just make sure to have the project, you want to use as dependency, is built into your maven-local-repo by executing a maven-install.
I don't know how it works in Netbeans, but in Eclipse you can just Rightclick -> Run as-> Maven Install
to install your project.
Maybe in Netbeans, you have to use the Maven-cmd-tool. Just navigate to the location in your project, where your pom.xml
is, and run mvn install
. That should install your project into your maven-local-repo. After that, just run mvn clean install -U
in your other project, which uses the previously built project as dependency, and it should recognize the dependency.
Upvotes: 1