[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16997832#comment-16997832 ] Andreas Schaefer commented on SLING-8875: - [~cziegeler] The classifier 'wax-api' is the classifier of the resulting slingosgifeature file id. I made it required but that can be undone if this does not work out. That said I struggle with the property 'includeArtifactExtension' as I am not sure what it is for. Do you have a use case for it? > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: OSGi Feature Maven Plugin 1.1.14 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16997828#comment-16997828 ] Andreas Schaefer commented on SLING-8875: - I finished the migration of the create-fm goal into the include-artifact goal as well as the support for additional feature files to be included into the final feature model file like for example a repoinit extension. There are now 3 it test cases for this goal to showcase how it is used and to test any further changes. > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: OSGi Feature Maven Plugin 1.1.14 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16989438#comment-16989438 ] Carsten Ziegeler commented on SLING-8875: - [~andysch] I assume you have a feature that has the classifier "wfx-api" in src/main/features ? If that's the case, we might have a bug in the IncludeArtifact mojo > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: slingfeature-maven-plugin 1.1.12 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16988963#comment-16988963 ] Andreas Schaefer commented on SLING-8875: - [~cziegeler] I am not sure how to attach and additional feature in the Include Artifact mojo? I placed a JSON file into src/main/features folder but that is not attached aka included in the generated JSON file. My plugin config looks like this: {code:java} org.apache.sling slingfeature-maven-plugin ${slingfeature-maven-plugin.version} true analyze package include-artifact wfx-api compile 20 {code} > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: slingfeature-maven-plugin 1.1.12 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16988511#comment-16988511 ] Carsten Ziegeler commented on SLING-8875: - [~andysch] Good point with the naming, yes, we should rename it to IncludeArtifactMojo.java and also fix the comment at the top :) If you need additional things that are specified in a feature model like repo init or configurations, the IncludeArtifact mojo allows to attach to an existing feature model. So you can have a feature model in src/main/features with just repo init and configurations, and then add the main artifact to it. With your addition, you can then also add the compile time dependencies to it > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: slingfeature-maven-plugin 1.1.12 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16988319#comment-16988319 ] Andreas Schaefer commented on SLING-8875: - [~cziegeler] Sorry, I got confused between the "includeArtifact" property of the aggregate-features goal and the actual "include-artifact" goal. I mistook the class IncludeArtifact.java as the property class and overlooked that it is a Mojo (maybe we should rename it to "IncludeArtifactMojo.java" to avoid confusion). I can merge the create-fm-descriptor into the include-artifact as they seem to do the same thing even though I think the naming might be misleading but that is fine if it is documented. My code is based on the CP Converter code and I just took any code necessary to make it work. I will go ahead and merge my code into the include-artifact mojo and get ride of the unnecessary code. In my code I was adding compile dependencies to the FM as they are not provided by other FMs (otherwise they would not be in compile scope). That said there is also the question if we want to allow the creator to add Repo-Init code snippets to this FM. I have a project where my code needs to have a System User created and set permissions on it. > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: slingfeature-maven-plugin 1.1.12 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987588#comment-16987588 ] Carsten Ziegeler commented on SLING-8875: - The IncludeArtifact mojo creates a feature model and adds the main artifact to it; it's not expecting any input; it can use an existing feature model and append the main artifact to it. However, I see the benefit of having a separate mojo that generates a feature model based on dependencies independent of IncludeArtifact (and yes, that feature model could then be used as input for IncludeArtifact) I think the current PR contains some unused code, like the addConfiguration method in the feature manager. Also runmode handling shouldn't be part of it. > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: slingfeature-maven-plugin 1.1.12 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987378#comment-16987378 ] Andreas Schaefer commented on SLING-8875: - I published a new branch in the Sling JCR Packageinit project which contains the usage of this goal: {code:java} org.apache.sling slingfeature-maven-plugin ${slingfeature-maven-plugin.version} true create-fm-descriptor package create-fm-descriptor jcr-packageinit {code} and then published a demo version of the Sling FM Starter project in the Sling Whiteboard (sling-org-apache-feature-model-starter) which then uses this FM Descriptor: {code:java} org.apache.sling slingfeature-maven-plugin ${slingfeature-maven-plugin.version} true src/main/fm aggregate-base-feature generate-test-sources aggregate-features sling12 **/*.json org.apache.sling org.apache.sling.jcr.packageinit 0.0.1-SNAPSHOT jcr-packageinit slingosgifeature attach-base-feature process-test-sources attach-features {code} > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: slingfeature-maven-plugin 1.1.12 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987363#comment-16987363 ] Andreas Schaefer commented on SLING-8875: - The includeArtifact expects a JSon file and cannot deal with POM files. The 'create-fm-descriptor' is there to create the FM descriptor that is then can be used in the 'includeArtifact'. Let me know if I am missing something here. > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: slingfeature-maven-plugin 1.1.12 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987336#comment-16987336 ] Carsten Ziegeler commented on SLING-8875: - I don't understand all of the code in your new mojo, but we already have IncludeArtifact which looks similar: it creates a feature model out of the main artifact (or adds it to an existing feature model of that project). It seems that your mojo is adding dependencies from the maven pom in addition. If that is correct we could probably add a boolean switch to the existing mojo? (The naming might not be perfect, but we can look at that too) > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: slingfeature-maven-plugin 1.1.12 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-8875) Create new Goal to create a FM Descriptor from a Maven Module
[ https://issues.apache.org/jira/browse/SLING-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987248#comment-16987248 ] Andreas Schaefer commented on SLING-8875: - Create PR for a basic implementation. For now it will create a FM descriptor that just embeds its bundle and all compile dependencies. > Create new Goal to create a FM Descriptor from a Maven Module > - > > Key: SLING-8875 > URL: https://issues.apache.org/jira/browse/SLING-8875 > Project: Sling > Issue Type: New Feature > Components: Feature Model >Affects Versions: slingfeature-maven-plugin 1.1.10 >Reporter: Andreas Schaefer >Assignee: Andreas Schaefer >Priority: Major > Fix For: slingfeature-maven-plugin 1.1.12 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to use FM Descriptor in projects modules should be creating and > exposing their FM Descriptors in local / remote Maven repositories. This way > an assembler can take these FMs and build up its Sling instance. > To avoid making each module to write their own FM Descriptor we should have a > Goal in the SlingFeature Maven Plugin that does that automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005)