开发者

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

开发者 https://www.devze.com 2023-01-19 03:44 出处:网络
In my pom.xml,开发者_如何学C i used maven-war plugin to package different war files and properties-maven-plugin to read the 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

精彩评论

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