Reputation: 145
Normally when I mark top level directory of maven project that is structured as main/java/src it finds the correct package com.mycompany.xyz but on one project I notice it interprets the start of the package incorrectly as main.java.src.com.mycompany.xyz what is the correct root directory to use as source and why the difference?
Upvotes: 1
Views: 1177
Reputation: 402265
src/main/java
is the correct source directory for the Maven projects. See Introduction to the Standard Directory Layout.
IntelliJ IDEA should import it automatically from the pom.xml
. Make sure you don't override it anywhere in the build file like this.
Upvotes: 2