Request for Assistance: Opening Maven Dependency Projects from Git Within Same Workspace

Answered

Hello,

I've managed to successfully open my Maven Project from Git using the Git URL. Now, within the same workspace, I'm aiming to open another Maven Project, which serves as a dependency for my main Maven Project.

For instance, my main Maven Project, let's call it ProjectA, has a Maven dependency named ProjectB, which functions as a utility JAR, with its source code residing in a Git repository. My goal is to seamlessly open ProjectB from Git within the same workspace where ProjectA is already open.

While I've reviewed various help topics, they primarily focus on opening Maven Modules from the local disk rather than from Git.

Your guidance on navigating this scenario would be greatly appreciated. Thank you!

0
3 comments

Hi, 

Unfortunately, we do not have an option via UI to add modules via Git. (only from existing sources) 

What you can do is that you can clone it via terminal directly while inside your root project folder. 

Are you having any issues with this? 

0

Thank You for your reply.

I haven't encountered any issues with opening from existing sources at the moment.

I'm eager to explore leveraging the intuitive functionality of IntelliJ's Git UI for managing various tasks such as check-ins, pushes, and fetching within our Maven module. 

0

After you add it via terminal, it should be visible in the directory mappings as seperately tracked directory: Settings | Version Control | Directory Mappings

+ it will be visible in UI as separate dependency:
 

As you can see here, “Mock” is a folder inside the project that has it's own Git instance and is in a separate repository. 

You may separately PULL/PUSH from this repo, create branches and so on. 

Let me know if you have additional questions. 
 

 


 

0

Please sign in to leave a comment.