将变量或配置文件应用于下载的父Pom

时间:2015-11-17 20:41:49

标签: maven

我有一个Pom.xml,可以从中下载父Pom <?xml version="1.0" encoding="UTF-8"?> <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>dev</groupId> <artifactId>company-parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <distributionManagement> <repository> <id>Artifactory</id> <name>Artifactory-releases</name> <url>http://artifactory:8081/artifactory/${repo}</url> </repository> <snapshotRepository> <id>Artifactory</id> <name>Artifactory-snapshots</name> <url>http://artifactory:8081/artifactory/${repo}</url> </snapshotRepository> </distributionManagement> </project> 。我试图让项目部署的地方依赖于父Pom中的变量。以下是我的父Pom:

mvn deploy

当我运行mvn deploy -Drepo=integration时,我使用命令行dev但它不起作用。部署只是将项目置于integration而不是ps -ef | grep mysql mysql 8528 1 0 22:32 ? 00:00:00 /usr/sbin/mysqld root 8683 3605 0 22:32 pts/1 00:00:00 grep --color=auto mysql ,就像变量所说的那样。父pom托管在artifactory上,所以我相信因为它是在部署期间下载的,所以变量没有被应用到它。

0 个答案:

没有答案