[jira] [Comment Edited] (SLING-3014) [build] Generate SCR descriptors using Maven
[ https://issues.apache.org/jira/browse/SLING-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15980863#comment-15980863 ] Konrad Windszus edited comment on SLING-3014 at 4/24/17 8:33 AM: - bq. Additionally, it would be interesting to file a bug report towards bnd, just in case they are willing to support this scenario. Right now this is impossible for them to support. The problem is that bnd always generates the full JAR (in memory) not only the manifest and the other metadata. Therefore it is crucial for the {{bnd-maven-plugin}} to extract the JAR to the classes directory to detect which resources have been created by bnd itself and which ones have been there before. Unless the bnd-API is gonna be changed to allow to only create manifest and metadata there is little hope. I created https://github.com/bndtools/bnd/issues/2013 to be able to only generate the manifest/metadata. was (Author: kwin): bq. Additionally, it would be interesting to file a bug report towards bnd, just in case they are willing to support this scenario. Right now this is impossible for them to support. The problem is that bnd always generates the full JAR (in memory) not only the manifest and the other metadata. Therefore it is crucial for the {{bnd-maven-plugin}} to extract the JAR to the classes directory to detect which resources have been created by bnd itself and which ones have been there before. Unless the bnd-API is gonna be changed to allow to only create manifest and metadata there is little hope. Therefore I think for the time-being we have to live with the workaround. > [build] Generate SCR descriptors using Maven > > > Key: SLING-3014 > URL: https://issues.apache.org/jira/browse/SLING-3014 > Project: Sling > Issue Type: Task > Components: IDE >Reporter: Robert Munteanu >Priority: Minor > Fix For: Sling Eclipse IDE 1.2.0 > > Attachments: SLING-3014-1.patch > > > _Edit_: updated the issue title to reflect the fact that we're looking to use > Maven, not a specific plug-in. > Since we're starting to use SCR descriptors when building the Sling IDE tools > it would be nice to generate them using the maven-scr-plugin. I have the > build working in the CLI, but not yet in the IDE ( see > http://dev.eclipse.org/mhonarc/lists/tycho-user/msg04764.html ). Once that is > done I'll commit my changes to trunk. > Note that plain Maven projects work just fine, this is about Tycho-driven > builds. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (SLING-3014) [build] Generate SCR descriptors using Maven
[ https://issues.apache.org/jira/browse/SLING-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15965936#comment-15965936 ] Konrad Windszus edited comment on SLING-3014 at 4/12/17 2:33 PM: - With the PDE annotation builder the OSGI-INF folder is being placed in the root directory of the project. From there it is being picked up from the Eclipse Laucher as well. Unfortunately bnd-maven-plugin writes the OSGI-INF always to the folder given by configuration {{classesDir}} (https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BndMavenPlugin.java#L270). Unfortunately {{classesDir}} is not only the used for expanding the JAR but also for generating the classpath for Bnd, therefore you cannot simply reconfigure that. Also the {{bnd-maven-plugin}} will only write those classes/resources which have not been existing in the target directory already (to distinguish between files being created by bnd and those which just have been wrapped in the JAR). Therefore coming up with a PR for the {{bnd-maven-plugin}} which allows to write the OSGI-INF somewhere else is not easy. But I found a simple workaround: {code} maven-resources-plugin copy-resources prepare-package copy-resources ${basedir}/OSGI-INF ${project.build.outputDirectory}/OSGI-INF false {code} That will copy the OSGI-INF from {{target/classes}} to the root directory of the project from where it is being picked up by both PDE and Tycho. Of course the OSGI-INF needs to be listed in {{build.properties}} {{bin.includes}} as well. was (Author: kwin): With the PDE annotation builder the OSGI-INF folder is being placed in the root directory of the project. From there it is being picked up from the Eclipse Laucher as well. Unfortunately bnd-maven-plugin writes the OSGI-INF always to the folder given by configuration {{classesDir}} (https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BndMavenPlugin.java#L270). Unfortunately {{classesDir}} is not only the used for expanding the JAR but also for generating the classpath for Bnd, therefore you cannot simply reconfigure that. Also the {{bnd-maven-plugin}} will only write those classes/resources which have not been existing in the target directory already (to distinguish between files being created by bnd and those which just have been wrapped in the JAR). But I found a simple workaround: {code} maven-resources-plugin copy-resources prepare-package copy-resources ${basedir}/OSGI-INF ${project.build.outputDirectory}/OSGI-INF false {code} That will copy the OSGI-INF to the root directory of the project from where it is being picked up by both PDE and Tycho. Of course the OSGI-INF needs to be listed in {{build.properties}} {{bin.includes}} as well. > [build] Generate SCR descriptors using Maven > > > Key: SLING-3014 > URL: https://issues.apache.org/jira/browse/SLING-3014 > Project: Sling > Issue Type: Task > Components: IDE >Reporter: Robert Munteanu >Priority: Minor > Fix For: Sling Eclipse IDE 1.2.0 > > Attachments: SLING-3014-1.patch > > > _Edit_: updated the issue title to reflect the fact that we're looking to use > Maven, not a specific plug-in. > Since we're starting to use SCR descriptors when building the Sling IDE tools > it would be nice to generate them using the maven-scr-plugin. I have the > build working in the CLI, but not yet in the IDE ( see > http://dev.eclipse.org/mhonarc/lists/tycho-user/msg04764.html ). Once that is > done I'll commit my changes to trunk. > Note that plain Maven projects work just fine, this is about Tycho-driven > builds. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (SLING-3014) [build] Generate SCR descriptors using Maven
[ https://issues.apache.org/jira/browse/SLING-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15965936#comment-15965936 ] Konrad Windszus edited comment on SLING-3014 at 4/12/17 2:32 PM: - With the PDE annotation builder the OSGI-INF folder is being placed in the root directory of the project. From there it is being picked up from the Eclipse Laucher as well. Unfortunately bnd-maven-plugin writes the OSGI-INF always to the folder given by configuration {{classesDir}} (https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BndMavenPlugin.java#L270). Unfortunately {{classesDir}} is not only the used for expanding the JAR but also for generating the classpath for Bnd, therefore you cannot simply reconfigure that. Also the {{bnd-maven-plugin}} will only write those classes/resources which have not been existing in the target directory already (to distinguish between files being created by bnd and those which just have been wrapped in the JAR). But I found a simple workaround: {code} maven-resources-plugin copy-resources prepare-package copy-resources ${basedir}/OSGI-INF ${project.build.outputDirectory}/OSGI-INF false {code} That will copy the OSGI-INF to the root directory of the project from where it is being picked up by both PDE and Tycho. Of course the OSGI-INF needs to be listed in {{build.properties}} {{bin.includes}} as well. was (Author: kwin): With the PDE annotation builder the OSGI-INF folder is being placed in the root directory of the project. From there it is being picked up from the Eclipse Laucher as well. Unfortunately bnd-maven-plugin writes the OSGI-INF always to the folder given by configuration {{classesDir}} (https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BndMavenPlugin.java#L270). Unfortunately {{classesDir}} is not only the used for expanding the JAR but also for generating the classpath for Bnd, therefore you cannot simply reconfigure that. I will try to come up with a PR for {{bnd-maven-plugin}} which allows to extract the JAR somewhere else. > [build] Generate SCR descriptors using Maven > > > Key: SLING-3014 > URL: https://issues.apache.org/jira/browse/SLING-3014 > Project: Sling > Issue Type: Task > Components: IDE >Reporter: Robert Munteanu >Priority: Minor > Fix For: Sling Eclipse IDE 1.2.0 > > Attachments: SLING-3014-1.patch > > > _Edit_: updated the issue title to reflect the fact that we're looking to use > Maven, not a specific plug-in. > Since we're starting to use SCR descriptors when building the Sling IDE tools > it would be nice to generate them using the maven-scr-plugin. I have the > build working in the CLI, but not yet in the IDE ( see > http://dev.eclipse.org/mhonarc/lists/tycho-user/msg04764.html ). Once that is > done I'll commit my changes to trunk. > Note that plain Maven projects work just fine, this is about Tycho-driven > builds. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (SLING-3014) [build] Generate SCR descriptors using Maven
[ https://issues.apache.org/jira/browse/SLING-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15625358#comment-15625358 ] Robert Munteanu edited comment on SLING-3014 at 11/1/16 1:00 PM: - Fixed by using the {{bnd-maven-plugin}}, which worked out-of-the-box. One issue which still needs to be done manually is adding a {noformat}Service-Component: OSGI-INF/*.xml{noformat} line to the MANIFEST.MF file, as tycho and the bnd-maven-plugin aren't integrated. That is more than acceptable to me, as this need to be done once per bundle, and now XML descriptors no longer need to be maintained by hand. Changes done in https://svn.apache.org/r1767491 was (Author: rombert): Fixed by using the {{bnd-maven-plugin}}, which worked out-of-the-box. One issue which still needs to be done manually is adding a {noformat}Service-Component: OSGI-INF/*.xml{noformat} line to the MANIFEST.MF file, as tycho and the bnd-maven-plugin aren't integrated. That is more than acceptable to me, as this need to be done once per bundle, and now XML descriptors no longer need to be maintained by hand. > [build] Generate SCR descriptors using Maven > > > Key: SLING-3014 > URL: https://issues.apache.org/jira/browse/SLING-3014 > Project: Sling > Issue Type: Task > Components: IDE >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Minor > Fix For: Sling Eclipse IDE 1.1.2 > > Attachments: SLING-3014-1.patch > > > _Edit_: updated the issue title to reflect the fact that we're looking to use > Maven, not a specific plug-in. > Since we're starting to use SCR descriptors when building the Sling IDE tools > it would be nice to generate them using the maven-scr-plugin. I have the > build working in the CLI, but not yet in the IDE ( see > http://dev.eclipse.org/mhonarc/lists/tycho-user/msg04764.html ). Once that is > done I'll commit my changes to trunk. > Note that plain Maven projects work just fine, this is about Tycho-driven > builds. -- This message was sent by Atlassian JIRA (v6.3.4#6332)