How to set up a multi-language project in IntelliJ IDEA

JavaJavascriptHtmlIntellij Idea

Java Problem Overview


Is there a way to open/import an IntelliJ IDEA project which contains different language source files? For example I have Java (Maven) + HTML + JavaScript and, unfortunately, I'm able to import only the Maven project. Is there a way to open/import the entire project as a single whole?

Thanks in advance!

Java Solutions


Solution 1 - Java

Import the project as a java project. Then in the 'Project Structure' box, click on the module and click the + sign. This allows you to add, e.g., a Python "facet" to the module. I use this frequently to develop mixed Java/Python modules.

Solution 2 - Java

I don't think there is a way of doing that.

You'll probably have to import the maven project and then add the rest of the folders, yourself, configure the correct plugins, etc.

At least that's what I do in a couple of projects where I have Java and Python source files in the mix.

Sometimes, it works even better to simply define different modules for the different types of "sub-project", especially when it's a whole different language and you happen to need to setup a compiler etc, I've ran into some problems with IntelliJ not recognizing my Python modules correctly when I mixed them up in a Java project. All went well when I created a separate module.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionmr.nothingView Question on Stackoverflow
Solution 1 - JavaseanmclView Answer on Stackoverflow
Solution 2 - JavapcalcaoView Answer on Stackoverflow