commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtom...@apache.org
Subject commons-release-plugin git commit: writing tests for plugin being disabled by not setting commons.distSvnStagingUrl
Date Tue, 27 Feb 2018 13:24:03 GMT
Repository: commons-release-plugin
Updated Branches:
  refs/heads/master 931dc5278 -> f37d774f9


writing tests for plugin being disabled by not setting commons.distSvnStagingUrl


Project: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/commit/f37d774f
Tree: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/tree/f37d774f
Diff: http://git-wip-us.apache.org/repos/asf/commons-release-plugin/diff/f37d774f

Branch: refs/heads/master
Commit: f37d774f90fabb6afd268b0a4912edd4afe88e07
Parents: 931dc52
Author: Rob Tompkins <chtompki@gmail.com>
Authored: Tue Feb 27 08:23:53 2018 -0500
Committer: Rob Tompkins <chtompki@gmail.com>
Committed: Tue Feb 27 08:23:53 2018 -0500

----------------------------------------------------------------------
 .../CommonsDistributionDetachmentMojo.java      |  5 +-
 .../mojos/CommonsDistributionStagingMojo.java   |  5 +-
 .../mojos/CommonsSiteCompressionMojo.java       |  5 +-
 .../CommonsDistributionDetachmentMojoTest.java  | 41 +++++++++++----
 .../CommonsDistributionStagingMojoTest.java     | 26 ++++++++-
 .../mojos/CommonsSiteCompressionMojoTest.java   | 28 +++++++++-
 .../compress-site/compress-site-disabled.xml    | 52 ++++++++++++++++++
 .../compress-site/compress-site-failure.xml     |  1 +
 .../mojos/compress-site/compress-site.xml       |  1 +
 .../detach-distributions-disabled.xml           | 51 ++++++++++++++++++
 .../stage-distributions-disabled.xml            | 55 ++++++++++++++++++++
 11 files changed, 253 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
index 72f632c..83d45d7 100644
--- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
+++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
@@ -17,6 +17,7 @@
 package org.apache.commons.release.plugin.mojos;
 
 import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.release.plugin.SharedFunctions;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -94,8 +95,8 @@ public class CommonsDistributionDetachmentMojo extends AbstractMojo {
 
     @Override
     public void execute() throws MojoExecutionException {
-        if ("".equals(distSvnStagingUrl)) {
-            getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin
will not run");
+        if (StringUtils.isEmpty(distSvnStagingUrl)) {
+            getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin
will not run.");
             return;
         }
         getLog().info("Detaching Assemblies");

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java
b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java
index 1eb36c3..361e8a2 100644
--- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java
+++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.java
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.release.plugin.mojos;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.release.plugin.SharedFunctions;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -121,8 +122,8 @@ public class CommonsDistributionStagingMojo extends AbstractMojo {
 
     @Override
     public void execute() throws MojoExecutionException, MojoFailureException {
-        if ("".equals(distSvnStagingUrl)) {
-            getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin
will not run");
+        if (StringUtils.isEmpty(distSvnStagingUrl)) {
+            getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin
will not run.");
             return;
         }
         if (!workingDirectory.exists()) {

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java
b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java
index d4af916..8ca88f8 100644
--- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java
+++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java
@@ -18,6 +18,7 @@ package org.apache.commons.release.plugin.mojos;
 
 import org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator;
 import org.apache.commons.compress.archivers.zip.ScatterZipOutputStream;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.release.plugin.SharedFunctions;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -87,8 +88,8 @@ public class CommonsSiteCompressionMojo extends AbstractMojo {
 
     @Override
     public void execute() throws MojoExecutionException, MojoFailureException {
-        if ("".equals(distSvnStagingUrl)) {
-            getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin
will not run");
+        if (StringUtils.isEmpty(distSvnStagingUrl)) {
+            getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin
will not run.");
             return;
         }
         if (!siteDirectory.exists()) {

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.java
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.java
index 4ea0353..d59e582 100644
--- a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.java
+++ b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.java
@@ -17,6 +17,8 @@
 package org.apache.commons.release.plugin.mojos;
 
 import org.apache.maven.plugin.testing.MojoRule;
+import org.codehaus.plexus.util.FileUtils;
+import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -32,6 +34,8 @@ import static org.junit.Assert.assertNotNull;
  * @author chtompki
  */
 public class CommonsDistributionDetachmentMojoTest {
+    
+    private static final String COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH = "target/testing-commons-release-plugin";
 
     @Rule
     public MojoRule rule = new MojoRule() {
@@ -46,6 +50,14 @@ public class CommonsDistributionDetachmentMojoTest {
 
     private CommonsDistributionDetachmentMojo mojo;
 
+    @Before
+    public void setUp() throws Exception {
+        File testingDirectory = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH);
+        if (testingDirectory.exists()) {
+            FileUtils.deleteDirectory(testingDirectory);
+        }
+    }
+
     @Test
     public void testSuccess() throws Exception {
         File testPom = new File("src/test/resources/mojos/detach-distributions/detach-distributions.xml");
@@ -53,15 +65,15 @@ public class CommonsDistributionDetachmentMojoTest {
         assertTrue(testPom.exists());
         mojo = (CommonsDistributionDetachmentMojo) rule.lookupMojo("detach-distributions",
testPom);
         mojo.execute();
-        File detachedTarGz = new File("target/testing-commons-release-plugin/mockAttachedTar.tar.gz");
-        File detachedTarGzAsc = new File("target/testing-commons-release-plugin/mockAttachedTar.tar.gz.asc");
-        File detachedTarMd5 = new File("target/testing-commons-release-plugin/mockAttachedTar.tar.gz.md5");
-        File detachedTarGzSha1 = new File("target/testing-commons-release-plugin/mockAttachedTar.tar.gz.sha1");
-        File detachedZip = new File("target/testing-commons-release-plugin/mockAttachedZip.zip");
-        File detachedZipAsc = new File("target/testing-commons-release-plugin/mockAttachedZip.zip.asc");
-        File detachedZipMd5 = new File("target/testing-commons-release-plugin/mockAttachedZip.zip.md5");
-        File detachedZipSha1 = new File("target/testing-commons-release-plugin/mockAttachedZip.zip.sha1");
-        File notDetachedMockAttachedFile = new File("target/testing-commons-release-plugin/mockAttachedFile.html");
+        File detachedTarGz = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/mockAttachedTar.tar.gz");
+        File detachedTarGzAsc = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/mockAttachedTar.tar.gz.asc");
+        File detachedTarMd5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/mockAttachedTar.tar.gz.md5");
+        File detachedTarGzSha1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/mockAttachedTar.tar.gz.sha1");
+        File detachedZip = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/mockAttachedZip.zip");
+        File detachedZipAsc = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/mockAttachedZip.zip.asc");
+        File detachedZipMd5 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/mockAttachedZip.zip.md5");
+        File detachedZipSha1 = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/mockAttachedZip.zip.sha1");
+        File notDetachedMockAttachedFile = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH
+ "/mockAttachedFile.html");
         assertTrue(detachedTarGz.exists());
         assertTrue(detachedTarGzAsc.exists());
         assertTrue(detachedTarMd5.exists());
@@ -72,4 +84,15 @@ public class CommonsDistributionDetachmentMojoTest {
         assertTrue(detachedZipSha1.exists());
         assertFalse(notDetachedMockAttachedFile.exists());
     }
+
+    @Test
+    public void testDisabled() throws Exception {
+        File testPom = new File("src/test/resources/mojos/detach-distributions/detach-distributions-disabled.xml");
+        assertNotNull(testPom);
+        assertTrue(testPom.exists());
+        mojo = (CommonsDistributionDetachmentMojo) rule.lookupMojo("detach-distributions",
testPom);
+        mojo.execute();
+        File testingDirectory = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH);
+        assertFalse(testingDirectory.exists());
+    }
 }

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java
index 213cc5e..bf3906e 100644
--- a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java
+++ b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.java
@@ -17,12 +17,15 @@
 package org.apache.commons.release.plugin.mojos;
 
 import org.apache.maven.plugin.testing.MojoRule;
+import org.codehaus.plexus.util.FileUtils;
+import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
 import java.io.File;
 
 import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 
 /**
@@ -33,6 +36,8 @@ import static org.junit.Assert.assertNotNull;
  */
 public class CommonsDistributionStagingMojoTest {
 
+    private static final String COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH = "target/testing-commons-release-plugin";
+
     @Rule
     public MojoRule rule = new MojoRule() {
         @Override
@@ -48,6 +53,14 @@ public class CommonsDistributionStagingMojoTest {
 
     private CommonsDistributionStagingMojo mojoForTest;
 
+    @Before
+    public void setUp() throws Exception {
+        File testingDirectory = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH);
+        if (testingDirectory.exists()) {
+            FileUtils.deleteDirectory(testingDirectory);
+        }
+    }
+
     @Test
     public void testSuccess() throws Exception {
         File testPom = new File("src/test/resources/mojos/stage-distributions/stage-distributions.xml");
@@ -62,7 +75,18 @@ public class CommonsDistributionStagingMojoTest {
         File releaseNotesBasedir = new File("src/test/resources/mojos/stage-distributions/");
         mojoForTest.setBasedir(releaseNotesBasedir);
         mojoForTest.execute();
-        File targetScmDirectory = new File("target/testing-commons-release-plugin/scm");
+        File targetScmDirectory = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/scm");
         assertTrue(targetScmDirectory.exists());
     }
+
+    @Test
+    public void testDisabled() throws Exception {
+        File testPom = new File("src/test/resources/mojos/stage-distributions/stage-distributions-disabled.xml");
+        assertNotNull(testPom);
+        assertTrue(testPom.exists());
+        mojoForTest = (CommonsDistributionStagingMojo) rule.lookupMojo("stage-distributions",
testPom);
+        mojoForTest.execute();
+        File testingDirectory = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH);
+        assertFalse(testingDirectory.exists());
+    }
 }

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/test/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.java
b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.java
index cd01944..f69533a 100644
--- a/src/test/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.java
+++ b/src/test/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.java
@@ -18,6 +18,8 @@ package org.apache.commons.release.plugin.mojos;
 
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.testing.MojoRule;
+import org.codehaus.plexus.util.FileUtils;
+import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -25,6 +27,7 @@ import java.io.File;
 
 import static junit.framework.TestCase.assertTrue;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 
 /**
@@ -35,6 +38,8 @@ import static org.junit.Assert.assertNotNull;
  */
 public class CommonsSiteCompressionMojoTest {
 
+    private static final String COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH = "target/testing-commons-release-plugin";
+
     @Rule
     public MojoRule rule = new MojoRule() {
         @Override
@@ -48,14 +53,24 @@ public class CommonsSiteCompressionMojoTest {
 
     protected CommonsSiteCompressionMojo mojo;
 
+    @Before
+    public void setUp() throws Exception {
+        File testingDirectory = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH);
+        if (testingDirectory.exists()) {
+            FileUtils.deleteDirectory(testingDirectory);
+        }
+    }
+
     @Test
     public void testCompressSiteSuccess() throws Exception {
+        File testingDirectory = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH);
+        testingDirectory.mkdir();
         File testPom = new File("src/test/resources/mojos/compress-site/compress-site.xml");
         assertNotNull(testPom);
         assertTrue(testPom.exists());
         mojo = (CommonsSiteCompressionMojo) rule.lookupMojo("compress-site", testPom);
         mojo.execute();
-        File siteZip = new File("target/testing-commons-release-plugin/site.zip");
+        File siteZip = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH + "/site.zip");
         assertTrue(siteZip.exists());
     }
 
@@ -73,4 +88,15 @@ public class CommonsSiteCompressionMojoTest {
             );
         }
     }
+
+    @Test
+    public void testDisabled() throws Exception {
+        File testPom = new File("src/test/resources/mojos/compress-site/compress-site-disabled.xml");
+        assertNotNull(testPom);
+        assertTrue(testPom.exists());
+        mojo = (CommonsSiteCompressionMojo) rule.lookupMojo("compress-site", testPom);
+        mojo.execute();
+        File testingDirectory = new File(COMMONS_RELEASE_PLUGIN_TEST_DIR_PATH);
+        assertFalse(testingDirectory.exists());
+    }
 }

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/test/resources/mojos/compress-site/compress-site-disabled.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/mojos/compress-site/compress-site-disabled.xml b/src/test/resources/mojos/compress-site/compress-site-disabled.xml
new file mode 100644
index 0000000..59d669c
--- /dev/null
+++ b/src/test/resources/mojos/compress-site/compress-site-disabled.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.commons.plugin.my.unit</groupId>
+  <artifactId>compress-site-disabled-test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+  <name>Test MyMojo</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-release-plugin</artifactId>
+        <configuration>
+          <workingDirectory>target/testing-commons-release-plugin</workingDirectory>
+          <siteDirectory>${basedir}/target/test-classes/mojos/compress-site/example-site</siteDirectory>
+          <distSvnStagingUrl>something</distSvnStagingUrl>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/test/resources/mojos/compress-site/compress-site-failure.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/mojos/compress-site/compress-site-failure.xml b/src/test/resources/mojos/compress-site/compress-site-failure.xml
index 1c9c6ad..7d511d7 100644
--- a/src/test/resources/mojos/compress-site/compress-site-failure.xml
+++ b/src/test/resources/mojos/compress-site/compress-site-failure.xml
@@ -44,6 +44,7 @@
                 <configuration>
                     <workingDirectory>target/testing-commons-release-plugin</workingDirectory>
                     <siteDirectory>${basedir}/target/test-classes/mojos/junk</siteDirectory>
+                    <distSvnStagingUrl>something</distSvnStagingUrl>
                 </configuration>
             </plugin>
         </plugins>

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/test/resources/mojos/compress-site/compress-site.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/mojos/compress-site/compress-site.xml b/src/test/resources/mojos/compress-site/compress-site.xml
index 53323e1..256feb6 100644
--- a/src/test/resources/mojos/compress-site/compress-site.xml
+++ b/src/test/resources/mojos/compress-site/compress-site.xml
@@ -44,6 +44,7 @@
                 <configuration>
                     <workingDirectory>target/testing-commons-release-plugin</workingDirectory>
                     <siteDirectory>${basedir}/target/test-classes/mojos/compress-site/example-site</siteDirectory>
+                    <distSvnStagingUrl>something</distSvnStagingUrl>
                 </configuration>
             </plugin>
         </plugins>

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/test/resources/mojos/detach-distributions/detach-distributions-disabled.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/mojos/detach-distributions/detach-distributions-disabled.xml
b/src/test/resources/mojos/detach-distributions/detach-distributions-disabled.xml
new file mode 100644
index 0000000..0a244e1
--- /dev/null
+++ b/src/test/resources/mojos/detach-distributions/detach-distributions-disabled.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.commons.release.plugin.unit</groupId>
+    <artifactId>detach-distributions-test</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>Mock Pom For Testing CommonsDistributionDetachmentMojo</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.1</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-release-plugin</artifactId>
+                <configuration>
+                    <project implementation="org.apache.commons.release.plugin.stubs.DistributionDetachmentProjectStub"
/>
+                    <workingDirectory>target/testing-commons-release-plugin</workingDirectory>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/commons-release-plugin/blob/f37d774f/src/test/resources/mojos/stage-distributions/stage-distributions-disabled.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/mojos/stage-distributions/stage-distributions-disabled.xml
b/src/test/resources/mojos/stage-distributions/stage-distributions-disabled.xml
new file mode 100644
index 0000000..75e038b
--- /dev/null
+++ b/src/test/resources/mojos/stage-distributions/stage-distributions-disabled.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.commons.release.plugin.unit</groupId>
+    <artifactId>stage-distributions-test</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>Mock Pom For Testing CommonsDistributionStagingMojo</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.1</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-release-plugin</artifactId>
+                <configuration>
+                    <project implementation="org.apache.commons.release.plugin.stubs.DistributionDetachmentProjectStub"
/>
+                    <workingDirectory>target/testing-commons-release-plugin</workingDirectory>
+                    <distCheckoutDirectory>target/testing-commons-release-plugin/scm</distCheckoutDirectory>
+                    <releaseNotesFile>src/test/resources/mojos/stage-distributions/RELEASE-NOTES.txt</releaseNotesFile>
+                    <distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/release-plugin</distSvnStagingUrl>
+                    <dryRun>true</dryRun>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file


Mime
View raw message