I\'m trying to create a very simple webapp with maven and eclipse, but I\'m having no joy at all, in fact the reverse of joy.
I go to File -> New Project, select Mav
Simply create a java
directory under main
(i.e. src/main/java
) and right-click on your project and select Maven > Update Project Configuration.
for src/main/java
your project >> properties >> java build path >> source >>
search "Your Project src/main/java (missin)" >>>
edit > folder name >> next >> Inclusion patterns: -----> Add >> src/main/java OK
and if errors still don't disapear
>>> look in Target Runtimes and check your apache in checkbox
Following steps work in eclipse 2020-06
There is an option to create a source directory in eclipse. Or you can go to build path under project properties, and add an existing directory as a source directory.
If you are going to use non-standard directory structure you will have to specify it in maven though
in IntelliJ IDEA 13 you must first create "java" folder in main folder then --> go to "open module setting"- for this you can click on project name and press f4- , and set label of "java" folder to "source" .