You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2021/01/23 00:31:19 UTC

[maven-clean-plugin] branch fix updated (2a17f03 -> bc8435f)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch fix
in repository https://gitbox.apache.org/repos/asf/maven-clean-plugin.git.


 discard 2a17f03  (doc) quick fixes
     new 126b6a2  Update plugins
     new 297631d  (doc) quick fixes - tests
     new bc8435f  (doc) quick fixes - site

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2a17f03)
            \
             N -- N -- N   refs/heads/fix (bc8435f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                              | 14 +++++++++++++-
 src/site/apt/examples/delete_additional_files.apt.vm |  2 +-
 src/site/apt/examples/ignoring-errors.apt.vm         |  2 +-
 src/site/apt/examples/skipping-clean.apt.vm          |  2 +-
 src/site/apt/usage.apt.vm                            |  3 ++-
 src/site/site.xml                                    | 10 +++++++---
 6 files changed, 25 insertions(+), 8 deletions(-)


[maven-clean-plugin] 01/03: Update plugins

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch fix
in repository https://gitbox.apache.org/repos/asf/maven-clean-plugin.git

commit 126b6a2e3da31fa14d14ce014bb239cb39ea158e
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sat Jan 23 01:27:33 2021 +0100

    Update plugins
---
 pom.xml | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index abdea42..5040b59 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,11 +127,23 @@ under the License.
   <build>
     <pluginManagement>
       <plugins>
+        <!-- remove with next parent upgrade -->
+        <plugin>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>3.1.1</version>
+        </plugin>
         <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-enforcer-plugin</artifactId>
           <version>3.0.0-M3</version>
         </plugin>
+        <plugin>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>3.2.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.9.1</version>
+        </plugin>
       </plugins>
     </pluginManagement>
   </build>


[maven-clean-plugin] 03/03: (doc) quick fixes - site

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch fix
in repository https://gitbox.apache.org/repos/asf/maven-clean-plugin.git

commit bc8435f503ee04fed7905f28ad05ec3d5521793b
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sat Jan 23 01:28:06 2021 +0100

    (doc) quick fixes - site
---
 src/site/apt/examples/delete_additional_files.apt.vm |  2 +-
 src/site/apt/examples/ignoring-errors.apt.vm         |  2 +-
 src/site/apt/examples/skipping-clean.apt.vm          |  2 +-
 src/site/apt/index.apt.vm                            |  2 +-
 src/site/apt/usage.apt.vm                            |  3 ++-
 src/site/site.xml                                    | 12 ++++++++----
 6 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/site/apt/examples/delete_additional_files.apt.vm b/src/site/apt/examples/delete_additional_files.apt.vm
index c3212e0..40e5bf6 100644
--- a/src/site/apt/examples/delete_additional_files.apt.vm
+++ b/src/site/apt/examples/delete_additional_files.apt.vm
@@ -4,7 +4,7 @@
  Mike Perham
  <mp...@apache.org>
  ------
- November 2007
+ 2007-11-14
  ------
 
 ~~ Licensed to the Apache Software Foundation (ASF) under one
diff --git a/src/site/apt/examples/ignoring-errors.apt.vm b/src/site/apt/examples/ignoring-errors.apt.vm
index 80fa784..4751b4b 100644
--- a/src/site/apt/examples/ignoring-errors.apt.vm
+++ b/src/site/apt/examples/ignoring-errors.apt.vm
@@ -3,7 +3,7 @@
  ------
  Vincent Siveton
  ------
- 13 November 2007
+ 2007-11-13
  ------
 
 ~~ Licensed to the Apache Software Foundation (ASF) under one
diff --git a/src/site/apt/examples/skipping-clean.apt.vm b/src/site/apt/examples/skipping-clean.apt.vm
index 022ce40..388d023 100644
--- a/src/site/apt/examples/skipping-clean.apt.vm
+++ b/src/site/apt/examples/skipping-clean.apt.vm
@@ -3,7 +3,7 @@
  ------
  Vincent Siveton
  ------
- 13 November 2007
+ 2007-11-13
  ------
 
 ~~ Licensed to the Apache Software Foundation (ASF) under one
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index 8363b29..7958c0d 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -58,7 +58,7 @@ ${project.name}
   entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated.
   Of course, patches are welcome, too. Contributors can check out the project from our
   {{{./scm.html}source repository}} and will find supplementary information in the
-  {{{http://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}.
+  {{{https://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}.
 
 * Examples
 
diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm
index 3ec79cb..caf908f 100644
--- a/src/site/apt/usage.apt.vm
+++ b/src/site/apt/usage.apt.vm
@@ -3,7 +3,8 @@
  ------
  Edwin Punzalan
  ------
- June 29th, 2006
+ 2006-06-29
+ ------
 
 ~~ Licensed to the Apache Software Foundation (ASF) under one
 ~~ or more contributor license agreements.  See the NOTICE file
diff --git a/src/site/site.xml b/src/site/site.xml
index b32c257..d776c3d 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -19,9 +19,13 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 https://maven.apache.org/xsd/decoration-1.8.0.xsd">
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-fluido-skin</artifactId>
+    <version>1.9</version>
+  </skin>
   <body>
     <menu name="Overview">
       <item name="Introduction" href="index.html"/>
@@ -29,7 +33,7 @@ under the License.
       <item name="Usage" href="usage.html"/>
       <item name="FAQ" href="faq.html"/>
       <!-- According to https://issues.apache.org/jira/browse/MNGSITE-152 -->
-      <item name="License" href="http://www.apache.org/licenses/"/>
+      <item name="License" href="https://www.apache.org/licenses/"/>
       <item name="Download" href="download.html"/>
     </menu>
     <menu name="Examples">


[maven-clean-plugin] 02/03: (doc) quick fixes - tests

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch fix
in repository https://gitbox.apache.org/repos/asf/maven-clean-plugin.git

commit 297631d5581d11c79f9b31db8bbd0dc73909b014
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sat Jan 23 01:16:21 2021 +0100

    (doc) quick fixes - tests
---
 .../apache/maven/plugins/clean/CleanMojoTest.java  | 84 +++++-----------------
 1 file changed, 18 insertions(+), 66 deletions(-)

diff --git a/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java b/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java
index 3083cce..9bf3b63 100644
--- a/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java
@@ -19,16 +19,15 @@ package org.apache.maven.plugins.clean;
  * under the License.
  */
 
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.shared.utils.io.FileUtils;
+
 import java.io.File;
 import java.io.RandomAccessFile;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
 
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.apache.maven.plugins.clean.CleanMojo;
-import org.codehaus.plexus.util.FileUtils;
-
 /**
  * Test the clean mojo.
  *
@@ -37,20 +36,6 @@ import org.codehaus.plexus.util.FileUtils;
 public class CleanMojoTest
     extends AbstractMojoTestCase
 {
-    /** {@inheritDoc} */
-    protected void setUp()
-        throws Exception
-    {
-        super.setUp();
-    }
-
-    /** {@inheritDoc} */
-    protected void tearDown()
-        throws Exception
-    {
-        super.tearDown();
-    }
-
     /**
      * Tests the simple removal of directories
      *
@@ -63,7 +48,7 @@ public class CleanMojoTest
 
         // safety
         FileUtils.copyDirectory( new File( getBasedir(), "src/test/resources/unit/basic-clean-test" ),
-                                 new File( getBasedir(), "target/test-classes/unit/basic-clean-test" ), null, "**/.svn,**/.svn/**" );
+                                 new File( getBasedir(), "target/test-classes/unit/basic-clean-test" ) );
 
         CleanMojo mojo = (CleanMojo) lookupMojo( "clean", pluginPom );
         assertNotNull( mojo );
@@ -90,7 +75,7 @@ public class CleanMojoTest
 
         // safety
         FileUtils.copyDirectory( new File( getBasedir(), "src/test/resources/unit/nested-clean-test" ),
-                                 new File( getBasedir(), "target/test-classes/unit/nested-clean-test" ), null, "**/.svn,**/.svn/**" );
+                                 new File( getBasedir(), "target/test-classes/unit/nested-clean-test" ) );
 
         CleanMojo mojo = (CleanMojo) lookupMojo( "clean", pluginPom );
         assertNotNull( mojo );
@@ -115,7 +100,7 @@ public class CleanMojoTest
 
         // safety
         FileUtils.copyDirectory( new File( getBasedir(), "src/test/resources/unit/empty-clean-test" ),
-                                 new File( getBasedir(), "target/test-classes/unit/empty-clean-test" ), null, "**/.svn,**/.svn/**" );
+                                 new File( getBasedir(), "target/test-classes/unit/empty-clean-test" ) );
 
         CleanMojo mojo = (CleanMojo) lookupEmptyMojo( "clean", pluginPom );
         assertNotNull( mojo );
@@ -143,7 +128,7 @@ public class CleanMojoTest
 
         // safety
         FileUtils.copyDirectory( new File( getBasedir(), "src/test/resources/unit/fileset-clean-test" ),
-                                 new File( getBasedir(), "target/test-classes/unit/fileset-clean-test" ), null, "**/.svn,**/.svn/**" );
+                                 new File( getBasedir(), "target/test-classes/unit/fileset-clean-test" ) );
 
         CleanMojo mojo = (CleanMojo) lookupMojo( "clean", pluginPom );
         assertNotNull( mojo );
@@ -179,7 +164,7 @@ public class CleanMojoTest
 
         // safety
         FileUtils.copyDirectory( new File( getBasedir(), "src/test/resources/unit/invalid-directory-test" ),
-                                 new File( getBasedir(), "target/test-classes/unit/invalid-directory-test" ), null, "**/.svn,**/.svn/**" );
+                                 new File( getBasedir(), "target/test-classes/unit/invalid-directory-test" ) );
 
         CleanMojo mojo = (CleanMojo) lookupMojo( "clean", pluginPom );
         assertNotNull( mojo );
@@ -208,7 +193,7 @@ public class CleanMojoTest
 
         // safety
         FileUtils.copyDirectory( new File( getBasedir(), "src/test/resources/unit/missing-directory-test" ),
-                                 new File( getBasedir(), "target/test-classes/unit/missing-directory-test" ), null, "**/.svn,**/.svn/**" );
+                                 new File( getBasedir(), "target/test-classes/unit/missing-directory-test" ) );
 
         CleanMojo mojo = (CleanMojo) lookupMojo( "clean", pluginPom );
         assertNotNull( mojo );
@@ -239,39 +224,22 @@ public class CleanMojoTest
 
         // safety
         FileUtils.copyDirectory( new File( getBasedir(), "src/test/resources/unit/locked-file-test" ),
-                                 new File( getBasedir(), "target/test-classes/unit/locked-file-test" ), null, "**/.svn,**/.svn/**" );
+                                 new File( getBasedir(), "target/test-classes/unit/locked-file-test" ) );
 
         CleanMojo mojo = (CleanMojo) lookupMojo( "clean", pluginPom );
         assertNotNull( mojo );
 
         File f = new File( getBasedir(), "target/test-classes/unit/locked-file-test/buildDirectory/file.txt" );
-        FileChannel channel = null;
-        FileLock lock = null;
-        try
+        try ( FileChannel channel = new RandomAccessFile( f, "rw" ).getChannel();
+              FileLock ignored = channel.lock() )
         {
-            channel = new RandomAccessFile( f, "rw" ).getChannel();
-            lock = channel.lock();
-
             mojo.execute();
-
             fail( "Should fail to delete a file that is locked" );
         }
         catch ( MojoExecutionException expected )
         {
             assertTrue( true );
         }
-        finally
-        {
-            if ( lock != null )
-            {
-                lock.release();
-            }
-
-            if ( channel != null )
-            {
-                channel.close();
-            }
-        }
     }
 
     /**
@@ -295,40 +263,23 @@ public class CleanMojoTest
 
         // safety
         FileUtils.copyDirectory( new File( getBasedir(), "src/test/resources/unit/locked-file-test" ),
-                                 new File( getBasedir(), "target/test-classes/unit/locked-file-test" ), null, "**/.svn,**/.svn/**" );
+                                 new File( getBasedir(), "target/test-classes/unit/locked-file-test" ) );
 
         CleanMojo mojo = (CleanMojo) lookupMojo( "clean", pluginPom );
         setVariableValueToObject( mojo, "failOnError", Boolean.FALSE );
         assertNotNull( mojo );
 
         File f = new File( getBasedir(), "target/test-classes/unit/locked-file-test/buildDirectory/file.txt" );
-        FileChannel channel = null;
-        FileLock lock = null;
-        try
+        try ( FileChannel channel = new RandomAccessFile( f, "rw" ).getChannel();
+              FileLock ignored = channel.lock())
         {
-            channel = new RandomAccessFile( f, "rw" ).getChannel();
-            lock = channel.lock();
-
             mojo.execute();
-
             assertTrue( true );
         }
         catch ( MojoExecutionException expected )
         {
             fail( "Should display a warning when deleting a file that is locked" );
         }
-        finally
-        {
-            if ( lock != null )
-            {
-                lock.release();
-            }
-
-            if ( channel != null )
-            {
-                channel.close();
-            }
-        }
     }
 
     /**
@@ -346,6 +297,7 @@ public class CleanMojoTest
      */
     private boolean checkEmpty( String dir )
     {
-        return new File( dir ).listFiles().length == 0;
+        File[] files = new File( dir ).listFiles();
+        return files == null || files.length == 0;
     }
 }