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 2020/04/15 22:00:40 UTC

[maven-antrun-plugin] branch MANTRUN-224 created (now 6b99a7e)

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

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


      at 6b99a7e  [MANTRUN-224] Upgrade tests to JUnit5

This branch includes the following new commits:

     new 734f2f2  [MANTRUN-224] Require Java 8
     new 6b99a7e  [MANTRUN-224] Upgrade tests to JUnit5

The 2 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.



[maven-antrun-plugin] 01/02: [MANTRUN-224] Require Java 8

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

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

commit 734f2f2d60340a1920d11fa3af438b06063eae21
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Wed Apr 15 23:52:40 2020 +0200

    [MANTRUN-224] Require Java 8
---
 Jenkinsfile | 2 +-
 pom.xml     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index e9f05f7..6acbc65 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,4 +17,4 @@
  * under the License.
  */
 
-asfMavenTlpPlgnBuild()
+asfMavenTlpPlgnBuild(jdk:[8','11','14','15'])
diff --git a/pom.xml b/pom.xml
index bab68b3..5ee366f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,7 +63,7 @@ under the License.
 
   <properties>
     <mavenVersion>3.0.5</mavenVersion>
-    <javaVersion>7</javaVersion>
+    <javaVersion>8</javaVersion>
     <project.build.outputTimestamp>2020-04-12T07:51:40Z</project.build.outputTimestamp>
   </properties>
 


[maven-antrun-plugin] 02/02: [MANTRUN-224] Upgrade tests to JUnit5

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

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

commit 6b99a7e2d3ea26952704d6de5383cf76412bc3e5
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Wed Apr 15 23:53:27 2020 +0200

    [MANTRUN-224] Upgrade tests to JUnit5
---
 pom.xml                                            | 12 +++------
 src/it/MANTRUN-208/pom.xml                         |  6 ++---
 src/it/antrun-default-test/pom.xml                 |  6 ++---
 src/it/classpath-ref-test/pom.xml                  |  6 ++---
 src/it/classpath-test-scope-test/pom.xml           |  6 ++---
 src/it/env-var-test/pom.xml                        |  6 ++---
 src/it/filesets-test/pom.xml                       |  8 +++---
 src/it/filesets-test/verify.bsh                    |  4 +--
 src/it/local-repo-prop-test/pom.xml                |  6 ++---
 src/it/properties-test/build.xml                   |  4 +--
 src/it/properties-test/pom.xml                     |  6 ++---
 .../AntrunXmlPlexusConfigurationWriterTest.java    | 31 +++++++++-------------
 12 files changed, 45 insertions(+), 56 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5ee366f..858db01 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,15 +100,9 @@ under the License.
     </dependency>
 
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.13</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-core</artifactId>
-      <version>1.3</version>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <version>5.6.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/src/it/MANTRUN-208/pom.xml b/src/it/MANTRUN-208/pom.xml
index b8cccf9..e6db120 100644
--- a/src/it/MANTRUN-208/pom.xml
+++ b/src/it/MANTRUN-208/pom.xml
@@ -32,9 +32,9 @@ under the License.
     <url>http://maven.apache.org</url>
     <dependencies>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.13</version>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <version>5.6.2</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/src/it/antrun-default-test/pom.xml b/src/it/antrun-default-test/pom.xml
index a074ad5..3c44f11 100644
--- a/src/it/antrun-default-test/pom.xml
+++ b/src/it/antrun-default-test/pom.xml
@@ -32,9 +32,9 @@ under the License.
   <url>http://maven.apache.org</url>
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <version>5.6.2</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/src/it/classpath-ref-test/pom.xml b/src/it/classpath-ref-test/pom.xml
index 73e5f06..6d8f3bf 100644
--- a/src/it/classpath-ref-test/pom.xml
+++ b/src/it/classpath-ref-test/pom.xml
@@ -32,9 +32,9 @@ under the License.
 
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <version>5.6.2</version>
     </dependency>
   </dependencies>
 
diff --git a/src/it/classpath-test-scope-test/pom.xml b/src/it/classpath-test-scope-test/pom.xml
index c046a01..c921449 100644
--- a/src/it/classpath-test-scope-test/pom.xml
+++ b/src/it/classpath-test-scope-test/pom.xml
@@ -32,9 +32,9 @@ under the License.
 
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <version>5.6.2</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/src/it/env-var-test/pom.xml b/src/it/env-var-test/pom.xml
index 6715a20..2bfd47c 100644
--- a/src/it/env-var-test/pom.xml
+++ b/src/it/env-var-test/pom.xml
@@ -32,9 +32,9 @@ under the License.
 
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <version>5.6.2</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/src/it/filesets-test/pom.xml b/src/it/filesets-test/pom.xml
index aa6267a..a56444c 100755
--- a/src/it/filesets-test/pom.xml
+++ b/src/it/filesets-test/pom.xml
@@ -49,7 +49,7 @@ under the License.
                 <dependencyfilesets prefix="test."/>
                 <mkdir dir="target/dependencies"/>
                 <copy todir="target/dependencies">
-                  <fileset refid="test.junit:junit:jar"/>
+                  <fileset refid="test.org.junit.jupiter:junit-jupiter-engine:jar"/>
                   <fileset refid="test.org.apache.ant:ant:jar"/>
                 </copy>
 
@@ -73,9 +73,9 @@ under the License.
       <version>1.9.14</version>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <version>5.6.2</version>
     </dependency>
   </dependencies>
 
diff --git a/src/it/filesets-test/verify.bsh b/src/it/filesets-test/verify.bsh
index ad846c5..f4bbef8 100644
--- a/src/it/filesets-test/verify.bsh
+++ b/src/it/filesets-test/verify.bsh
@@ -28,7 +28,7 @@ try
 {
     File depsDir = new File( basedir, "target/dependencies" );
     File antJar = new File( depsDir, "ant-1.9.14.jar" );
-    File junitJar = new File( depsDir, "junit-4.12.jar" );
+    File junitJar = new File( depsDir, "junit-jupiter-engine-5.6.2.jar" );
 
     if ( ! antJar.exists() || antJar.isDirectory() )
     {
@@ -43,7 +43,7 @@ try
 
     File deps2Dir = new File( basedir, "target/dependencies2" );
     antJar = new File( deps2Dir, "ant-1.9.14.jar" );
-    junitJar = new File( deps2Dir, "junit-4.12.jar" );
+    junitJar = new File( deps2Dir, "junit-jupiter-api-5.6.2.jar " );
 
     if ( ! antJar.exists() || antJar.isDirectory() )
     {
diff --git a/src/it/local-repo-prop-test/pom.xml b/src/it/local-repo-prop-test/pom.xml
index d4a126c..0df6818 100644
--- a/src/it/local-repo-prop-test/pom.xml
+++ b/src/it/local-repo-prop-test/pom.xml
@@ -32,9 +32,9 @@ under the License.
   <url>http://maven.apache.org</url>
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <version>5.6.2</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/src/it/properties-test/build.xml b/src/it/properties-test/build.xml
index c535007..3ea0fc7 100755
--- a/src/it/properties-test/build.xml
+++ b/src/it/properties-test/build.xml
@@ -40,8 +40,8 @@ under the License.
     <fail unless="line.separator" message="Property not set \${line.separator}"/>
 
     <!-- Dependency artifact properties -->
-    <echo message="junit:junit:jar : ${junit:junit:jar}"/>
-    <fail unless="junit:junit:jar" message="Property not set \${junit:junit:jar}"/>
+    <echo message="org.junit.jupiter:junit-jupiter-engine:jar : ${org.junit.jupiter:junit-jupiter-engine:jar}"/>
+    <fail unless="org.junit.jupiter:junit-jupiter-engine:jar" message="Property not set \${org.junit.jupiter:junit-jupiter-engine:jar}"/>
 
     <!-- Check that the build output dir is pointing to the correct location -->
     <property name="outputDir" location="./target/classes"/>
diff --git a/src/it/properties-test/pom.xml b/src/it/properties-test/pom.xml
index 5578d95..70a9c11 100644
--- a/src/it/properties-test/pom.xml
+++ b/src/it/properties-test/pom.xml
@@ -32,9 +32,9 @@ under the License.
 
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.13</version>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <version>5.6.2</version>
     </dependency>
   </dependencies>
 
diff --git a/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java b/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java
index fe66f6f..4a7a83b 100644
--- a/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java
+++ b/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java
@@ -19,17 +19,18 @@ package org.apache.maven.plugins.antrun;
  * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-
 import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import org.xmlunit.builder.Input;
 
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.xmlunit.matchers.CompareMatcher.isIdenticalTo;
 
@@ -42,7 +43,8 @@ public class AntrunXmlPlexusConfigurationWriterTest
 
     private static final String TARGET_NAME = "main";
 
-    private TemporaryFolder folder = new TemporaryFolder();
+    @TempDir
+    Path folder;
 
     private AntrunXmlPlexusConfigurationWriter configurationWriter;
 
@@ -50,14 +52,14 @@ public class AntrunXmlPlexusConfigurationWriterTest
 
     private File file;
 
-    @Before
-    public void setUp()
+    @BeforeEach
+    void setUp()
         throws IOException
     {
         configurationWriter = new AntrunXmlPlexusConfigurationWriter();
         configuration = new XmlPlexusConfiguration( "target" );
         configuration.setAttribute( "name", TARGET_NAME );
-        file = folder.newFile();
+        file = Files.createTempFile(folder, "junit", "antrun").toFile();
     }
 
     /**
@@ -123,11 +125,4 @@ public class AntrunXmlPlexusConfigurationWriterTest
     {
         assertThat( Input.from( file ), isIdenticalTo( Input.from( getClass().getResourceAsStream( expected ) ) ) );
     }
-
-    @Rule
-    public TemporaryFolder getFolder()
-    {
-        return folder;
-    }
-
 }