最初のステップはjar
、web.xml
. com.mycompany:common としましょう。
このようなことを何とかすることは可能ですか?:
<webXml>classpath:com/mycompany/common/web.xml</webXml>
試してみましたか、つまり、うまくいかないことがわかっていますか? その場合は、先頭に「/」(/com/...) を使用する必要があると思います。
そしてもちろん、そのファイルをプラグインのクラスパスで利用できるようにします。
それなら簡単です... com.mycompany:common に依存関係を追加して、クラスパスで使用できるようにするだけです。もちろん、Maven リポジトリで利用できる必要があります。
が機能しない場合classpath:
は、私自身もよくわかりません。 を使用して JARmaven-dependency-plugin
から解凍し、 で使用できるようにすることができます。web.xml
maven-war-plugin
pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-web-xml</id>
<phase>..any phase before packaging..</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.mycompany</groupId>
<artifactId>common</artifactId>
<version>1.0</version>
<outputDirectory>...dir you'll use for the war plugin later...</outputDirectory>
<includes>/com/mycompany/common/web.xml</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>