我已經在pom.xml中定義了以下文件:無法獲得maven2的配置文件來工作
<profiles>
<profile>
<id>dev</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>dev</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete file="src/main/application/META-INF/data-sources.xml"/>
<copy file="src/main/resources/data-sources-dev.xml" tofile="src/main/application/META-INF/data-sources.xml"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
的問題是,它似乎並沒有工作!
mvn help:effective-pom -P dev
是否也回顯配置文件。
但是,如果我這樣做
mvn -X -Pdev install
的刪除/複製部分不是在日誌中可見。
你的意思是pom2.xml或pom.xml? – 2009-07-13 08:45:07
糟糕,pom.xml。編輯。 – tputkonen 2009-07-13 09:14:41