Reputation: 3189
I have two projects:
main_project - it was written in Eclipse, it have all backend
gui_project - I'm making front end in Swing for main_project (in Netbeans)
Both have maven pom:
main_project:
<groupId>com.group</groupId>
<artifactId>main_project</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MainProject</name>
gui_project:
<groupId>com.group</groupId>
<artifactId>gui_project</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>GUI</name>
Now I'm trying to use classes from main_project in gui_project (both are in Netbeans workspace), but I cant make gui_project to see main_project.
Also I added dependency in gui_project:
<dependency>
<groupId>org.group</groupId>
<artifactId>main_project</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
SOLVED
Clean and Build helped (right mouse button on project > clean and build).
Thanks to assylias
Upvotes: 1
Views: 1460
Reputation: 2321
the IDE itself should know the link between project right away, meaning no errors in java code in the gui-project. However on the maven side of things, maven's own rules apply. Meaning if 2 projects are not build in the same reactor build (eg. by building a pom project containing both projects as references) need to be represented by artifact in local repository. So either built upfront or downloaded from a remote (snapshot) repository.
Upvotes: 0
Reputation: 3189
Clean and Build helped (right mouse button on project > clean and build).
Thanks to assylias
Upvotes: 1