From f6989953dbd623f70c42a9dce09b85b953dfb646 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 7 Jul 2023 20:18:44 +0000 Subject: [PATCH 1/9] Type: fill --> file (#28) * Type: fill --> file --> submit --- src/site/apt/index.apt.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm index 7958c0d..b18252d 100644 --- a/src/site/apt/index.apt.vm +++ b/src/site/apt/index.apt.vm @@ -52,7 +52,7 @@ ${project.name} already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the {{{./mailing-lists.html}mail archive}}. - If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our + If you feel like the plugin is missing a feature or has a defect, you can submit a feature request or bug report in our {{{./issue-management.html}issue tracker}}. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. From 06876c185555de04040448d7fb7e5287b96307de Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Wed, 18 Oct 2023 18:29:44 +0200 Subject: [PATCH 2/9] [MCLEAN-112] Bump parent to 40 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0436869..c379f45 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ under the License. org.apache.maven.plugins maven-plugins - 39 + 40 From cbdff3bf402d00dfde514cd83ccf59944d54b734 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Wed, 18 Oct 2023 18:37:34 +0200 Subject: [PATCH 3/9] [MCLEAN-113] Downgrade plexus-xml to 3.0.0 It is only needed for testing so move to test scope --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index c379f45..a6a714c 100644 --- a/pom.xml +++ b/pom.xml @@ -77,12 +77,6 @@ under the License. plexus-utils 4.0.0 - - org.codehaus.plexus - plexus-xml - 4.0.0 - provided - @@ -98,6 +92,12 @@ under the License. 3.3.0 test + + org.codehaus.plexus + plexus-xml + 3.0.0 + test + org.apache.maven maven-compat From 4bb70fd82698dc53f2f2573f95173dbbcff5b0f5 Mon Sep 17 00:00:00 2001 From: Abdullah Khan Date: Thu, 28 Sep 2023 20:17:21 +0530 Subject: [PATCH 4/9] Grammer mistake fixed --- src/site/apt/index.apt.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm index b18252d..2f21f03 100644 --- a/src/site/apt/index.apt.vm +++ b/src/site/apt/index.apt.vm @@ -36,7 +36,7 @@ ${project.name} The Clean Plugin only has one goal. * {{{./clean-mojo.html}clean:clean}} attempts to clean a project's working - directory of the files that we're generated at build-time. By default, it + directory of the files that were generated at build-time. By default, it discovers and deletes the directories configured in <<>>, <<>>, <<>>, and From 536c36739b3cfdf73a4bee543555d6714a03580d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Haisman?= Date: Thu, 19 Oct 2023 00:49:34 +0200 Subject: [PATCH 5/9] [MCLEAN-111] Fix fast delete feature for filesets (#32) * Fix fast delete feature. * Add integration test for the fast delete feature. * Document the limitation of the fast delete method. --- src/it/fast-delete/invoker.properties | 18 +++++++ src/it/fast-delete/pom.xml | 52 +++++++++++++++++++ src/it/fast-delete/verify.groovy | 21 ++++++++ .../apache/maven/plugins/clean/CleanMojo.java | 13 ++++- .../examples/delete_additional_files.apt.vm | 3 ++ 5 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 src/it/fast-delete/invoker.properties create mode 100644 src/it/fast-delete/pom.xml create mode 100644 src/it/fast-delete/verify.groovy diff --git a/src/it/fast-delete/invoker.properties b/src/it/fast-delete/invoker.properties new file mode 100644 index 0000000..808c49e --- /dev/null +++ b/src/it/fast-delete/invoker.properties @@ -0,0 +1,18 @@ +# 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. + +invoker.goals = install clean -Dorg.slf4j.simpleLogger.showThreadName=true -X -e diff --git a/src/it/fast-delete/pom.xml b/src/it/fast-delete/pom.xml new file mode 100644 index 0000000..9203056 --- /dev/null +++ b/src/it/fast-delete/pom.xml @@ -0,0 +1,52 @@ + + + + + + 4.0.0 + + test + fast-delete + 1.0-SNAPSHOT + + Fast delete + Check that fast delete is invoked. + + + UTF-8 + + + + + + org.apache.maven.plugins + maven-clean-plugin + @project.version@ + + true + ${project.basedir}${file.separator}.fastdir + + + + + + diff --git a/src/it/fast-delete/verify.groovy b/src/it/fast-delete/verify.groovy new file mode 100644 index 0000000..59f5940 --- /dev/null +++ b/src/it/fast-delete/verify.groovy @@ -0,0 +1,21 @@ +/* + * 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. + */ + +File buildLog = new File(basedir, 'build.log') +return buildLog.text.contains('mvn-background-cleaner') diff --git a/src/main/java/org/apache/maven/plugins/clean/CleanMojo.java b/src/main/java/org/apache/maven/plugins/clean/CleanMojo.java index 3dff361..afc0df4 100644 --- a/src/main/java/org/apache/maven/plugins/clean/CleanMojo.java +++ b/src/main/java/org/apache/maven/plugins/clean/CleanMojo.java @@ -258,8 +258,17 @@ public void execute() throws MojoExecutionException { if (fileset.getDirectory() == null) { throw new MojoExecutionException("Missing base directory for " + fileset); } - GlobSelector selector = new GlobSelector( - fileset.getIncludes(), fileset.getExcludes(), fileset.isUseDefaultExcludes()); + final String[] includes = fileset.getIncludes(); + final String[] excludes = fileset.getExcludes(); + final boolean useDefaultExcludes = fileset.isUseDefaultExcludes(); + final GlobSelector selector; + if ((includes != null && includes.length != 0) + || (excludes != null && excludes.length != 0) + || useDefaultExcludes) { + selector = new GlobSelector(includes, excludes, useDefaultExcludes); + } else { + selector = null; + } cleaner.delete( fileset.getDirectory(), selector, fileset.isFollowSymlinks(), failOnError, retryOnError); } diff --git a/src/site/apt/examples/delete_additional_files.apt.vm b/src/site/apt/examples/delete_additional_files.apt.vm index 40e5bf6..84ed079 100644 --- a/src/site/apt/examples/delete_additional_files.apt.vm +++ b/src/site/apt/examples/delete_additional_files.apt.vm @@ -73,3 +73,6 @@ Delete Additional Files Not Exposed to Maven You could also define file set rules in a parent POM. In this case, the clean plugin adds the subproject basedir to the defined relative path. + + <> The <<>> delete method will not work for any <<>> which defines any <<>> + or <<>>, or sets <<>> to <<>>, or sets <<>> to <<>>. \ No newline at end of file From 8d533d99c2885d1fc683a51dec8a5422528d1c52 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sun, 22 Oct 2023 14:30:31 +0200 Subject: [PATCH 6/9] [MCLEAN-114] Refresh download page --- src/site/xdoc/download.xml.vm | 117 ++++++++++------------------------ 1 file changed, 33 insertions(+), 84 deletions(-) diff --git a/src/site/xdoc/download.xml.vm b/src/site/xdoc/download.xml.vm index 3f71035..8f28f05 100644 --- a/src/site/xdoc/download.xml.vm +++ b/src/site/xdoc/download.xml.vm @@ -23,102 +23,51 @@ under the License. Download ${project.name} Source +
-

${project.name} ${project.version} is distributed in source format. Use a source archive if you intend to build - ${project.name} yourself. Otherwise, simply use the ready-made binary artifacts from central repository.

- -

You will be prompted for a mirror - if the file is not found on yours, please be patient, as it may take 24 - hours to reach all mirrors.

- -

In order to guard against corrupted downloads/installations, it is highly recommended to - verify the signature - of the release bundles against the public KEYS used by the Apache Maven - developers.

+

${project.name} ${project.version} is distributed in source format.

-

${project.name} is distributed under the Apache License, version 2.0.

+

Use a source archive if you intend to build ${project.name} yourself.

-

We strongly encourage our users to configure a Maven repository mirror closer to their location, please read How to Use Mirrors for Repositories.

- - - - -

- [if-any logo] - - logo - - [end] - The currently selected mirror is - [preferred]. - If you encounter a problem with this mirror, - please select another mirror. - If all mirrors are failing, there are - backup - mirrors - (at the end of the mirrors list) that should be available. -

+

Otherwise, simply use the ready-made binary artifacts from central repository.

-
- Other mirrors: - - -
+

${project.name} is distributed under the Apache License, version 2.0.

-

- You may also consult the - complete list of - mirrors. + + +

This is the current stable version of ${project.name}.

+ + + + + + + + + + + + + + + + + + +
LinkChecksumSignature
${project.name} ${project.version} (Source zip)${project.artifactId}-${project.version}-source-release.zip${project.artifactId}-${project.version}-source-release.zip.sha512${project.artifactId}-${project.version}-source-release.zip.asc
+ +

It is essential that you verify the integrity of the downloaded file + using the checksum (.sha512 file) + or using the signature (.asc file) against the public KEYS used by the Apache Maven developers.

- - - -

This is the current stable version of ${project.name}.

- - - - - - - - - - - - - - - - - - -
LinkChecksumSignature
${project.name} ${project.version} (Source zip)maven/plugins/${project.artifactId}-${project.version}-source-release.zipmaven/plugins/${project.artifactId}-${project.version}-source-release.zip.sha512maven/plugins/${project.artifactId}-${project.version}-source-release.zip.asc
-
- -

Older non-recommended releases can be found on our archive site.

- +

It is strongly recommended to use the latest release version of ${project.name} to take advantage of the newest features and bug fixes.

+

Older non-recommended releases can be found on our archive site.

From 28759c4f9f442fb87b4359e9070a4b5fedc2e170 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Mon, 23 Oct 2023 08:00:41 +0200 Subject: [PATCH 7/9] [maven-release-plugin] prepare release maven-clean-plugin-3.3.2 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a6a714c..a756538 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ under the License. maven-clean-plugin - 3.3.2-SNAPSHOT + 3.3.2 maven-plugin Apache Maven Clean Plugin @@ -42,7 +42,7 @@ under the License. scm:git:https://gitbox.apache.org/repos/asf/maven-clean-plugin.git scm:git:https://gitbox.apache.org/repos/asf/maven-clean-plugin.git - HEAD + maven-clean-plugin-3.3.2 https://github.com/apache/maven-clean-plugin/tree/${project.scm.tag} @@ -62,7 +62,7 @@ under the License. 3.2.5 - 2023-06-14T18:50:52Z + 2023-10-23T06:00:28Z From cd0942e74e5228985db8cbb002752ee5d039986a Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Mon, 23 Oct 2023 08:00:49 +0200 Subject: [PATCH 8/9] [maven-release-plugin] prepare for next development iteration --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a756538..65ab2cf 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ under the License. maven-clean-plugin - 3.3.2 + 3.3.3-SNAPSHOT maven-plugin Apache Maven Clean Plugin @@ -42,7 +42,7 @@ under the License. scm:git:https://gitbox.apache.org/repos/asf/maven-clean-plugin.git scm:git:https://gitbox.apache.org/repos/asf/maven-clean-plugin.git - maven-clean-plugin-3.3.2 + HEAD https://github.com/apache/maven-clean-plugin/tree/${project.scm.tag} @@ -62,7 +62,7 @@ under the License. 3.2.5 - 2023-10-23T06:00:28Z + 2023-10-23T06:00:49Z From de1c07b21f54f25f09a7dcbc142d78e031c9c995 Mon Sep 17 00:00:00 2001 From: Karl Heinz Marbaise Date: Mon, 13 Nov 2023 19:56:24 +0100 Subject: [PATCH 9/9] [MCLEAN-115] - Upgrade maven-plugin parent to 41 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 65ab2cf..d30f050 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ under the License. org.apache.maven.plugins maven-plugins - 40 + 41