webstart-maven-pluginで、dependenciesのincludeに書いたはずのライブラリがpackage時に入らない件
使ってる人もまばらであろう webstart-maven-plugin ですが、以下みたいな感じの設定を書くことで、mvn package したときに、includes 以下に書いたライブラリの jar に sign して target/jnpl 以下に置いてくれる。
<build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>webstart-maven-plugin</artifactId> <executions> <execution> <goals> <goal>jnlp</goal> </goals> </execution> </executions> <configuration> <spec>1.0+</spec> <dependencies> <includes> <include>xstream:xstream</include> <include>xpp3:xpp3_min</include> <!-- そのほかのライブラリ -->
で、上記のように書いてたわけですよ。だけど、他のライブラリはちゃんと sign されて、jnlp 以下に jar ファイルが置かれてたんだけど、xsteam の jar だけ存在しない。
10分ぐらい悩んで、セブンセンシズが働いて、mavenの.m2のディレクトリ以下のrepository\xstream\xstream\1.2を見てみたら jar ファイルが存在しない。
xstream-1.2.pomを見てみると
<distributionManagement> <relocation> <groupId>com.thoughtworks.xstream</groupId> </relocation> </distributionManagement>
と書いてある。これは・・・と思って include を com.thoughtworks.xstream:xstream にしたら正しく動作しました。com.thoughtworks.xstream:xstreamが正しいんだけど、maven の仕組み的に、まぁ、xstream:xstreamでも動くはずなのに動作してなかった。webstart-maven-pluginは依存ライブラリの検地の仕組みをmaven標準の仕組みを使っていないらしいのではまた。