Solved

How to include a folder from another project in intellij idea

Posted on 2016-11-01
2
44 Views
Last Modified: 2016-11-20
HI,
I have two projects A and B... The project A uses B as dependency..
While working on Project A i have to make change simulataneously in A and B.
This will cause me to open the project B in another instance of intellij Idea and build it and then use this latest build of B in A. Which is quite troublesome..
If i could include the source of B directly in A and make changes there only things will be very easy..
How do i do that..
Also i saw that intellij i cannot open two projects in the same instance...

To give the exact case of my scenario :
I have a project A which is a web application...
And it uses an npm module called B in its javascript files which is another project.
eg... in a new.js i include B like :
require(B)
B is listed as a dependency in package.json...
Now i have to make changes in A and B simulatenously and test my changes...
what i have done currently is manually copy the files i need in B directly in a folder in A and then work.. And when i am finished... copy them back to project B...
I tried creating an alias of files in B. So as i dont have to copy them back and forth.. But intellij doesnt seem to work with aliases...

Thanks
0
Comment
Question by:Rohit Bajaj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 28

Accepted Solution

by:
dpearson earned 500 total points (awarded by participants)
ID: 41869258
I think A and B should both be modules within a single project.

Then you go to "Project structure, Modules" and select A, then in the Dependencies tab for A, add "Module B" (click the "+" at the side and choose Module Dependency...).

Now when you edit B, it will be compiled into A as needed.

You can still have a separate run target for just B if you wish too, for when you want to run B separately from A.

Give that a try and see if that solves your problem,

Doug
0
 
LVL 28

Expert Comment

by:dpearson
ID: 41894653
Only solution submitted.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question