You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "wilx (via GitHub)" <gi...@apache.org> on 2023/10/18 12:17:30 UTC

[PR] [MCLEAN-102] Fix fast delete feature. [maven-clean-plugin]

wilx opened a new pull request, #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32

   Pass `GlobSelector` instance into `cleaner.delete()` only if it matters. Passing `GlobSelector` always breaks the fast delete feature.
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [X] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MCLEAN) filed 
          for the change (usually before you start working on it).  Trivial changes like typos do not 
          require a JIRA issue.  Your pull request should address just this issue, without 
          pulling in other changes.
    - [X] Each commit in the pull request should have a meaningful subject line and body.
    - [X] Format the pull request title like `[MCLEAN-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MCLEAN-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the 
          commit message.
    - [X] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [X] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will 
          be performed on your pull request automatically.
    - [X] You have run the integration tests successfully (`mvn -Prun-its clean verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [X] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1768998145

   So it looks like when we use includes/excludes fastDelete will not works - correct?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "chabala (via GitHub)" <gi...@apache.org>.
chabala commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1768742507

   Is this a symptom of `GlobSelector` not working on Windows at all?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on code in PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#discussion_r1364259343


##########
src/it/fast-delete/pom.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/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>@pom.version@</version>

Review Comment:
   should be `@project.version@` ... in other tests we need fix also - but in separate PR 😄 



##########
src/it/fast-delete/pom.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/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>@pom.version@</version>

Review Comment:
   should be `@project.version@` ... in other tests we need fix also - but in separate PR 😄 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "wilx (via GitHub)" <gi...@apache.org>.
wilx commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1768492359

   @slawekjaranowski I have added the test.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "wilx (via GitHub)" <gi...@apache.org>.
wilx commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1768991916

   > Is this a symptom of `GlobSelector` not working on Windows at all?
   
   The issue is not with `GlobSelector`. The issue is that the `GlobSelector` instance passed into `cleaner.delete()` stops the fast method from taking effect: https://github.com/apache/maven-clean-plugin/blob/06876c185555de04040448d7fb7e5287b96307de/src/main/java/org/apache/maven/plugins/clean/Cleaner.java#L122-L127
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "wilx (via GitHub)" <gi...@apache.org>.
wilx commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1769070764

   > > > So it looks like when we use includes/excludes fastDelete will not works - correct?
   > > 
   > > 
   > > Yes and it makes sense. The fast delete moves the entire directory. If you want to delete only some files, you cannot move the directory because the files that should stay there would not.
   > 
   > Yes make sense.
   > 
   > Can you update documentation? https://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html (source in project src/site/apt/examples/delete_additional_files.apt.vm)
   > 
   > We should explain such behaviors.
   
   I have added a note to the `delete_additional_files.apt.vm`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature for filesets [maven-clean-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski merged PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on code in PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#discussion_r1363956331


##########
src/it/fast-delete/invoker.properties:
##########
@@ -0,0 +1 @@
+invoker.goals = install clean -Dorg.slf4j.simpleLogger.showThreadName=true -X -e

Review Comment:
   missed license header 😄 



##########
src/it/fast-delete/invoker.properties:
##########
@@ -0,0 +1 @@
+invoker.goals = install clean -Dorg.slf4j.simpleLogger.showThreadName=true -X -e

Review Comment:
   missed license header 😄 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "chabala (via GitHub)" <gi...@apache.org>.
chabala commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1769067418

   > > So it looks like when we use includes/excludes fastDelete will not works - correct?
   > 
   > Yes and it makes sense. The fast delete moves the entire directory. If you want to delete only some files, you cannot move the directory because the files that should stay there would not.
   
   I agree. Looks like fast delete has always required `GlobSelector` to be null, since it was added in #6. So, it has never worked for this `Fileset` parsing path, only the directory parsing path above it at: https://github.com/apache/maven-clean-plugin/blob/f9da326e1b1ad4648d24e646b51cc7bc0a1baad7/src/main/java/org/apache/maven/plugins/clean/CleanMojo.java#L250-L254


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1768876305

   > Is this a symptom of `GlobSelector` not working on Windows at all?
   
   Good point - it should be also checked.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-102] Fix fast delete feature. [maven-clean-plugin]

Posted by "wilx (via GitHub)" <gi...@apache.org>.
wilx commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1768328143

   JIRA: https://issues.apache.org/jira/projects/MCLEAN/issues/MCLEAN-102


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature for filesets [maven-clean-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1769522737

   @wilx  - thanks for fix


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "wilx (via GitHub)" <gi...@apache.org>.
wilx commented on code in PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#discussion_r1364294236


##########
src/it/fast-delete/pom.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/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>@pom.version@</version>

Review Comment:
   Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1768441320

   @wilx thanks
   Is it possible to make an IT to be sure for regressions with next changes?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "wilx (via GitHub)" <gi...@apache.org>.
wilx commented on code in PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#discussion_r1363961577


##########
src/it/fast-delete/invoker.properties:
##########
@@ -0,0 +1 @@
+invoker.goals = install clean -Dorg.slf4j.simpleLogger.showThreadName=true -X -e

Review Comment:
   Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1769046065

   > > So it looks like when we use includes/excludes fastDelete will not works - correct?
   > 
   > Yes and it makes sense. The fast delete moves the entire directory. If you want to delete only some files, you cannot move the directory because the files that should stay there would not.
   
   Yes make sense.
   
   Can you update documentation?
   https://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html
   (source in project src/site/apt/examples/delete_additional_files.apt.vm)
   
   We should explain such behaviors.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCLEAN-111] Fix fast delete feature. [maven-clean-plugin]

Posted by "wilx (via GitHub)" <gi...@apache.org>.
wilx commented on PR #32:
URL: https://github.com/apache/maven-clean-plugin/pull/32#issuecomment-1769003627

   > So it looks like when we use includes/excludes fastDelete will not works - correct?
   
   Yes and it makes sense. The fast delete moves the entire directory. If you want to delete only some files, you cannot move the directory because the files that should stay there would not.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org