incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1203382 - in /sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport: ArtifactDefinition.java LaunchpadPluginLifecycleParticipant.java
Date Thu, 17 Nov 2011 21:44:19 GMT
Author: justin
Date: Thu Nov 17 21:44:19 2011
New Revision: 1203382

URL: http://svn.apache.org/viewvc?rev=1203382&view=rev
Log:
SLING-2292 - dependencies added by LaunchpadPluginLifecycleParticipant should be of scope
provided

Modified:
    sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/ArtifactDefinition.java
    sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/LaunchpadPluginLifecycleParticipant.java

Modified: sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/ArtifactDefinition.java
URL: http://svn.apache.org/viewvc/sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/ArtifactDefinition.java?rev=1203382&r1=1203381&r2=1203382&view=diff
==============================================================================
--- sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/ArtifactDefinition.java
(original)
+++ sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/ArtifactDefinition.java
Thu Nov 17 21:44:19 2011
@@ -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);
     }
 
 }

Modified: sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/LaunchpadPluginLifecycleParticipant.java
URL: http://svn.apache.org/viewvc/sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/LaunchpadPluginLifecycleParticipant.java?rev=1203382&r1=1203381&r2=1203382&view=diff
==============================================================================
--- sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/LaunchpadPluginLifecycleParticipant.java
(original)
+++ sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/LaunchpadPluginLifecycleParticipant.java
Thu Nov 17 21:44:19 2011
@@ -50,6 +50,8 @@ import org.codehaus.plexus.util.xml.pull
 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 LaunchpadPluginLifecyclePar
             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 LaunchpadPluginLifecyclePar
             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));
                 }
             }
         }



Mime
View raw message