You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:26:16 UTC
[sling-slingstart-maven-plugin] 05/18: SLING-4600 : Migrate
launchpad/test-bundles to provisioning model
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.1.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit 5a664a1dbd64984b934d5e157baaa2b16c3ebe9d
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Apr 9 14:09:10 2015 +0000
SLING-4600 : Migrate launchpad/test-bundles to provisioning model
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1672359 13f79535-47bb-0310-9956-ffa450edef68
---
.../slingstart/DependencyLifecycleParticipant.java | 35 +++++++++++-----------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java b/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java
index be9fde5..0eb48ac 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java
@@ -117,25 +117,26 @@ public class DependencyLifecycleParticipant extends AbstractMavenLifecyclePartic
ModelUtils.storeEffectiveModel(project, effectiveModel);
- // start with base artifact
- final org.apache.sling.provisioning.model.Artifact base = ModelUtils.getBaseArtifact(effectiveModel);
- final String[] classifiers = new String[] {null, BuildConstants.CLASSIFIER_APP, BuildConstants.CLASSIFIER_WEBAPP};
- for(final String c : classifiers) {
- final Dependency dep = new Dependency();
- dep.setGroupId(base.getGroupId());
- dep.setArtifactId(base.getArtifactId());
- dep.setVersion(base.getVersion());
- dep.setType(base.getType());
- dep.setClassifier(c);
- if ( BuildConstants.CLASSIFIER_WEBAPP.equals(c) ) {
- dep.setType(BuildConstants.TYPE_WAR);
- }
- dep.setScope(PROVIDED);
+ if ( project.getPackaging().equals(BuildConstants.PACKAGING_SLINGSTART ) ) {
+ // start with base artifact
+ final org.apache.sling.provisioning.model.Artifact base = ModelUtils.getBaseArtifact(effectiveModel);
+ final String[] classifiers = new String[] {null, BuildConstants.CLASSIFIER_APP, BuildConstants.CLASSIFIER_WEBAPP};
+ for(final String c : classifiers) {
+ final Dependency dep = new Dependency();
+ dep.setGroupId(base.getGroupId());
+ dep.setArtifactId(base.getArtifactId());
+ dep.setVersion(base.getVersion());
+ dep.setType(base.getType());
+ dep.setClassifier(c);
+ if ( BuildConstants.CLASSIFIER_WEBAPP.equals(c) ) {
+ dep.setType(BuildConstants.TYPE_WAR);
+ }
+ dep.setScope(PROVIDED);
- log.debug("- adding dependency " + dep);
- project.getDependencies().add(dep);
+ log.debug("- adding dependency " + dep);
+ project.getDependencies().add(dep);
+ }
}
-
addDependencies(effectiveModel, log, project);
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.