maven 自定義變數
阿新 • • 發佈:2019-02-03
可以用properties這個標籤來自定義變數,例如:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>com.springinaction</groupId> <artifactId>springidol</artifactId> <version>3.0.0</version> <packaging>jar</packaging> <name>Spring in Action Spring Idol</name> <url>http://www.manning.com/walls4</url> <properties> <spring.group>org.springframework</spring.group> <spring.version>3.1.1.RELEASE</spring.version> </properties> <dependencies> <dependency> <groupId>${spring.group}</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>${spring.group}</groupId> <artifactId>spring-aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>${spring.group}</groupId> <artifactId>spring-aspects</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>${spring.group}</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.6</version> <scope>test</scope> </dependency> </dependencies> </project>