zoukankan      html  css  js  c++  java
  • 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.

     

    学习的过程中总会得到一些心得体会,认真地将它们记录下来并分享给每一个愿意花费时间去阅读它们的人,然后意外地收获某个读者的评论,从而激发出新的感想,是一件十分令人欢快的事。如果你也在研习这方面的知识,欢迎加入到我们的队伍中来,和我们一起进步吧(^_^)
  • 相关阅读:
    linux 获取外网ip地址
    出现大量rcuob进程
    禁用 ipv6
    centos yum 坏掉 db 损坏
    关于 solusvm
    VMWare 下 Ubuntu 18.04 的文件共享
    安装最新版本 nginx
    大量的Close_wait 发现的 too many open file 错
    Linux安装Desktop 和 vncserver
    MySQL in和limit不能连用的问题
  • 原文地址:https://www.cnblogs.com/lxrm/p/6184608.html
Copyright © 2011-2022 走看看