Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into junit5
Browse files Browse the repository at this point in the history
# Conflicts:
#	pom.xml
  • Loading branch information
gnodet committed Dec 4, 2023
2 parents 7d2369e + de1c07b commit 4585c60
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 90 deletions.
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ under the License.
<parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugins</artifactId>
<version>39</version>
<version>41</version>
<relativePath />
</parent>

<artifactId>maven-clean-plugin</artifactId>
<version>3.3.2-SNAPSHOT</version>
<version>3.3.3-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>Apache Maven Clean Plugin</name>
Expand Down Expand Up @@ -128,6 +128,12 @@ under the License.
<classifier>no_aop</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-resolver-provider</artifactId>
Expand Down
18 changes: 18 additions & 0 deletions src/it/fast-delete/invoker.properties
Original file line number Diff line number Diff line change
@@ -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
52 changes: 52 additions & 0 deletions src/it/fast-delete/pom.xml
Original file line number Diff line number Diff line change
@@ -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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>test</groupId>
<artifactId>fast-delete</artifactId>
<version>1.0-SNAPSHOT</version>

<name>Fast delete</name>
<description>Check that fast delete is invoked.</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<fast>true</fast>
<fastDir>${project.basedir}${file.separator}.fastdir</fastDir>
</configuration>
</plugin>
</plugins>
</build>

</project>
21 changes: 21 additions & 0 deletions src/it/fast-delete/verify.groovy
Original file line number Diff line number Diff line change
@@ -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')
13 changes: 11 additions & 2 deletions src/main/java/org/apache/maven/plugins/clean/CleanMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 3 additions & 0 deletions src/site/apt/examples/delete_additional_files.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<<Note:>> The <<<fast>>> delete method will not work for any <<<fileset>>> which defines any <<<includes>>>
or <<<excludes>>>, or sets <<<followSymlinks>>> to <<<false>>>, or sets <<<useDefaultExcludes>>> to <<<true>>>.
4 changes: 2 additions & 2 deletions src/site/apt/index.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -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
<<<project.build.directory>>>, <<<project.build.outputDirectory>>>,
<<<project.build.testOutputDirectory>>>, and
Expand All @@ -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.
Expand Down
117 changes: 33 additions & 84 deletions src/site/xdoc/download.xml.vm
Original file line number Diff line number Diff line change
Expand Up @@ -23,102 +23,51 @@ under the License.
<properties>
<title>Download ${project.name} Source</title>
</properties>

<body>
<section name="Download ${project.name} ${project.version} Source">

<p>${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.</p>

<p>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.<p/>

<p>In order to guard against corrupted downloads/installations, it is highly recommended to
<a href="http://www.apache.org/dev/release-signing#verifying-signature">verify the signature</a>
of the release bundles against the public <a href="https://www.apache.org/dist/maven/KEYS">KEYS</a> used by the Apache Maven
developers.</p>
<p><strong>${project.name} ${project.version}</strong> is distributed in source format.</p>

<p>${project.name} is distributed under the <a href="http://www.apache.org/licenses/">Apache License, version 2.0</a>.</p>
<p>Use a source archive if you intend to build <strong>${project.name}</strong> yourself.</p>

<p></p>We <b>strongly</b> encourage our users to configure a Maven repository mirror closer to their location, please read <a href="/guides/mini/guide-mirror-settings.html">How to Use Mirrors for Repositories</a>.</p>

<a name="mirror"/>
<subsection name="Mirror">

<p>
[if-any logo]
<a href="[link]">
<img align="right" src="[logo]" border="0"
alt="logo"/>
</a>
[end]
The currently selected mirror is
<b>[preferred]</b>.
If you encounter a problem with this mirror,
please select another mirror.
If all mirrors are failing, there are
<i>backup</i>
mirrors
(at the end of the mirrors list) that should be available.
</p>
<p>Otherwise, simply use the ready-made binary artifacts from <strong>central repository</strong>.</p>

<form action="[location]" method="get" id="SelectMirror">
Other mirrors:
<select name="Preferred">
[if-any http]
[for http]
<option value="[http]">[http]</option>
[end]
[end]
[if-any ftp]
[for ftp]
<option value="[ftp]">[ftp]</option>
[end]
[end]
[if-any backup]
[for backup]
<option value="[backup]">[backup] (backup)</option>
[end]
[end]
</select>
<input type="submit" value="Change"/>
</form>
<p><strong>${project.name}</strong> is distributed under the <a href="https://www.apache.org/licenses/">Apache License, version 2.0</a>.</p>

<p>
You may also consult the
<a href="http://www.apache.org/mirrors/">complete list of
mirrors.</a>
<subsection name="Files">

<p>This is the current stable version of <strong>${project.name}</strong>.</p>

<table>
<thead>
<tr>
<th></th>
<th>Link</th>
<th>Checksum</th>
<th>Signature</th>
</tr>
</thead>
<tbody>
<tr>
<td>${project.name} ${project.version} (Source zip)</td>
<td><a href="https://dlcdn.apache.org/maven/plugins/${project.artifactId}-${project.version}-source-release.zip">${project.artifactId}-${project.version}-source-release.zip</a></td>
<td><a href="https://downloads.apache.org/maven/plugins/${project.artifactId}-${project.version}-source-release.zip.sha512">${project.artifactId}-${project.version}-source-release.zip.sha512</a></td>
<td><a href="https://downloads.apache.org/maven/plugins/${project.artifactId}-${project.version}-source-release.zip.asc">${project.artifactId}-${project.version}-source-release.zip.asc</a></td>
</tr>
</tbody>
</table>

<p>It is essential that you <a href="https://www.apache.org/info/verification.html">verify the integrity</a> of the downloaded file
using the checksum (.sha512 file)
or using the signature (.asc file) against the public <a href="https://downloads.apache.org/maven/KEYS">KEYS</a> used by the Apache Maven developers.
</p>

</subsection>

<subsection name="${project.name} ${project.version}">

<p>This is the current stable version of ${project.name}.</p>

<table>
<thead>
<tr>
<th></th>
<th>Link</th>
<th>Checksum</th>
<th>Signature</th>
</tr>
</thead>
<tbody>
<tr>
<td>${project.name} ${project.version} (Source zip)</td>
<td><a href="[preferred]maven/plugins/${project.artifactId}-${project.version}-source-release.zip">maven/plugins/${project.artifactId}-${project.version}-source-release.zip</a></td>
<td><a href="https://www.apache.org/dist/maven/plugins/${project.artifactId}-${project.version}-source-release.zip.sha512">maven/plugins/${project.artifactId}-${project.version}-source-release.zip.sha512</a></td>
<td><a href="https://www.apache.org/dist/maven/plugins/${project.artifactId}-${project.version}-source-release.zip.asc">maven/plugins/${project.artifactId}-${project.version}-source-release.zip.asc</a></td>
</tr>
</tbody>
</table>
</subsection>

<subsection name="Previous Versions">

<p>Older non-recommended releases can be found on our <a href="http://archive.apache.org/dist/maven/plugins/">archive site</a>.</p>

<p>It is strongly recommended to use the latest release version of <strong>${project.name}</strong> to take advantage of the newest features and bug fixes.</p>
<p>Older non-recommended releases can be found on our <a href="https://archive.apache.org/dist/maven/plugins/">archive site</a>.</p>
</subsection>
</section>
</body>
Expand Down

0 comments on commit 4585c60

Please sign in to comment.