我下载了一个多模块项目,我找不到maven pom's.xml的值:
这是父母的pom:
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cat.base.baseframe</groupId>
<artifactId>projecte-pare-baseframe</artifactId>
<version>0.0.11.a</version>
</parent>
<groupId>cat.base.adreces</groupId>
<artifactId>sca</artifactId>
<version>0.0.4.a</version>
<name>sca</name>
<packaging>pom</packaging>
<description>Esquelet d'una aplicació BaseFrame</description>
<modules>
<module>domini</module>
<module>logica</module>
<module>ejb</module>
<module>assistent</module>
<module>ear</module>
<module>utils</module>
</modules>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<excludePackageNames>cat.base.adreces.assistent;cat.base.adreces.serveis.ejb;cat.base.adreces.domini.dao;cat.base.adreces.serveis.impl</excludePackageNames>
<stylesheetfile>src/site/resources/stylesheet.css</stylesheetfile>
</configuration>
</plugin>
</plugins>
</reporting>
这是一个模块pom.xml:
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cat.base.adreces</groupId>
<artifactId>sca</artifactId>
<version>0.0.4.a</version>
</parent>
<artifactId>sca.assistent</artifactId>
<packaging>war</packaging>
<name>sca.assistent</name>
<description>Assistent d'adreces</description>
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>${project.parent.artifactId}.domini</artifactId>
<version>${project.parent.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2_10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun</groupId>
<artifactId>jsf-impl</artifactId>
<version>1.2_10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version> --->¿?
<scope>provided</scope>
我在哪里可以找到${spring.version}
的值?它是一种特殊的maven配置还是类似的东西?
答案 0 :(得分:0)
不是 maven特殊配置,而是maven属性。 Maven属性可以有任何名称:
<properties>
<spring-version>3.2.2.RELEASE</spring-version>
<cheeseburger-type>BIG</cheeseburger-type>
</properties>
在这种情况下,可以在另一个祖先pom(您发布的父级的父级等)或$ {USER_HOME} /.m2 / settings.xml或$ {MAVEN_HOME} / conf / settings中定义该值.XML
答案 1 :(得分:0)
如果未在POM中定义属性,则可以在父POM中定义该属性。
要查看完整配置运行:
mvn help:effective-pom