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 09:16:25 UTC
[sling-maven-launchpad-plugin] 13/29: SLING-2292 - dependencies
added by LaunchpadPluginLifecycleParticipant should be of scope provided
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag maven-launchpad-plugin-2.1.2
in repository https://gitbox.apache.org/repos/asf/sling-maven-launchpad-plugin.git
commit 5d54df55508ba6c5342e359f1ff65b2977858bcf
Author: Justin Edelson <ju...@apache.org>
AuthorDate: Thu Nov 17 21:44:19 2011 +0000
SLING-2292 - dependencies added by LaunchpadPluginLifecycleParticipant should be of scope provided
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/maven/maven-launchpad-plugin@1203382 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/maven/projectsupport/ArtifactDefinition.java | 9 +++++----
.../projectsupport/LaunchpadPluginLifecycleParticipant.java | 8 +++++---
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/apache/sling/maven/projectsupport/ArtifactDefinition.java b/src/main/java/org/apache/sling/maven/projectsupport/ArtifactDefinition.java
index 43b08f6..6af4cb0 100644
--- a/src/main/java/org/apache/sling/maven/projectsupport/ArtifactDefinition.java
+++ b/src/main/java/org/apache/sling/maven/projectsupport/ArtifactDefinition.java
@@ -216,8 +216,8 @@ public class ArtifactDefinition {
bnd.setStartLevel(startLevel);
return bnd;
}
-
- public Dependency toDependency() {
+
+ public Dependency toDependency(String scope) {
Dependency dep = new Dependency();
dep.setArtifactId(artifactId);
dep.setGroupId(groupId);
@@ -226,6 +226,7 @@ public class ArtifactDefinition {
dep.setType(type);
}
dep.setClassifier(classifier);
+ dep.setScope(scope);
return dep;
}
@@ -237,8 +238,8 @@ public class ArtifactDefinition {
return new ArtifactDefinition(dependency, startLevel).toBundle();
}
- public static Dependency toDependency(Bundle bundle) {
- return new ArtifactDefinition(bundle, 0).toDependency();
+ public static Dependency toDependency(Bundle bundle, String scope) {
+ return new ArtifactDefinition(bundle, 0).toDependency(scope);
}
}
diff --git a/src/main/java/org/apache/sling/maven/projectsupport/LaunchpadPluginLifecycleParticipant.java b/src/main/java/org/apache/sling/maven/projectsupport/LaunchpadPluginLifecycleParticipant.java
index 606a6a2..57dd147 100644
--- a/src/main/java/org/apache/sling/maven/projectsupport/LaunchpadPluginLifecycleParticipant.java
+++ b/src/main/java/org/apache/sling/maven/projectsupport/LaunchpadPluginLifecycleParticipant.java
@@ -50,6 +50,8 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
public class LaunchpadPluginLifecycleParticipant extends AbstractMavenLifecycleParticipant {
private static final String PLUGIN_ID = "maven-launchpad-plugin";
+
+ private static final String PROVIDED = "provided";
@Requirement
private Logger log;
@@ -104,12 +106,12 @@ public class LaunchpadPluginLifecycleParticipant extends AbstractMavenLifecycleP
if (hasPreparePackageExecution()) {
if (includeDefaultBundles && !isCurrentArtifact(project, defaultBundleList)) {
log.debug(String.format("adding default bundle list (%s) to dependencies of project %s", defaultBundleList, project));
- project.getDependencies().add(defaultBundleList.toDependency());
+ project.getDependencies().add(defaultBundleList.toDependency(PROVIDED));
}
if (hasJarPackagingExecution()) {
log.debug(String.format("adding jar web support (%s) to dependencies of project %s", jarWebSupport, project));
- project.getDependencies().add(jarWebSupport.toDependency());
+ project.getDependencies().add(jarWebSupport.toDependency(PROVIDED));
}
}
}
@@ -134,7 +136,7 @@ public class LaunchpadPluginLifecycleParticipant extends AbstractMavenLifecycleP
for (StartLevel startLevel : bundleList.getStartLevels()) {
for (Bundle bundle : startLevel.getBundles()) {
log.debug(String.format("adding bundle (%s) from bundle list to dependencies of project %s", bundle, project));
- project.getDependencies().add(ArtifactDefinition.toDependency(bundle));
+ project.getDependencies().add(ArtifactDefinition.toDependency(bundle, PROVIDED));
}
}
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.