如何生成effective-pom
effective-pom是什么?我们知道任何一个项目的pom都至少继承了maven内置的超级pom,有些项目中的用户还会配置自己的继承层次,也就是说,但从当前的pom是无法全面了解项目信息的,你必须同时查看所有父pom. maven有一个effective pom的概念,它表示一个合并整个继承机构所有信息的POM,假如项目A继承自项目B,而项目B又继承自超级POM,那么A的Effectiv POM 就包含了所有A,B一级超级POM的配置,有了Effectve POM,用户就能一次得到完成的POM信息.
Maven用户使用命令行获取effective-pom,在termal中进入当前pom所在的文件夹(cd 命令)
$ mvn help:effective-pom
Effective POMs, after inheritance, interpolation, and profiles are applied: <?xml version="1.0" encoding="GBK"?>
<!-- ====================================================================== -->
<!-- -->
<!-- Generated by Maven Help Plugin on 2020-12-16T11:21:49+08:00 -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/ -->
<!-- -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!-- -->
<!-- Effective POM for project -->
<!-- 'com.juvenxu.mvnbook.account:account-captcha:jar:1.0.0-SNAPSHOT' -->
<!-- -->
<!-- ====================================================================== -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/
xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.juvenxu.mvnbook.account</groupId>
<artifactId>account-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.juvenxu.mvnbook.account</groupId>
<artifactId>account-captcha</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Account Captcha</name>
<properties>
<junit.version>4.7</junit.version>
<kaptcha.version>2.3</kaptcha.version>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<springframework.version>2.5.6</springframework.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.code.kaptcha</groupId>
<artifactId>kaptcha</artifactId>
<version>2.3</version>
<classifier>jdk15</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>2.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>2.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>sonatype-forge</id>
<name>Sonatype Forge</name>
<url>http://repository.sonatype.org/content/groups/forge/</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\src\main\java</sourceDirectory>
<scriptSourceDirectory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\src\main\scripts</scriptSourceDirectory>
<testSourceDirectory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\src\test\java</testSourceDirectory>
<outputDirectory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\target\classes</outputDirectory>
<testOutputDirectory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\target\test-classes</testOutputDirectory>
<resources>
<resource>
<directory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\src\main\resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\src\test\resources</directory>
</testResource>
</testResources>
<directory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\target</directory>
<finalName>account-captcha-1.0.0-SNAPSHOT</finalName>
<pluginManagement>
<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.8</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</execution>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</execution>
</executions>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<executions>
<execution>
<id>default-site</id>
<phase>site</phase>
<goals>
<goal>site</goal>
</goals>
<configuration>
<outputDirectory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
<execution>
<id>default-deploy</id>
<phase>site-deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<outputDirectory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
</executions>
<configuration>
<outputDirectory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<outputDirectory>F:\6monthlearn\material_学习资料\books_书\书籍附件\mvn_in_action_code-master\ch-12\account-parent\account-captcha\target\site</outputDirectory>
</reporting>
</project> [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.310 s
[INFO] Finished at: 2020-12-16T11:21:50+08:00
[INFO] ------------------------------------------------------------------------
如何生成effective-pom的更多相关文章
- 使用maven生成可执行的jar包
从pom的xsi中可以打开描述pom的schema: 可以看到pom中,project的结构: 默认的mvn install生成的jar是不带主类入口的,需要在maven-compile-plugin ...
- Java-Maven-Runoob:Maven POM
ylbtech-Java-Maven-Runoob:Maven POM 1.返回顶部 1. Maven POM POM( Project Object Model,项目对象模型 ) 是 Maven 工 ...
- 自动的自动化:EvoSuite 自动生成JUnit的测试用例
EvoSuite简介 EvoSuite是由Sheffield等大学联合开发的一种开源工具,用于自动生成测试用例集,生成的测试用例均符合Junit的标准,可直接在Junit中运行.得到了Google和Y ...
- Maven的pom配置文件
1.1 Maven的pom配置文件 1.1.1 pom文件内容和作用 Pom.xml文件用来设置项目的项目依赖.插件.项目版本等信息,其中必须的是xml的根元 ...
- Maven deploy 部署 jar+pom 到 Nexus 私服
经验之谈 工作中,我们常常需要将基础架构部门的 jar 包提供给业务部门的同事使用,那么,需要将 jar 包 deploy 到 nexus 私服上,网上资料不是很多,这里说一下具体细节. 首先,是打 ...
- Maven POM
POM代表项目对象模型.它是 Maven 中工作的基本单位,这是一个 XML 文件.它始终保存在该项目基本目录中的 pom.xml 文件.POM 包含的项目是使用 Maven 来构建的,它用来包含各种 ...
- Maven学习(十二)-----Maven POM
Maven POM POM代表项目对象模型.它是 Maven 中工作的基本单位,这是一个 XML 文件.它始终保存在该项目基本目录中的 pom.xml 文件.POM 包含的项目是使用 Maven 来构 ...
- Gradle build.gradle to Maven pom.xml ,终于找到你了。
尊重原创:https://blog.csdn.net/kevin_luan/article/details/50996109 根据build.gradle 生成maven pox.xml 1.将以下配 ...
- maven 学习---POM机制
POM 代表工程对象模型.它是使用 Maven 工作时的基本组建,是一个 xml 文件.它被放在工程根目录下,文件命名为 pom.xml. POM 包含了关于工程和各种配置细节的信息,Maven 使用 ...
随机推荐
- 如何让vscode C++ 终端不再显示调试启动信息
按照微软的官方文档(https://go.microsoft.com/fwlink/?LinkID=533484#vscode)配置好C++环境之后. 每次按F5都会在终端输出,但是会附加一串信息.例 ...
- Redis哨兵的配置和原理
哨兵 在一个典型的一主多从的Redis系统中,当主数据库遇到异常中断服务后,需要手动选择一个从数据库升级为主数据库,整个过程需要人工介入,难以自动化. Redis2.8提供了哨兵2.0(2.6提供了1 ...
- Centos8.3、mysql8.0主从复制实战记录
引言 最近又上线了一个项目,感觉自己这段时间收获不少就想把自己做这个项目用的技术总结梳理一下.这个项目是我自己发起,领导们不是特别重视所以得到资源有限,资源有限的情况我只能选择手动搭建数据库环境,资源 ...
- Etcd中linearizable read实现
linearizable 有点疑惑,不确定是现在浏览的版本没开发完全,还是没有按照论文的linearizable来实现. 按照论文所说,在客户端请求的时候,实际上是一个强一致的 exactly onc ...
- 精尽Spring Boot源码分析 - 序言
该系列文章是笔者在学习 Spring Boot 过程中总结下来的,里面涉及到相关源码,可能对读者不太友好,请结合我的源码注释 Spring Boot 源码分析 GitHub 地址 进行阅读 Sprin ...
- Python基础之:Python的数据结构
目录 简介 列表 列表作为栈使用 列表作为队列使用 列表推导式 del 元组 集合 字典 循环 简介 不管是做科学计算还是编写应用程序,都需要使用到一些基本的数据结构,比如列表,元组,字典等. 本文将 ...
- 限流神器Sentinel,不了解一下吗?
概述 书接上回:你来说说什么是限流? ,限流的整体概述中,描述了 限流是什么,限流方式和限流的实现.在文章尾部的 分布式限流,没有做过多的介绍,选择了放到这篇文章中.给大伙细细讲解一下 Sentine ...
- 9.11、mysql增量备份和增量恢复介绍
1.增量备份: 增量数据是从上次全量备份之后,更新的新数据,对于mysql来说,binlog日志就是mysql的增量数据: (1)按天进行备份: 周一00点全量备份 周二00点全量备份 ...... ...
- js实现返回顶部按钮
html: <div class="box"></div> <div class="box1"></div> & ...
- CentOS6.5 mini安装到VirtualBox虚拟机中
下载Oracle VM VirtualBox 下载下来安装 下载镜像 http://archive.kernel.org/centos-vault/6.5/isos/i386/CentOS-6.5-i ...