Solved

How to include a folder from another project in intellij idea

Posted on 2016-11-01
2
19 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
  • 2
2 Comments
 
LVL 26

Accepted Solution

by:
dpearson earned 500 total points (awarded by participants)
Comment Utility
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 26

Expert Comment

by:dpearson
Comment Utility
Only solution submitted.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now