学习笔记——Maven超级POM
- 2014-07-04:更新如何在安装程序中找到超级pom文件。
Maven有一个超级POM,所有的POM均继承此文件。
你可以使用解压工具打开jar文件$M2_HOME/lib/maven-model-builder-x.x.x.jar,然后访问路径org/apache/maven/model/pom-4.0.0.xom
Ps: maven2中为org/apache/maven/project/pom-4.0.0.xml
该文件定义如下:
<project>
- <modelVersion>4.0.0</modelVersion>
- <repositories>
- <repository>
- <id>central</id>
- <name>Central Repository</name>
- <url>http://repo.maven.apache.org/maven2</url>
- <layout>default</layout>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>central</id>
- <name>Central Repository</name>
- <url>http://repo.maven.apache.org/maven2</url>
- <layout>default</layout>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <releases>
- <updatePolicy>never</updatePolicy>
- </releases>
- </pluginRepository>
- </pluginRepositories>
- <build>
- <directory>${project.basedir}/target</directory>
- <outputDirectory>${project.build.directory}/classes</outputDirectory>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
- <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
- <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
- <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
- <resources>
- <resource>
- <directory>${project.basedir}/src/main/resources</directory>
- </resource>
- </resources>
- <testResources>
- <testResource>
- <directory>${project.basedir}/src/test/resources</directory>
- </testResource>
- </testResources>
- <pluginManagement>
- <!-- NOTE: These plugins will be removed from future versions of the super POM -->
- <!-- They are kept for the moment as they are very unlikely to conflict with lifecycle mappings (MNG-4453) -->
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-5</version>
- </plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.1</version>
- </plugin>
- <plugin>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.0</version>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <reporting>
- <outputDirectory>${project.build.directory}/site</outputDirectory>
- </reporting>
- <profiles>
- <!-- NOTE: The release profile will be removed from future versions of the super POM -->
- <profile>
- <id>release-profile</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <inherited>true</inherited>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <inherited>true</inherited>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <inherited>true</inherited>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <updateReleaseInfo>true</updateReleaseInfo>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- </project>
学习笔记——Maven超级POM的更多相关文章
- 学习笔记——Maven实战(二)POM重构之增还是删
重构是广大开发者再熟悉不过的技术,在Martin Fowler的<重构——改善既有代码的设计>一书中,其定义为“重构(名词):对软件内部结构的一种调整,目的是在不改变软件之可察行为前提下, ...
- 学习笔记——Maven实战(六)Gradle,构建工具的未来?
Maven面临的挑战 软件行业新旧交替的速度之快往往令人咂舌,不用多少时间,你就会发现曾经大红大紫的技术已经成为了昨日黄花,当然,Maven也不会例外.虽然目前它基本上是Java构建的事实标准,但我们 ...
- maven 超级pom位置、maven命令、构件、下载位置、手动打包位置、中央仓库ip
1.超级pom位置 ----> 解压M2_HOME/lib/maven-model-builder-3.5.4.jar 2.运行maven 命令实际上是运行了 java 命令,因为maven插件 ...
- JavaEE学习之Maven配置文件pom.xml详解(转)
一.引言 (本文转载自:http://blog.csdn.net/longeremmy/article/details/9670619) 使用maven有一些时间了,一直没有好好将pom配置文件每个节 ...
- maven学习笔记--maven项目创建
使用Maven命令和Eclipse的Maven插件,创建Maven项目 (1)maven命令生成项目 新建一个文件目录,dos进入该目录并执行下面命令: mvn archetype:c ...
- 学习笔记——Maven pom.xml配置详解
POM的全称是“ProjectObjectModel(项目对象模型)”. pom.xml详解 声明规范 <projectxmlns="http://maven.apache.org/P ...
- 学习笔记——Maven实战(三)多模块项目的POM重构
重复,还是重复 程序员应该有狗一般的嗅觉,要能嗅到重复这一最常见的坏味道,不管重复披着怎样的外衣,一旦发现,都应该毫不留情地彻底地将其干掉.不要因为POM不是产品代码而纵容重复在这里发酵,例如这样一段 ...
- 学习笔记——Maven实战(十)Maven 3,是时候升级了
去年10月份Apache Maven发布了3.0正式版,而在上个月的22号,Eclipse基金会宣布了Eclipse 3.7(Indigo)的发布,该版本Eclipse最大的新特性之一就是集成了Mav ...
- 学习笔记-[Maven实战]-第三章:Maven使用入门(1)
说明:[Maven实战]一书还介绍了怎么样手工创建Maven工程,学习这本书是为了能尽快在工作中使用,就忽略了手工建工程的部分 如果想了解这部分的内容,可以自己看看书 开始: 1.新建一个maven工 ...
随机推荐
- Effective Java 62 Document all exceptions thrown by each method
Principle Always declare checked exceptions individually, and document precisely the conditions unde ...
- c#发送http请求
直接代码,自己备用 /** * @method:生成验证码 */ [JSONMethod] [Description ( "生成验证码" )] [DomTemplate ( )] ...
- Sublime Text 2 (for OS X )配置成可以运行基于python3解释器的 .py文件
Mac自带的python 其version是python 2.7 官网下的Sublime Text 2部署好了以后默认也是 为了使ST2 可以在command+B时可以运行基于python3的.py, ...
- WCF MSMQ消息队列与离线操作
消息队列类型 公共队列:整个网络中的节点都可以访问到 专用队列:本地计算机,知道路径者可以访问 管理队列:包含确认在给定“消息队列”网络中的发送的消息回执的消息 相应队列:返回给发送程序的相应信息
- AngularJS模块加载
配置块 在模块的加载阶段,AngularJS会在提供者注册和配置的过程中对模块进行配置.在整个AngularJS的工作流中,这个阶段是唯一能够在应用启动前进行修改的部分. angular.module ...
- Maxwell’s Equations
A=cos(pi*x-pi/2)i+sin(pi*x)j 正电荷形成的电场 负电荷形成的电场 正负电荷形成的电场 无限长导线上均匀分布的正电荷 电场 均匀分布电荷的平面 电场 电荷均匀分布的球面形 ...
- runv containerd 流程分析
当runv需要启动一个容器的时候,首先需要启动containrd,作为该容器的daemon.因此,启动containerd的相关代码也是从runv/start.go开始.最终,启动containerd ...
- 深度优先搜索 codevs 1064 虫食算
codevs 1064 虫食算 2004年NOIP全国联赛提高组 时间限制: 2 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题目描述 Description 所 ...
- 边工作边刷题:70天一遍leetcode: day 81
Encode and Decode Strings 要点:题的特点:不是压缩,而是encode为字节流.所以需要找delimiter来分割每个word,但是delimiter可能是字符本身,所以可以用 ...
- Enem 实用方法
前言 在项目中的多处使用到了枚举,比如:道具种类(PowerupType) 游戏任务(MissionType),记录一下有关枚举的一些方法 枚举 public enum MissionType { R ...