If you do an ‘import from git’, IntelliJ doesn’t import the project structure from maven (or gradle) automatically.
One way to do this afterwards is to right-click on the pom.xml file in the root directory, and select ‘Add as maven project’. Then the folders will be marked correctly, and dependent libraries will be imported. There should be no need to mark individual source folders manually.
I prefer to do a git clone outside of IntelliJ, and open the project from the local filesystem, then IntelliJ imports the maven project structure automatically.
Related Posts:
- java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
- java.lang.reflect.InvocationTargetException: null
- Spring Boot – Unable to resolve Whitelabel Error Page
- Spring @PropertySources value not overriding
- Lombok and Maven
- What does the arrow operator, ‘->’, do in Java?
- Error: Could not find or load main class in intelliJ IDE
- Spring boot – Request method ‘POST’ not supported. Tried everything
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing in Intellij
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- IntelliJ: Error:java: error: release version 5 not supported
- unused import statement for used ones in IntelliJ IDEA
- Exception in thread “main” java.lang.ClassNotFoundException:
- org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘demoRestController’
- Error: JavaFX runtime components are missing, and are required to run this application with JDK 11
- How to fix “unsupported class file major version 60” in IntelliJ?
- Consider defining a bean of type ‘package’ in your configuration [Spring-Boot]
- Spring boot error:java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
- intellij incorrectly saying no beans of type found for autowired repository
- Web server failed to start. Port 8080 was already in use. Spring Boot microserviceWeb server failed to start. Port 8080 was already in use. Spring Boot microservice
- Web server failed to start. Port 8080 was already in use. Spring Boot microservice
- JAVA_HOME should point to a JDK not a JRE
- Error:java: javacTask: source release 8 requires target release 1.8
- IDEA: javac: source release 1.7 requires target release 1.7
- IntelliJ – Can’t start – “JAVA_HOME does not point to a valid JVM installation”
- Creating Jar with Intellij 2016 – No main manifest attribute
- Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- Error: Module not specified (IntelliJ IDEA)
- Invalid signature file digest for Manifest main attributes exception while trying to run jar file
- What is the proper annotation since @SpringApplicationConfiguration, @WebIntegration, is deprecated in Spring Boot Framework?
- Configure active profile in SpringBoot via Maven
- The request was rejected because no multipart boundary was found in springboot
- “Cannot start compilation: the output path is not specified for module…”
- intellij idea – Error: java: invalid source release 1.9
- String index out of bounds exception java
- Java “lambda expressions not supported at this language level”
- java.lang.IllegalStateException: Failed to introspect Class
- Spring boot: Unable to start embedded Tomcat servlet container
- Class JavaLaunchHelper is implemented in two places
- IntelliJ IDEA “The selected directory is not a valid home for JDK”
- Spring Boot – Cannot determine embedded database driver class for database type NONE
- NoSuchElementException with Java.Util.Scanner
- ‘Java’ is not recognized as an internal or external command
- Running JAR file on Windows
- What are all the escape characters?
- Java “Error occurred during initialization of VM” fix?
- Postfix Calculator Java
- “Missing return statement” within if / for / while
- A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1
- Round a double to 2 decimal places
- com.atomikos.icatch.SysException: Error in init: Log already in use? tmlog in ./
- @ converted to %40 in HTTPPost request
- Global variables in Java
- Java implementation for Min-Max Heap?
- How to install Java 8 on Mac
- What’s the purpose of META-INF?
- JVM Crash – “EXCEPTION_ACCESS_VIOLATION”
- How to connect to FTP over TLS/SSL (FTPS) server in Java
- How to check type of variable in Java?
- In Java, how to append a string more efficiently?
- Convert .class to .java
- Create a List of primitive int?
- Compiling error: Return type for the method is missing
- Can not deserialize instance of java.lang.String out of START_OBJECT token
- Range of valid character for a base 64 encoding
- How to parse JSON boolean value?
- How to create an 2D ArrayList in java?
- Insert Dimensions to complete Expression/ReferenceType
- Unable to locate tools.jar
- Possible lossy conversion from double to float, given float values?
- how to fix EXE4J_JAVA_HOME, No JVM could be found on your system error?
- Any implementation of Ordered Set in Java?
- Could not resolve placeholder in string value
- All inclusive Charset to avoid “java.nio.charset.MalformedInputException: Input length = 1”?
- javac error: Class names are only accepted if annotation processing is explicitly requested
- JOptionPane YES NO OPTION
- How to check if a String is numeric in Java
- How to get today’s Date?
- Creating a random string with A-Z and 0-9 in Java
- Why doesn’t RecyclerView have onItemClickListener()?
- Inverse Logistic Function / Reverse Sigmoid Function
- Invalid initial heap size. Could not create the Java virtual machine
- implicit super constructor object() is undefined. must explicitly invoke another constructor
- How to convert a String into an ArrayList?
- Making a deep copy of a LinkedList in java
- Java methods getting euclidean distance
- Setting background color for a JFrame
- Does java have “get line”?
- User Input not working with keyboard.nextLine() and String (Java)
- javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake during web service communicaiton
- Generate UML Class Diagram from Java Project
- how to download image from any web page in java
- how to convert .java file to a .class file
- Adding a Scrollable JTextArea (Java)
- Java FileWriter with append mode
- How can I get the count of line in a file in an efficient way?
- The import org.junit cannot be resolved