• Maven--->学习心得--->maven project的标准目录结构


    1.概述:

    maven管理的project都有一套标准的目录结构,也就是说不关你是什么project,只要你的这个project是使用maven进行管理的,那么你的这个project的所有文件的组织方式都是一样的(都是遵循maven的标准目录结构的)。当然,可能有些项目进行到后期的时候会根据需要更改maven project的标准目录结构(如添加其他必要文件夹...)。

    2.maven 所提供的Archetypes

        参考资料:maven官网documentation

          概述:maven中提供了若干工程模板,也即archetypes,这些project templates是针对不同类型的工程抽象出来的,特定类型的project拥有特定的标准目录结构,可以使用maven直接建立拥有相应类型project标准目录结构的你的工程,加快项目的build speed.

         Provided Archetypes:Maven provides several Archetype artifacts,如下表

    Archetype ArtifactIdsDescription
    maven-archetype-archetype An archetype to generate a sample archetype.
    maven-archetype-j2ee-simple An archetype to generate a simplifed sample J2EE application.
    maven-archetype-mojo (deprecated) Deprecated in favour of maven-archetype-plugin, which has a better name.
    maven-archetype-plugin An archetype to generate a sample Maven plugin.
    maven-archetype-plugin-site An archetype to generate a sample Maven plugin site.
    maven-archetype-portlet An archetype to generate a sample JSR-268 Portlet.
    maven-archetype-quickstart An archetype to generate a sample Maven project.
    maven-archetype-simple An archetype to generate a simple Maven project.
    maven-archetype-site An archetype to generate a sample Maven site which demonstrates some of the supported document types like APT, XDoc, and FML and demonstrates how to i18n your site.
    maven-archetype-site-simple An archetype to generate a sample Maven site.
    maven-archetype-webapp An archetype to generate a sample Maven Webapp project.

          For more information on these archetypes, please refer to the Maven Archetype Bundles page.
          If you would like to know how to make your own archetypes, please refer to our Guide to creating archetypes.
         

           

    3.maven project的标准目录结构

      参考资料:maven官网documentation

      标准目录结构:      

    src/main/java Application/Library sources
    src/main/resources Application/Library resources
    src/main/resources-filtered Application/Library resources which are filtered. (Starting with Maven 3.4.0, not yet released.)
    src/main/filters Resource filter files
    src/main/webapp Web application sources
    src/test/java Test sources
    src/test/resources Test resources
    src/test/resources-filtered Test resources which are filtered by default. (Starting with Maven 3.4.0, not yet released.)
    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

        The target directory is used to house all output of the build.

     

    学习的过程中总会得到一些心得体会,认真地将它们记录下来并分享给每一个愿意花费时间去阅读它们的人,然后意外地收获某个读者的评论,从而激发出新的感想,是一件十分令人欢快的事。如果你也在研习这方面的知识,欢迎加入到我们的队伍中来,和我们一起进步吧(^_^)
  • 相关阅读:
    数据结构 图的接口定义与实现分析(超详细注解)
    数据结构-优先队列 接口定义与实现分析
    什么是梯度?
    javascript当中火狐的firebug如何单步调试程序?
    给出一个javascript的Helloworld例子
    lvs dr 模型配置详解
    数据库连接池
    JDBC事务管理
    JDBC工具类:JDBCUtils
    详解JDBC对象
  • 原文地址:https://www.cnblogs.com/lxrm/p/6184608.html
Copyright © 2020-2023  润新知