[ 
https://issues.apache.org/jira/browse/SLING-8664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16919506#comment-16919506
 ] 

Robert Munteanu commented on SLING-8664:
----------------------------------------

I have implemented the functionality in the slingstart-maven-plugin, see 
https://github.com/apache/sling-slingstart-maven-plugin/compare/feature/SLING-8664?expand=1
 .

However, there is a small problem. It seems that importing dependencies is only 
possible for POMs without classifiers. Since we are generating an artifact with 
the same GAV as the main one and a separate classifier this does not work. The 
error is 

{noformat}[ERROR] 'dependencyManagement.dependencies.dependency.classifier' for 
org.apache.sling:org.apache.sling.starter:pom:dependencies must be empty, 
imported POM cannot have a classifier. @ line 81, column 29{noformat}

Steps to test out:

1. Apply and build 
https://github.com/apache/sling-slingstart-maven-plugin/compare/feature/SLING-8664?expand=1
2. Update the sling starter to use the plugin built in the previous step
3. Add the following section to a sling project

{code:xml}    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.starter</artifactId>
                <version>12-SNAPSHOT</version>
                <type>pom</type>
                <scope>import</scope>
                <classifier>dependencies</classifier>
            </dependency>
        </dependencies>
    </dependencyManagement>{code}

> Sling Starter dependency import for projects built on top of it
> ---------------------------------------------------------------
>
>                 Key: SLING-8664
>                 URL: https://issues.apache.org/jira/browse/SLING-8664
>             Project: Sling
>          Issue Type: Improvement
>          Components: Maven Plugins and Archetypes
>            Reporter: Hans-Peter Stoerr
>            Assignee: Robert Munteanu
>            Priority: Minor
>              Labels: Sling-12-ReleaseNotes
>             Fix For: Slingstart Maven Plugin 1.9.2
>
>
> If you build projects running on top of the Sling Starter, it would be nice 
> to have an easy way to adjust the version numbers of the dependencies that 
> are included in the Sling Starter to the used Sling Starter version, since 
> there are rather a lot of those. It would be nice if the Sling Starter could 
> provide maven pom with all the dependency declarations that could be included 
> into the project in the dependencyManagement with scope 
> [import|[https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html]].
>  A switch to a new version of the Sling Starter would then just mean to the 
> As an example: we did this for our purposes in 
> [https://github.com/ist-dresden/composum-meta] (see the description at "Sling 
> Starter Dependencies") with 
> [https://github.com/ist-dresden/composum-meta/blob/develop/sling/starter/dependencies/11/pom.xml]
>  . (That might be somewhat usable for others, too, but is obviously 
> unofficial :) and mostly autogenerated.)



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to