{"action":"created","issue":{"url":"https://api.github.com/repos/earldouglas/xsbt-web-plugin/issues/278","labels_url":"https://api.github.com/repos/earldouglas/xsbt-web-plugin/issues/278/labels{/name}","comments_url":"https://api.github.com/repos/earldouglas/xsbt-web-plugin/issues/278/comments","events_url":"https://api.github.com/repos/earldouglas/xsbt-web-plugin/issues/278/events","html_url":"https://github.com/earldouglas/xsbt-web-plugin/issues/278","id":105629667,"number":278,"title":"MANIFEST in WAR is not the same as in JAR","user":{"login":"phillipviana","id":2110364,"avatar_url":"https://avatars.githubusercontent.com/u/2110364?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipviana","html_url":"https://github.com/phillipviana","followers_url":"https://api.github.com/users/phillipviana/followers","following_url":"https://api.github.com/users/phillipviana/following{/other_user}","gists_url":"https://api.github.com/users/phillipviana/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipviana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipviana/subscriptions","organizations_url":"https://api.github.com/users/phillipviana/orgs","repos_url":"https://api.github.com/users/phillipviana/repos","events_url":"https://api.github.com/users/phillipviana/events{/privacy}","received_events_url":"https://api.github.com/users/phillipviana/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-09T16:09:04Z","updated_at":"2015-09-09T19:04:42Z","closed_at":null,"body":"Hi,\r\n\r\nFirst of all congratulations for the awesome plugin! :-)\r\n\r\nI am very new to your plugin and sbt in general. I want the MANIFEST file in my WAR to have some metadata about the company and the  timestamp of when the build was generated. For example:\r\n\r\nManifest-Version: 1.0\r\nImplementation-Vendor: org.mycompany\r\nImplementation-Title: MyCompany Project\r\nImplementation-Version: 1.0.0-20150909110435\r\nImplementation-Vendor-Id: org.mycompany\r\nSpecification-Vendor: org.mycompany\r\nSpecification-Title: MyCompany Project\r\nSpecification-Version: 1.0.0-20150909110435\r\n\r\nI was able to achieve that for the JAR (that is created by packageBin) using this configuration:\r\n\r\nval baseVersion = SettingKey[String](\"base-version\", \"Base version of the project without timestamp.\")\r\n\r\nlazy val commonSettings = Seq(\r\n  organization := \"org.mycompany\"\r\n)\r\n\r\nlazy val root = (project in file(\".\")).\r\n  enablePlugins(WarPlugin).\r\n  settings(commonSettings: _*).\r\n  settings(\r\n    name := \"MyCompany Project\",\r\n\tartifactName := { (sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>\r\n        artifact.name + \"-\" + baseVersion.value + \".\" + artifact.extension    \r\n\t},\r\n    baseVersion := \"1.0.0\",\r\n    crossTarget := new java.io.File(\"target\"),\r\n    version := new String(baseVersion.value) + \"-\" + new java.text.SimpleDateFormat(\"yyyyMMddHHmmss\").format(new java.util.Date()).toString(),\r\n    webappWebInfClasses := true\r\n)\r\n\r\nHowever, the WAR file created in package only contains \"Manifest-Version: 1.0\" in the MANIFEST.\r\n\r\nCould you please advise?"},"comment":{"url":"https://api.github.com/repos/earldouglas/xsbt-web-plugin/issues/comments/139011078","html_url":"https://github.com/earldouglas/xsbt-web-plugin/issues/278#issuecomment-139011078","issue_url":"https://api.github.com/repos/earldouglas/xsbt-web-plugin/issues/278","id":139011078,"user":{"login":"phillipviana","id":2110364,"avatar_url":"https://avatars.githubusercontent.com/u/2110364?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipviana","html_url":"https://github.com/phillipviana","followers_url":"https://api.github.com/users/phillipviana/followers","following_url":"https://api.github.com/users/phillipviana/following{/other_user}","gists_url":"https://api.github.com/users/phillipviana/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipviana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipviana/subscriptions","organizations_url":"https://api.github.com/users/phillipviana/orgs","repos_url":"https://api.github.com/users/phillipviana/repos","events_url":"https://api.github.com/users/phillipviana/events{/privacy}","received_events_url":"https://api.github.com/users/phillipviana/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T19:04:42Z","updated_at":"2015-09-09T19:04:42Z","body":"Hi Douglas,\r\n\r\nThanks for the quick reply.\r\n\r\nI have tried that option and sbt packages successfully, then my MANIFEST.MF file contains an extra line with \"Sealed: true\".\r\n\r\nManifest-Version: 1.0\r\nSealed: true\r\n\r\nI understand that it is possible to manually add attributes this way. However, I thought the metadata would be included automatically in the MANIFEST just like it happens with the JAR. Or do I need to manually add all attributes in this case?"}}