[ https://issues.apache.org/jira/browse/SLING-7054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130373#comment-16130373 ]
Tomek Rękawek commented on SLING-7054: -------------------------------------- //cc: [~cziegeler] > Slingstart artifacts with parametrized version not removed from the effective > slingstart model > ---------------------------------------------------------------------------------------------- > > Key: SLING-7054 > URL: https://issues.apache.org/jira/browse/SLING-7054 > Project: Sling > Issue Type: Bug > Components: Tooling > Reporter: Tomek Rękawek > Assignee: Tomek Rękawek > Priority: Minor > Fix For: Slingstart Maven Plugin 1.7.8 > > > Adding a following entry to the provisioning model: > {noformat} > [artifacts] > com.acme/my-model/1.0.0/slingstart > {noformat} > results in including the my-model to the current one. The slingfeature file > will be downloaded and merged. However, if we replace the version with a > variable: > {noformat} > [artifacts] > com.acme/my-model/${my.model.version}/slingstart > {noformat} > the slingstart will also download and include the my-model.jar file, not > useful here. > It's a result of the lines > [345-356|https://github.com/apache/sling/blob/7e8a3a110a29b743d49ef799a7c7dec50a90bd96/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java#L345-L357] > in the {{ModelPreprocessor}}: > {code} > for(final org.apache.sling.provisioning.model.Artifact r > : removeList) { > group.remove(r); > final Feature localModelFeature = > rawModel.getFeature(feature.getName()); > if ( localModelFeature != null ) { > final RunMode localRunMode = > localModelFeature.getRunMode(runMode.getNames()); > if ( localRunMode != null ) { > final ArtifactGroup localAG = > localRunMode.getArtifactGroup(group.getStartLevel()); > if ( localAG != null ) { > localAG.remove(r); > } > } > } > } > {code} > If the artifact is parametrized, it won't be removed from the localAG. -- This message was sent by Atlassian JIRA (v6.4.14#64029)