1
我有一個應該產生兩個工件(戰爭)的模塊。兩個WAR之間的唯一區別是正在使用的web.xml。
我這樣做是與Maven型材的幫助...Maven - 根據配置文件從父POM調用模塊
<parent>
<artifactId>com</artifactId>
<groupId>myProj</groupId>
<version>1.0</version>
</parent>
<groupId>myProj.module1</groupId>
<artifactId>module1</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<profiles>
<profile>
<id>module1</id>
<build>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>module1</warName>
<webXml>src\main\webapp\WEB-INF\web_module1.xml</webXml>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>module2</id>
<build>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>module2</warName>
<webXml>src\main\webapp\WEB-INF\web_module2.xml</webXml>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Q1:我怎樣才能把這個從POM POM超級使得兩個配置文件被激活?
Q2:是否可以將生成的工件安裝在本地存儲庫中?
謝謝!
謝謝romaintaz。有沒有什麼辦法可以通過個人資料的幫助來給我的孩子打個電話......可以做些什麼:` .... ` –
Arpit
2011-02-17 11:50:04