Skip to content
Advertisement

Adding Maven framework causes problems in project

After adding Maven framework to my project everything turns red. A new package named “main” appears between packages “src” and the first package that I created “java.hr.production” (by hierarchy) as can be seen in the 1st picture. It also changes the import address. The 2nd picture shows maven code. Appreciate it if you could help. Some words are not in english so ignore those.

#1 enter image description here

#2 enter image description here

Advertisement

Answer

Try to fix this in IDEA project settings:

Navigate

File-> Project Structure-> Project Settings-> Modules 

and edit this manually

  • Source Folders

    srcmainjava

  • Test Source Folders

    srctestjava

  • Resources

    srcmainresources

  • Test

    srctestresources

see example (it’s groovy, but same for java maven)

enter image description here

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement