This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag maven-sling-plugin-2.0.2-incubator in repository https://gitbox.apache.org/repos/asf/sling-maven-sling-plugin.git
commit 95b877ad79a7704c858a379e124bd0bc0c7462f5 Author: Felix Meschberger <[email protected]> AuthorDate: Mon Sep 24 09:24:25 2007 +0000 Allow skipping of bundle deploy goal even though it might be configured git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/maven-sling-plugin@578723 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/bundlesupport/BundleDeployMojo.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java b/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java index 8dae336..e837d4c 100644 --- a/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java +++ b/src/main/java/org/apache/sling/maven/bundlesupport/BundleDeployMojo.java @@ -36,6 +36,17 @@ import org.apache.maven.project.MavenProject; */ 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. * @@ -62,6 +73,17 @@ public class BundleDeployMojo extends AbstractBundleDeployMojo { 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; } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
