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

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 3786a5e  Simplify :src:dist:clean configuration, ensure 
/lib/junit/test.jar is removed on clean
3786a5e is described below

commit 3786a5e61340a6eccb3594db03d919e5c94f7af8
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Tue Dec 28 12:42:12 2021 +0300

    Simplify :src:dist:clean configuration, ensure /lib/junit/test.jar is 
removed on clean
    
    In practice, clean should not be required, however, making it a bit more 
precise makes sense anyway.
    
    See https://bz.apache.org/bugzilla/show_bug.cgi?id=63914
    fixes #659
---
 src/dist/build.gradle.kts | 15 +++++++--------
 xdocs/changes.xml         |  1 +
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/dist/build.gradle.kts b/src/dist/build.gradle.kts
index d414fb3..9fc8478 100644
--- a/src/dist/build.gradle.kts
+++ b/src/dist/build.gradle.kts
@@ -92,14 +92,13 @@ dependencies {
     buildDocs("org.jdom:jdom")
 }
 
-tasks.named(BasePlugin.CLEAN_TASK_NAME).configure {
-    doLast {
-        // createDist can't yet remove outdated jars (e.g. when dependency is 
updated to a newer version)
-        // so we enhance "clean" task to kill the jars
-        delete(fileTree("$rootDir/bin") { include("ApacheJMeter.jar") })
-        delete(fileTree("$rootDir/lib") { include("*.jar") })
-        delete(fileTree("$rootDir/lib/ext") { include("ApacheJMeter*.jar") })
-    }
+tasks.clean {
+    // copyLibs uses Sync task, so it can't predict all the possible output 
files (e.g. from previous executions)
+    // So we register patterns to remove explicitly
+    delete(fileTree("$rootDir/bin") { include("ApacheJMeter.jar") })
+    delete(fileTree("$rootDir/lib") { include("*.jar") })
+    delete(fileTree("$rootDir/lib/ext") { include("ApacheJMeter*.jar") })
+    delete(fileTree("$rootDir/lib/junit") { include("test.jar") })
 }
 
 // Libs are populated dynamically since we can't get the full set of 
dependencies
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index de4a9ca..a3a9cfb 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -265,6 +265,7 @@ however, the profile can't be updated while the test is 
running.
   <li><bug>65300</bug>IllegalAccessError when opening file dialog with Java 
16</li>
   <li><bug>65336</bug>Blank labels when different elements had the same 
name</li>
   <li><bug>65522</bug>Restart doesn't work, when parameters contain spaces</li>
+  <li><bug>63914</bug>Simplify :src:dist:clean configuration, ensure 
/lib/junit/test.jar is removed on clean</li>
 </ul>
 
  <!--  =================== Thanks =================== -->

Reply via email to