felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r618886 - in /felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin: ObrCleanRepo.java ObrDeploy.java ObrDeployFile.java ObrInstallFile.java
Date Wed, 06 Feb 2008 04:45:37 GMT
Author: mcculls
Date: Tue Feb  5 20:45:37 2008
New Revision: 618886

URL: http://svn.apache.org/viewvc?rev=618886&view=rev
Log:
FELIX-479: add supportedProjectTypes configuration option

Modified:
    felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrCleanRepo.java
    felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeploy.java
    felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeployFile.java
    felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrInstallFile.java

Modified: felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrCleanRepo.java
URL: http://svn.apache.org/viewvc/felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrCleanRepo.java?rev=618886&r1=618885&r2=618886&view=diff
==============================================================================
--- felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrCleanRepo.java
(original)
+++ felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrCleanRepo.java
Tue Feb  5 20:45:37 2008
@@ -54,6 +54,7 @@
 /**
  * Clean an OBR repository by finding and removing missing resources.
  * 
+ * @requiresProject false
  * @goal clean
  * @phase clean
  * 

Modified: felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeploy.java
URL: http://svn.apache.org/viewvc/felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeploy.java?rev=618886&r1=618885&r2=618886&view=diff
==============================================================================
--- felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeploy.java
(original)
+++ felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeploy.java
Tue Feb  5 20:45:37 2008
@@ -21,6 +21,8 @@
 
 import java.io.File;
 import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -58,6 +60,14 @@
     private String obrRepository;
 
     /**
+     * Project types which this plugin supports.
+     *
+     * @parameter
+     */
+    private List supportedProjectTypes = Arrays.asList( new String[]
+        { "jar", "bundle" } );
+
+    /**
      * @parameter expression="${project.distributionManagementArtifactRepository}"
      * @readonly
      */
@@ -107,7 +117,12 @@
 
     public void execute() throws MojoExecutionException
     {
-        if ( "NONE".equalsIgnoreCase( obrRepository ) )
+        if ( !supportedProjectTypes.contains( project.getPackaging() ) )
+        {
+            getLog().info( "Ignoring packaging type " + project.getPackaging() );
+            return;
+        }
+        else if ( "NONE".equalsIgnoreCase( obrRepository ) )
         {
             getLog().info( "OBR update disabled (enable with -DobrRepository)" );
             return;

Modified: felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeployFile.java
URL: http://svn.apache.org/viewvc/felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeployFile.java?rev=618886&r1=618885&r2=618886&view=diff
==============================================================================
--- felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeployFile.java
(original)
+++ felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrDeployFile.java
Tue Feb  5 20:45:37 2008
@@ -21,6 +21,8 @@
 
 import java.io.File;
 import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
 
 import org.apache.maven.artifact.manager.WagonManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -56,6 +58,14 @@
     private String obrRepository;
 
     /**
+     * Project types which this plugin supports.
+     *
+     * @parameter
+     */
+    private List supportedProjectTypes = Arrays.asList( new String[]
+        { "jar", "bundle" } );
+
+    /**
      * Remote repository id, used to lookup authentication settings.
      *
      * @parameter expression="${repositoryId}" default-value="remote-repository"
@@ -108,7 +118,12 @@
     {
         MavenProject project = getProject();
 
-        if ( "NONE".equalsIgnoreCase( obrRepository ) )
+        if ( !supportedProjectTypes.contains( project.getPackaging() ) )
+        {
+            getLog().info( "Ignoring packaging type " + project.getPackaging() );
+            return;
+        }
+        else if ( "NONE".equalsIgnoreCase( obrRepository ) )
         {
             getLog().info( "OBR update disabled (enable with -DobrRepository)" );
             return;

Modified: felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrInstallFile.java
URL: http://svn.apache.org/viewvc/felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrInstallFile.java?rev=618886&r1=618885&r2=618886&view=diff
==============================================================================
--- felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrInstallFile.java
(original)
+++ felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/obr/plugin/ObrInstallFile.java
Tue Feb  5 20:45:37 2008
@@ -20,6 +20,8 @@
 
 
 import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -46,6 +48,14 @@
     private String obrRepository;
 
     /**
+     * Project types which this plugin supports.
+     *
+     * @parameter
+     */
+    private List supportedProjectTypes = Arrays.asList( new String[]
+        { "jar", "bundle" } );
+
+    /**
      * Local Repository.
      * 
      * @parameter expression="${localRepository}"
@@ -59,7 +69,12 @@
     {
         MavenProject project = getProject();
 
-        if ( "NONE".equalsIgnoreCase( obrRepository ) )
+        if ( !supportedProjectTypes.contains( project.getPackaging() ) )
+        {
+            getLog().info( "Ignoring packaging type " + project.getPackaging() );
+            return;
+        }
+        else if ( "NONE".equalsIgnoreCase( obrRepository ) )
         {
             getLog().info( "OBR update disabled (enable with -DobrRepository)" );
             return;



Mime
View raw message