Author: lenzi
Date: Tue Sep 18 10:18:39 2007
New Revision: 576984

URL: http://svn.apache.org/viewvc?rev=576984&view=rev
Log:
Modified plugin in order to be able to skip deploy and repository goal.
 - maven-obr-plugin:deploy goal is disable by default
 - maven-obr-plugin:repository goal is enable by default


Modified:
    
felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrDeploy.java
    
felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrInstall.java

Modified: 
felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrDeploy.java
URL: 
http://svn.apache.org/viewvc/felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrDeploy.java?rev=576984&r1=576983&r2=576984&view=diff
==============================================================================
--- 
felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrDeploy.java
 (original)
+++ 
felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrDeploy.java
 Tue Sep 18 10:18:39 2007
@@ -99,6 +99,14 @@
     private String m_fileInLocalRepo;
 
     /**
+     * Enable/Disable this goal
+     * @description If true evrything the goal do nothing, the goal just skip 
over 
+     * @parameter expression="${maven.obr.installToRemoteOBR}" 
default-value="false"
+     */
+    private boolean installToRemoteOBR;    
+
+    
+    /**
      * main method for this goal.
      * @implements org.apache.maven.plugin.Mojo.execute 
      * @throws MojoExecutionException if the plugin failed
@@ -106,7 +114,13 @@
      */
     public void execute() throws MojoExecutionException, MojoFailureException {
         getLog().info("Obr-deploy start:");
-
+        if(!installToRemoteOBR)
+        {
+               getLog().info("maven-obr-plugin:deploy goal is disable due to 
one of the following reason:");
+               getLog().info(" - 'installToRemoteOBR' configuration set to 
false");
+               getLog().info(" - JVM property maven.obr.installToRemoteOBR set 
to false");
+               return;
+        }
         ArtifactRepository ar = 
m_project.getDistributionManagementArtifactRepository();
 
         // locate the obr.xml file

Modified: 
felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrInstall.java
URL: 
http://svn.apache.org/viewvc/felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrInstall.java?rev=576984&r1=576983&r2=576984&view=diff
==============================================================================
--- 
felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrInstall.java
 (original)
+++ 
felix/sandbox/clement/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrInstall.java
 Tue Sep 18 10:18:39 2007
@@ -74,9 +74,9 @@
     /**
      * Enable/Disable this goal
      * @description If true evrything the goal do nothing, the goal just skip 
over 
-     * @parameter default="false"
+     * @parameter expression="${maven.obr.installToLocalOBR}" 
default-value="true"
      */
-    private boolean disableAutoInstall;    
+    private boolean installToLocalOBR;    
     
 
     /**
@@ -91,8 +91,11 @@
      */
     public void execute() throws MojoExecutionException {
         getLog().info("Obr Plugin starts:");
-        if(disableAutoInstall){
-               getLog().info("OBR repository goal disable by 
'disableAutoInstall' configuration");
+        if(!installToLocalOBR)
+        {
+               getLog().info("maven-obr-plugin:repository goal is disable due 
to one of the following reason:");
+               getLog().info(" - 'installToLocalOBR' configuration set to 
false");
+               getLog().info(" - JVM property maven.obr.installToLocalOBR set 
to false");
                return;
         }
         


Reply via email to