用apache-maven-3.1.1 编译工程,提示 Non-parseable POM :Unrecognised tag: 'parent' (position: S TART_TAG seen ...</relativePath>\r\n <parent>.., 报错日志打印截图如下:
具体的项目目录结构和pom.xml定义如下。
1. 项目的目结构录:
截图中,itts-parent定义了模块的聚合和继成配置,与itts-platform下的各个模块是同级的,
但为了方便,把itts-parent目录下的 pom.xml 提到 itts-platform 下。
2. itts-platform/pom.xml 定义
<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>com.itrace.itts</groupId>
<artifactId>itts-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ITTS Platform Parent Module</name>
<url></url>
<modules>
<module>itts-common</module>
<module>itts-core</module>
<module>itts-persist</module>
<module>itts-service</module>
<module>itts-web</module>
</modules>
<properties>
……..
</properties>
<dependencyManagement>
…….
</dependencyManagement>
<distributionManagement>
.…..
</distributionManagement>
</project>
3. itts-common/pom.xml 定义
<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>
<parent>
<groupId>com.itrace.itts</groupId>
<artifactId>itts-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>pom.xml</relativePath>
<parent>
<artifactId>itts-common</artifactId>
<packaging>jar</packaging>
<name>ITTS Platform Common Module</name>
<dependencies>
……….
</dependencies>
</project>
--
您收到此邮件是因为您订阅了 Google 网上论坛的“Maven中文”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 maven-zh+u...@googlegroups.com。
要向此网上论坛发帖,请发送电子邮件至 mave...@googlegroups.com。
通过以下网址访问此论坛:http://groups.google.com/group/maven-zh。
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。