作为父类parent的maven项目编译必须为pom

来源:互联网 发布:淘宝客入口在哪里 编辑:程序博客网 时间:2024/05/17 18:11

父:

<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>parentgroupid</groupId>
  <artifactId>parentartiid</artifactId>
  <version>0.0.1</version>
  <packaging>pom</packaging>
</project>

子:

<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>groupid</groupId>
<artifactId>aritfactid</artifactId>
<version>0.0.1</version>
<name>firstmavenproject</name>
<parent>
<groupId>parentgroupid</groupId>
<artifactId>parentartiid</artifactId>
    <version>0.0.1</version> 
</parent>
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>releases</name>
<url>http://127.0.0.1:8081/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
</project>

0 0
原创粉丝点击