开发者

How can i disable the excution of maven-war plugin by using variable in properties file

In my pom.xml,开发者_如何学C i used maven-war plugin to package different war files and properties-maven-plugin to read the properties file.

<plugin>
 <artifactId>maven-war-plugin</artifactId>
 <executions>
  <execution>
   <id>package-war1</id>
   <phase>package</phase>
   <goals>
    <goal>war</goal>
   </goals>
   <configuration>
    .........

   </configuration>
  </execution>

  <execution>
   <id>package-war2</id>
   <phase>package</phase>
   <goals>
    <goal>war</goal>
   </goals>

   <configuration>
    .......
   </configuration>
  </execution>

 </plugin>

How can i disable the process of package-war1 or war2 by using properties file. Ex: I would like to create variables in properties file likes: package-war1=true package-war2=false. then only the process of packaging war1 will be run. The process of packaging war2 will not be run temporarily.


How can i disable the process of package-war1 or war2 by using properties file.

Not possible. Use profiles to implement something approaching.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜