Home > Back-end >  Adding Maven framework causes problems in project
Adding Maven framework causes problems in project

Time:01-31

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

CodePudding user response:

Try to fix this in IDEA project settings:

Navigate

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

and edit this manually

  • Source Folders

    src\main\java

  • Test Source Folders

    src\test\java

  • Resources

    src\main\resources

  • Test

    src\test\resources

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

enter image description here

  •  Tags:  
  • Related