Roger Alkins
Roger Alkins

Reputation: 145

IntellijIDE Marking top directory as sources root causes src.main.java.com.mycompany.xyz

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

Answers (1)

CrazyCoder
CrazyCoder

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

Related Questions