[maven] introduction to the standard directory layout

  The next section documents the directory layout expected by Maven and the directory layout created by maven.

尽量根据此结构.当然,也可以通过project desciptor来覆写.

src/main/java Application/Library sources
src/main/resources Application/Library resources
src/main/filters Resource filter 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/it Integration Tests (primarily for plugins)
src/assembly Assembly descriptors
src/site Site
LICENSE.txt Project's license
NOTICE.txt Notices and attributions required by libraries that the project depends on
README.txt Project's readme

在最上层有一个项目的描述文件. pom.xml

最上层还有两个子结构, src和target.

The only other directories that would be expected here are metadata like CVS.git or .svn, and any subprojects in a multiproject build (each of which would be laid out as above).

target目录是用力啊存储 all output of the build

src 目录包含所有的source material for building the project, its site and so on.

  它包含每个类型的子目录.

  main是 main build artifact, test for the unit test code and resources, site and so on.

通过artifact 生产source 目录中(如main ,test),有一个路径是 for java语言的(存放java的阶梯包), 一个是resources( the structure which is copied to the target classpath given the defalut resouce definition).

 如果有其他的contributing sources to the artifact build, 他们应该在其他子目录下:如scr/main/antlr会包含Antlr 语法定义文件.

宛如智障,暗藏锋芒
原文地址:https://www.cnblogs.com/zienzir/p/9123082.html