{"action":"created","issue":{"url":"https://api.github.com/repos/lburgazzoli/lb-gradle-plugins/issues/4","labels_url":"https://api.github.com/repos/lburgazzoli/lb-gradle-plugins/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/lburgazzoli/lb-gradle-plugins/issues/4/comments","events_url":"https://api.github.com/repos/lburgazzoli/lb-gradle-plugins/issues/4/events","html_url":"https://github.com/lburgazzoli/lb-gradle-plugins/issues/4","id":71617751,"number":4,"title":"Allow specifying which projects to generate a feature for","user":{"login":"sebersole","id":234515,"avatar_url":"https://avatars.githubusercontent.com/u/234515?v=3","gravatar_id":"","url":"https://api.github.com/users/sebersole","html_url":"https://github.com/sebersole","followers_url":"https://api.github.com/users/sebersole/followers","following_url":"https://api.github.com/users/sebersole/following{/other_user}","gists_url":"https://api.github.com/users/sebersole/gists{/gist_id}","starred_url":"https://api.github.com/users/sebersole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebersole/subscriptions","organizations_url":"https://api.github.com/users/sebersole/orgs","repos_url":"https://api.github.com/users/sebersole/repos","events_url":"https://api.github.com/users/sebersole/events{/privacy}","received_events_url":"https://api.github.com/users/sebersole/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-04-28T15:15:09Z","updated_at":"2015-04-30T14:55:23Z","closed_at":null,"body":"In a multi-module project, your plugin picks up each module in order to generate a feature.  You expect the plugin to be applied to the root project and then your task picks up each subproject.\r\n\r\nI'd like to make a 2-part feature request and am even willing to send you a Pull Request if you are OK with the idea in principle.  First, I would like to be able to apply the plugin at any level.  Second, I would like the ability to define which specific projects get picked up for feature generation.\r\n\r\nSome background.  I am the lead developer for Hibernate.  We have a module that aims to integrate Hibernate into OSGi containers.  Until now we have used a very buggy approach for testing that based on Arquillian and embedded Felix.  We are wanting to move to PaxExam and Karaf for testing.  Additionally we would like to start publishing a Karaf feature file.  Which lead me to you and your plugin :)\r\n\r\nThis OSGi integration is part of the hibernate-osgi module, which is part of the larger Hibernate ORM build.  So I would like to apply your plugin there.  Also, Hibernate has many modules; some should have a feature defined, some should not."},"comment":{"url":"https://api.github.com/repos/lburgazzoli/lb-gradle-plugins/issues/comments/97827748","html_url":"https://github.com/lburgazzoli/lb-gradle-plugins/issues/4#issuecomment-97827748","issue_url":"https://api.github.com/repos/lburgazzoli/lb-gradle-plugins/issues/4","id":97827748,"user":{"login":"lburgazzoli","id":1868933,"avatar_url":"https://avatars.githubusercontent.com/u/1868933?v=3","gravatar_id":"","url":"https://api.github.com/users/lburgazzoli","html_url":"https://github.com/lburgazzoli","followers_url":"https://api.github.com/users/lburgazzoli/followers","following_url":"https://api.github.com/users/lburgazzoli/following{/other_user}","gists_url":"https://api.github.com/users/lburgazzoli/gists{/gist_id}","starred_url":"https://api.github.com/users/lburgazzoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lburgazzoli/subscriptions","organizations_url":"https://api.github.com/users/lburgazzoli/orgs","repos_url":"https://api.github.com/users/lburgazzoli/repos","events_url":"https://api.github.com/users/lburgazzoli/events{/privacy}","received_events_url":"https://api.github.com/users/lburgazzoli/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T14:55:23Z","updated_at":"2015-04-30T14:55:23Z","body":"Yes kars can have multiple features file and there's no need to change the url as karaf will also search artifacts in the repository included in the kar (which looks like a standard maven repo).  Then I'd like to have the option to create multiple kars (so leave it as plural) even tough most of the time I will create one per project. \r\n\r\nI like the idea to use NamedDomainObjectContainer so I suggest to let name optional and take as example feature1 or myKar is name is not provided.  Then yes inclusions should be default.\r\n\r\nAbout extra bundles we should go for a combo like defining karafExtras by default and let developers define new configuration if they need it. The only think we should take into account is that the extra bundles may need to be tweaked like any other  bundle (start level, bnd istructions, etc) so I suppose that ```extraBundle karafExtras``` only adds the listed dependencies to the dependencies this feature has to take into account so that I can still apply  bundle customization \r\n\r\n``` \r\ndependencies {\r\n    karafExtras 'log4j:log4j:...'\r\n}\r\n\r\nkarafFeatureGen {\r\n    features {\r\n        feature1 {\r\n            project(':project-1')\r\n            project(':project-2')\r\n\r\n            extraBundle karafExtras\r\n\r\n            bundle('log4j:log4j:.*') {\r\n                wrap { \r\n                    instruction 'Bundle-SymbolicName', 'xyz'\r\n                    instruction 'Bundle-Vendor', 'acme'\r\n                }\r\n\r\n                startLevel = 10\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n\r\n\r\n"}}