incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r578723 - /incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java
Date Mon, 24 Sep 2007 09:24:25 GMT
Author: fmeschbe
Date: Mon Sep 24 02:24:25 2007
New Revision: 578723

URL: http://svn.apache.org/viewvc?rev=578723&view=rev
Log:
Allow skipping of bundle deploy goal even though it might be configured

Modified:
    incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java

Modified: incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java?rev=578723&r1=578722&r2=578723&view=diff
==============================================================================
--- incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java
(original)
+++ incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java
Mon Sep 24 02:24:25 2007
@@ -36,6 +36,17 @@
  */
 public class BundleDeployMojo extends AbstractBundleDeployMojo {
 
+    /**
+     * Whether to skip this step even though it has been configured in the
+     * project to be executed. This property may be set by the
+     * <code>sling.deploy.skip</code> comparable to the <code>maven.test.skip</code>
+     * property to prevent running the unit tests.
+     * 
+     * @parameter expression="${sling.deploy.skip}" default-value="false"
+     * @required
+     */
+    private boolean skip;
+    
 	/**
      * The directory for the generated JAR.
      *
@@ -61,6 +72,17 @@
      */
     private MavenProject project;
 
+    @Override
+    public void execute() throws MojoExecutionException {
+        // don't do anything, if this step is to be skipped
+        if (skip) {
+            getLog().debug("Skipping bundle deployment as instructed");
+            return;
+        }
+
+        super.execute();
+    }
+    
     @Override
     protected String getJarFileName() {
         return buildDirectory + "/" + jarName;



Mime
View raw message