{"action":"created","issue":{"url":"https://api.github.com/repos/rgladwell/m2e-android/issues/320","labels_url":"https://api.github.com/repos/rgladwell/m2e-android/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/rgladwell/m2e-android/issues/320/comments","events_url":"https://api.github.com/repos/rgladwell/m2e-android/issues/320/events","html_url":"https://github.com/rgladwell/m2e-android/issues/320","id":56711245,"number":320,"title":"Let eclipse/ADT use manifest as produced by manifest-update/manifest-merger","user":{"login":"mstevens83","id":2787305,"avatar_url":"https://avatars.githubusercontent.com/u/2787305?v=3","gravatar_id":"","url":"https://api.github.com/users/mstevens83","html_url":"https://github.com/mstevens83","followers_url":"https://api.github.com/users/mstevens83/followers","following_url":"https://api.github.com/users/mstevens83/following{/other_user}","gists_url":"https://api.github.com/users/mstevens83/gists{/gist_id}","starred_url":"https://api.github.com/users/mstevens83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstevens83/subscriptions","organizations_url":"https://api.github.com/users/mstevens83/orgs","repos_url":"https://api.github.com/users/mstevens83/repos","events_url":"https://api.github.com/users/mstevens83/events{/privacy}","received_events_url":"https://api.github.com/users/mstevens83/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rgladwell/m2e-android/labels/Enhancement","name":"Enhancement","color":"02e10c"},{"url":"https://api.github.com/repos/rgladwell/m2e-android/labels/waffle:ready","name":"waffle:ready","color":"00c5fe"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-02-05T18:44:17Z","updated_at":"2015-06-09T10:02:02Z","closed_at":null,"body":"I am using the `manifest-merger` goal of AMP (v4.1.1) to set the `versionName` and `versionCode` attributes in the `AndroidManifest.xml` file. My source manifest file sits in the project root and the destination for the updated file (with versionName/Code set by manifest-merger) is in the `target/` folder. The source manifest file remains unchanged.\r\n\r\nWhen running `mvn install` on command line the manifest file from `target/` is then used to package in the APK. This is what I want to happen.\r\n\r\nHowever, when building an apk through eclipse this is not what happens. Eclipse/ADT seems to simply copy the unchanged source manifest file to `bin/` and then uses it to package in the APK. This means eclipse builds don't have the versionName/Code defined as I want them to be.\r\n\r\nIn trying to solve the problem I have added a lifecycle mappings to ensure `manifest-merger` runs through eclipse/m2e:\r\n```\r\n<pluginExecution>\r\n\t<pluginExecutionFilter>\r\n\t\t<groupId>com.simpligility.maven.plugins</groupId>\r\n\t\t<artifactId>android-maven-plugin</artifactId>\r\n\t\t<versionRange>[4.0.0,)</versionRange>\r\n\t\t<goals>\r\n\t\t\t<goal>manifest-merger</goal>\r\n\t\t\t<goal>emma</goal>\r\n\t\t</goals>\r\n\t</pluginExecutionFilter>\r\n\t<action>\r\n\t\t<execute>\r\n\t\t\t<runOnIncremental>false</runOnIncremental>\r\n\t\t</execute>\r\n\t</action>\r\n</pluginExecution>\r\n```\r\nThis works in the sense that the `manifest-merger` indeed runs on non-incremental eclipse builds. But the result goes to `target/` (as it should) and is completely ignored by eclipse/ADT when packaging the APK.\r\n\r\nSo my question is: is there a way to make eclipse/ADT use the manifest as produced by the `manifest-merger` (and by extension the now deprecated `manifest-update` goal).\r\n\r\n[Before I had a set-up in which the `manifest-merger` would overwrite the source manifest file (i.e. destination = source). In that scenario eclipse *would* use the updated/merged file, but sadly it caused a different set of problems discussed here: https://github.com/simpligility/android-maven-plugin/pull/563]"},"comment":{"url":"https://api.github.com/repos/rgladwell/m2e-android/issues/comments/110299615","html_url":"https://github.com/rgladwell/m2e-android/issues/320#issuecomment-110299615","issue_url":"https://api.github.com/repos/rgladwell/m2e-android/issues/320","id":110299615,"user":{"login":"WonderCsabo","id":480485,"avatar_url":"https://avatars.githubusercontent.com/u/480485?v=3","gravatar_id":"","url":"https://api.github.com/users/WonderCsabo","html_url":"https://github.com/WonderCsabo","followers_url":"https://api.github.com/users/WonderCsabo/followers","following_url":"https://api.github.com/users/WonderCsabo/following{/other_user}","gists_url":"https://api.github.com/users/WonderCsabo/gists{/gist_id}","starred_url":"https://api.github.com/users/WonderCsabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WonderCsabo/subscriptions","organizations_url":"https://api.github.com/users/WonderCsabo/orgs","repos_url":"https://api.github.com/users/WonderCsabo/repos","events_url":"https://api.github.com/users/WonderCsabo/events{/privacy}","received_events_url":"https://api.github.com/users/WonderCsabo/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T10:02:02Z","updated_at":"2015-06-09T10:02:02Z","body":"We can of course execute the same goal in arbitrary times, even in the same phase. However it would not make sense in this case.\r\n\r\nI will implement it by assuming it is only executed once, and in the generate-sources phase."}}