manifest
ある日突然war:warが動かなくなる。
[INFO] Error assembling WAR Embedded error: The attribute "url" may not occur more than once in the same section
どーも、war-pluginが新しくなったので、この指定ができなくなったらしい。
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <archive> <addMavenDescriptor>false</addMavenDescriptor> <url>${pom.url}</url> </archive> </configuration> </plugin>
微妙にこうした。
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.0</version> <configuration> <archive> <addMavenDescriptor>false</addMavenDescriptor> </archive> <warName>${project.build.finalName}-${project.version}</warName> </configuration> </plugin>
本家になんか見たことのないページが
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html
今までのarchiveタグではなく、archiverタグで指定するようなのだがpom.propertiesというファイルがMETA-INFの下のほうに作成されていますが。
そもそもpom.xmlは含めたくないので、addMavenDescriptorを指定して、デフォルトにしてしまう。
ドキュメントによる期待
Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: <current_user> Build-Jdk: <jdk version> Extension-Name: <artifactId> Specification-Vendor: MyCompany Inc Implementation-Vendor: MyCompany Inc Implementation-Title: <artifactId> Implementation-Version: <version>
作成されたもの
Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: hogeuser Build-Jdk: 1.5.0_04 Extension-Name: hogeartifactId Specification-Title: Implementation-Title: hogeartifactId Implementation-Version: 1.1
"MyCompany Inc"とかいうものが取得できていないようですが・・・。