Using one project in another project's build path

Answered

Hello

I have several projects, lets call them libraryX, libraryY, and applicationZ

I would like to set up applicationZ's build path such that whenever I add a new method or class to libraryX or libraryY, it becomes available to applicationZ. Ideally, i'll like it so that when I type code in applicationZ the new method or class shows up in autocomplete.

Right now I have to manually modify applicationZ's project to take the "SNAPSHOT" version of the library poms (I'm effectively using maven), then go into libraryX's directory and manually build and publish to my local maven home.

I found this link in the forums:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/206868755-Setting-One-Project-as-a-Library-for-Another?input_string=Using%20one%20project%20in%20a%20another%20p

but its a few years old and I am hoping some work has been done in this area since

 

Thank you!

0
1 comment

I suggest using a single Maven project with multiple modules (for the libraries and for the application). This way the dependencies will be resolved instantly via sources and you will save a lot of time on building the jars on every change which will be followed by the indexing process for the updates jars.

0

Please sign in to leave a comment.