Where should I add Java files in a web project (WAR) in Maven?

Where can I get the Java source folder in the Maven web application architecture that leads to the WAR?

Necessary suggestions.

+3
source share
4 answers

The basic structure standard for the Maven project is as follows.

src/main/java        Application/Library sources
src/main/resources    Application/Library resource
src/main/filters      Resource filter files
src/main/assembly    Assembly descriptors
src/main/config    Configuration files
src/main/webapp    Web application sources
src/test/java        Test sources
src/test/resources  Test resources
src/test/filters      Test resource filter files
src/site              Site

By following Maven's recommendations and normal behavior, it is easier for other people familiar with Maven to understand and understand the structure.

Source / Details

+3
source

- Maven Java. maven maven "" - ( ) maven - - ( ). webapp "" .

, / ( ..), , ( jsp-, web.xml ..),.

+8

pom.xml () Java Maven, src/main/java.

+2

Java src/main/java, .

+1

Source: https://habr.com/ru/post/1791230/


All Articles