我已经在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