?
Solved

How to include a folder from another project in intellij idea

Posted on 2016-11-01
2
Medium Priority
?
57 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article discusses how to implement server side field validation and display customized error messages to the client.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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