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

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver-ant-tasks.git


The following commit(s) were added to refs/heads/master by this push:
     new 6c00f7c  [MRESOLVER-181] Upgrade Ant to 1.9.16
6c00f7c is described below

commit 6c00f7c21b23925369b1cc285da5cdefb6c4d383
Author: Michael Osipov <[email protected]>
AuthorDate: Sun Nov 14 14:46:31 2021 +0100

    [MRESOLVER-181] Upgrade Ant to 1.9.16
    
    The code deadlocks as now BuildFileRule is used that syncs on
    System.out but resolver uses by default 5 threads to resolve and
    deadlocks on logging.
    
    This closes #13 and closes #6
---
 build.xml                                          |  4 +-
 pom.xml                                            | 15 ++++-
 .../maven/resolver/internal/ant/AntBuildsTest.java | 71 ++++++++++++----------
 .../maven/resolver/internal/ant/DeployTest.java    | 17 +++++-
 .../maven/resolver/internal/ant/InstallTest.java   | 18 +++++-
 .../internal/ant/ProjectWorkspaceReaderTest.java   | 10 ++-
 .../maven/resolver/internal/ant/ReactorTest.java   | 24 ++++++--
 .../maven/resolver/internal/ant/ResolveTest.java   | 23 +++++--
 .../maven/resolver/internal/ant/SettingsTest.java  | 15 ++++-
 .../resolver/internal/ant/tasks/LayoutTest.java    | 10 ++-
 .../internal/ant/types/DependencyTest.java         | 10 ++-
 .../resolver/internal/ant/types/ExclusionTest.java |  9 ++-
 .../maven/resolver/internal/ant/types/PomTest.java |  9 ++-
 13 files changed, 169 insertions(+), 66 deletions(-)

diff --git a/build.xml b/build.xml
index 9c9bcb5..c093e3f 100644
--- a/build.xml
+++ b/build.xml
@@ -68,7 +68,7 @@
     </resolver:resolve>
 
     <javac classpathref="cp.compile.main" srcdir="src/main/java" 
destdir="${build.dir}/classes"
-           includeAntRuntime="false" source="7" target="7" encoding="UTF-8" 
fork="true"/>
+           includeAntRuntime="false" source="8" target="8" encoding="UTF-8" 
fork="true"/>
   </target>
 
   <target name="process-test-resources" depends="compile">
@@ -91,7 +91,7 @@
     </path>
 
     <javac classpathref="cp.test" srcdir="src/test/java" 
destdir="${build.dir}/test-classes"
-           includeAntRuntime="false" source="7" target="7" encoding="UTF-8" 
fork="true"/>
+           includeAntRuntime="false" source="8" target="8" encoding="UTF-8" 
fork="true"/>
   </target>
 
   <target name="test" depends="test-compile">
diff --git a/pom.xml b/pom.xml
index 210111c..0336e9d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,8 +63,9 @@
   <properties>
     <mavenVersion>3.6.3</mavenVersion>
     <resolverVersion>1.7.2</resolverVersion>
-    <antVersion>1.8.4</antVersion>
+    <antVersion>1.9.16</antVersion>
     <javaVersion>8</javaVersion>
+    <junitVersion>4.13.2</junitVersion>
     
<maven.site.path>resolver-archives/resolver-ant-tasks-LATEST</maven.site.path>
     
<checkstyle.violation.ignore>LineLength,MagicNumber</checkstyle.violation.ignore>
     
<project.build.outputTimestamp>2021-05-13T18:07:07Z</project.build.outputTimestamp>
@@ -211,7 +212,7 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.12</version>
+      <version>${junitVersion}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -363,9 +364,19 @@
             <dependencies>
               <dependency>
                 <groupId>org.apache.ant</groupId>
+                <artifactId>ant</artifactId>
+                <version>${antVersion}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.ant</groupId>
                 <artifactId>ant-junit</artifactId>
                 <version>${antVersion}</version>
               </dependency>
+              <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>${junitVersion}</version>
+              </dependency>
             </dependencies>
           </plugin>
         </plugins>
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java 
b/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java
index 0c3c309..c13f0a3 100644
--- a/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java
+++ b/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant;
  * 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
@@ -22,15 +22,15 @@ package org.apache.maven.resolver.internal.ant;
 import java.io.File;
 import java.io.PrintStream;
 
-import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.BuildFileTest;
-import org.apache.tools.ant.DefaultLogger;
-import org.apache.tools.ant.Project;
+import org.apache.tools.ant.*;
 import org.eclipse.aether.internal.test.util.TestFileUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import static org.junit.Assert.assertTrue;
 
 public abstract class AntBuildsTest
-    extends BuildFileTest
 {
 
     private static final File BASE_DIR;
@@ -39,10 +39,15 @@ public abstract class AntBuildsTest
 
     static
     {
+        System.setProperty("aether.metadataResolver.threads", "1");
+        System.setProperty("aether.connector.basic.threads", "1");
         BASE_DIR = new File( "" ).getAbsoluteFile();
         BUILD_DIR = new File( BASE_DIR, "target/ant" );
     }
 
+    @Rule
+    public final BuildFileRule buildRule = new BuildFileRule();
+
     protected File projectDir;
 
     protected File localRepoDir;
@@ -65,12 +70,10 @@ public abstract class AntBuildsTest
         // hook for subclasses to set further system properties for the 
project to pick up
     }
 
-    @Override
-    protected void setUp()
+    @Before
+    public void setUp()
         throws Exception
     {
-        super.setUp();
-
         TestFileUtils.deleteFile( BUILD_DIR );
 
         projectDir = new File( new File( BASE_DIR, "src/test/resources/ant" ), 
getProjectDirName() );
@@ -80,36 +83,24 @@ public abstract class AntBuildsTest
         System.setProperty( "project.dir", projectDir.getAbsolutePath() );
         System.setProperty( "build.dir", BUILD_DIR.getAbsolutePath() );
         System.setProperty( "maven.repo.local", localRepoDir.getAbsolutePath() 
);
-        System.setProperty( "project.distrepo.url", 
distRepoDir.toURI().toString() );
-        if ( "1.7".equals( System.getProperty( "java.specification.version", 
"1.7" ) ) )
-        {
-            System.setProperty( "https.protocols", "TLSv1.2" );
-        }
+        System.setProperty( "project.distrepo.url", 
distRepoDir.toURI().toASCIIString() );
         setUpProperties();
 
         configureProject( new File( projectDir, "ant.xml" ).getAbsolutePath(), 
Project.MSG_VERBOSE );
     }
 
-    @Override
-    protected void tearDown()
+    @After
+    public void tearDown()
         throws Exception
     {
-        try
-        {
-            ProjectWorkspaceReader.dropInstance();
-            TestFileUtils.deleteFile( BUILD_DIR );
-        }
-        finally
-        {
-            super.tearDown();
-        }
+        ProjectWorkspaceReader.dropInstance();
+        TestFileUtils.deleteFile( BUILD_DIR );
     }
 
-    @Override
     public void configureProject( String filename, int logLevel )
         throws BuildException
     {
-        super.configureProject( filename, logLevel );
+        buildRule.configureProject( filename, logLevel );
         DefaultLogger logger = new DefaultLogger()
         {
             @Override
@@ -122,7 +113,25 @@ public abstract class AntBuildsTest
         logger.setMessageOutputLevel( logLevel );
         logger.setOutputPrintStream( System.out );
         logger.setErrorPrintStream( System.err );
-        getProject().addBuildListener( logger );
+        buildRule.getProject().addBuildListener( logger );
+    }
+    protected void assertLogContaining( String substring )
+    {
+        String realLog = getLog();
+        assertTrue( "expecting log to contain \"" + substring + "\" log was 
\"" + realLog + "\"", realLog.contains( substring ) );
     }
 
+    protected void executeTarget( String targetName ) {
+        buildRule.executeTarget( targetName );
+    }
+
+    protected String getLog()
+    {
+        return buildRule.getLog();
+    }
+
+    protected Project getProject()
+    {
+        return buildRule.getProject();
+    }
 }
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java 
b/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java
index 203bdba..5c6b124 100644
--- a/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java
+++ b/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant;
  * 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
@@ -19,6 +19,9 @@ package org.apache.maven.resolver.internal.ant;
  * under the License.
  */
 
+import junit.framework.JUnit4TestAdapter;
+import org.junit.Test;
+
 import static org.hamcrest.MatcherAssert.*;
 import static org.hamcrest.Matchers.*;
 
@@ -32,7 +35,12 @@ import java.util.Arrays;
 public class DeployTest
     extends AntBuildsTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( DeployTest.class );
+    }
 
+    @Test
     public void testDeployGlobalPom()
     {
         long min = System.currentTimeMillis();
@@ -40,10 +48,11 @@ public class DeployTest
         long max = System.currentTimeMillis();
 
         assertLogContaining( "Uploading" );
-        
+
         assertUpdatedFile( min, max, distRepoDir, 
"test/dummy/0.1-SNAPSHOT/maven-metadata.xml" );
     }
 
+    @Test
     public void testDeployOverrideGlobalPom()
     {
         long min = System.currentTimeMillis();
@@ -55,6 +64,7 @@ public class DeployTest
         assertUpdatedFile( min, max, distRepoDir, 
"test/other/0.1-SNAPSHOT/maven-metadata.xml" );
     }
 
+    @Test
     public void testDeployOverrideGlobalPomByRef()
     {
         long min = System.currentTimeMillis();
@@ -67,6 +77,7 @@ public class DeployTest
         assertUpdatedFile( min, max, distRepoDir, 
"test/other/0.1-SNAPSHOT/maven-metadata.xml" );
     }
 
+    @Test
     public void testDeployAttachedArtifact()
     {
         executeTarget( "testDeployAttachedArtifact" );
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java 
b/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java
index bd3fcaa..042386c 100644
--- a/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java
+++ b/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant;
  * 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
@@ -19,6 +19,9 @@ package org.apache.maven.resolver.internal.ant;
  * under the License.
  */
 
+import junit.framework.JUnit4TestAdapter;
+import org.junit.Test;
+
 import static org.hamcrest.MatcherAssert.*;
 import static org.hamcrest.Matchers.*;
 
@@ -28,17 +31,23 @@ import java.io.IOException;
 public class InstallTest
     extends AntBuildsTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( InstallTest.class );
+    }
 
+    @Test
     public void testInstallGlobalPom()
     {
         executeTarget( "testInstallGlobalPom" );
         long tstamp = System.currentTimeMillis();
 
         assertLogContaining( "Installing" );
-        
+
         assertUpdatedFile( tstamp, localRepoDir, 
"test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT.pom" );
     }
 
+    @Test
     public void testInstallOverrideGlobalPom()
     {
         executeTarget( "testInstallOverrideGlobalPom" );
@@ -49,6 +58,7 @@ public class InstallTest
         assertUpdatedFile( tstamp, localRepoDir, 
"test/other/0.1-SNAPSHOT/other-0.1-SNAPSHOT.pom" );
     }
 
+    @Test
     public void testInstallOverrideGlobalPomByRef()
     {
         long tstamp = System.currentTimeMillis();
@@ -60,6 +70,7 @@ public class InstallTest
         assertUpdatedFile( tstamp, localRepoDir, 
"test/other/0.1-SNAPSHOT/other-0.1-SNAPSHOT.pom" );
     }
 
+    @Test
     public void testDefaultRepo()
     {
         executeTarget( "testDefaultRepo" );
@@ -71,6 +82,7 @@ public class InstallTest
         assertUpdatedFile( tstamp, localRepoDir, 
"test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT-ant.xml" );
     }
 
+    @Test
     public void testCustomRepo()
         throws IOException
     {
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
 
b/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
index 0b7dfa3..7a54c6c 100644
--- 
a/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
+++ 
b/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant;
  * 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
@@ -24,7 +24,7 @@ import static org.junit.Assert.*;
 
 import java.io.File;
 
-import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
+import junit.framework.JUnit4TestAdapter;
 import org.apache.maven.resolver.internal.ant.types.Pom;
 import org.apache.tools.ant.Project;
 import org.junit.Before;
@@ -34,6 +34,10 @@ import org.eclipse.aether.artifact.DefaultArtifact;
 
 public class ProjectWorkspaceReaderTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( ProjectWorkspaceReaderTest.class );
+    }
 
     private ProjectWorkspaceReader reader;
 
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java 
b/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java
index 6b33710..d72ec48 100644
--- a/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java
+++ b/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant;
  * 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
@@ -22,19 +22,28 @@ package org.apache.maven.resolver.internal.ant;
 import java.io.File;
 import java.io.IOException;
 
+import junit.framework.JUnit4TestAdapter;
 import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
 import org.eclipse.aether.artifact.Artifact;
 import org.eclipse.aether.artifact.DefaultArtifact;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
 
 public class ReactorTest
     extends AntBuildsTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( ReactorTest.class );
+    }
 
     private Artifact artifact( String coords )
     {
         return new DefaultArtifact( coords );
     }
 
+    @Test
     public void testPom()
         throws IOException
     {
@@ -45,6 +54,7 @@ public class ReactorTest
         assertEquals( new File( projectDir, "pom1.xml" ), 
found.getAbsoluteFile() );
     }
 
+    @Test
     public void testArtifact()
         throws IOException
     {
@@ -59,6 +69,7 @@ public class ReactorTest
         assertEquals( new File( projectDir, "pom1.xml" ), 
found.getAbsoluteFile() );
     }
 
+    @Test
     public void testArtifactInMemoryPom()
         throws IOException
     {
@@ -72,28 +83,31 @@ public class ReactorTest
         assertEquals( new File( projectDir, "pom1.xml" ), 
found.getAbsoluteFile() );
     }
 
+    @Test
     public void testResolveArtifact()
         throws IOException
     {
         executeTarget( "testResolveArtifact" );
-        String prop = project.getProperty( "resolve.test:test:jar" );
+        String prop = getProject().getProperty( "resolve.test:test:jar" );
         assertEquals( new File( projectDir, "pom1.xml" ).getAbsolutePath(), 
prop );
     }
 
+    @Test
     public void testResolveArtifactInMemoryPom()
         throws IOException
     {
         executeTarget( "testResolveArtifactInMemoryPom" );
-        String prop = project.getProperty( "resolve.test:test:jar" );
+        String prop = getProject().getProperty( "resolve.test:test:jar" );
         assertEquals( new File( projectDir, "pom1.xml" ).getAbsolutePath(), 
prop );
         assertLogContaining( "The POM for test:test:jar:0.1-SNAPSHOT is 
missing, no dependency information available" );
     }
 
+    @Test
     public void testResolveVersionRange()
         throws IOException
     {
         executeTarget( "testResolveVersionRange" );
-        String prop = project.getProperty( "resolve.test:test:jar" );
+        String prop = getProject().getProperty( "resolve.test:test:jar" );
         assertEquals( new File( projectDir, "pom1.xml" ).getAbsolutePath(), 
prop );
     }
 
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java 
b/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java
index a736a74..699a06f 100644
--- a/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java
+++ b/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant;
  * 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
@@ -28,14 +28,21 @@ import java.util.Arrays;
 import java.util.Iterator;
 import java.util.Map;
 
+import junit.framework.JUnit4TestAdapter;
 import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.types.ResourceCollection;
 import org.apache.tools.ant.types.resources.FileResource;
+import org.junit.Test;
 
 public class ResolveTest
     extends AntBuildsTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( ResolveTest.class );
+    }
 
+    @Test
     public void testResolveGlobalPom()
     {
         executeTarget( "testResolveGlobalPom" );
@@ -46,6 +53,7 @@ public class ResolveTest
                     allOf( containsString( "aether-api" ), endsWith( ".jar" ) 
) );
     }
 
+    @Test
     public void testResolveOverrideGlobalPom()
     {
         executeTarget( "testResolveOverrideGlobalPom" );
@@ -56,6 +64,7 @@ public class ResolveTest
                     allOf( containsString( "aether-api" ), endsWith( ".jar" ) 
) );
     }
 
+    @Test
     public void testResolveGlobalPomIntoOtherLocalRepo()
     {
         executeTarget( "testResolveGlobalPomIntoOtherLocalRepo" );
@@ -66,6 +75,7 @@ public class ResolveTest
                     endsWith( 
"local-repo-custom/org/eclipse/aether/aether-api/0.9.0.M3/aether-api-0.9.0.M3.jar"
 ) );
     }
 
+    @Test
     public void testResolveCustomFileLayout()
         throws IOException
     {
@@ -76,14 +86,15 @@ public class ResolveTest
                     new File( dir, 
"org.eclipse.aether/aether-api/org/eclipse/aether/jar" ).exists() );
     }
 
+    @Test
     public void testResolveAttachments()
         throws IOException
     {
         File dir = new File( BUILD_DIR, "resolve-attachments" );
         executeTarget( "testResolveAttachments" );
-        
+
         File jdocDir = new File(dir, "javadoc");
-        
+
         assertThat( "aether-api-javadoc was not saved with custom file layout",
                     new File( jdocDir, 
"org.eclipse.aether-aether-api-javadoc.jar" ).exists() );
 
@@ -96,6 +107,7 @@ public class ResolveTest
                     everyItem( endsWith( "sources.jar" ) ) );
     }
 
+    @Test
     public void testResolvePath()
     {
         executeTarget( "testResolvePath" );
@@ -108,6 +120,7 @@ public class ResolveTest
                     hasItemInArray( allOf( containsString( "aether-api" ), 
endsWith( ".jar" ) ) ) );
     }
 
+    @Test
     public void testResolveDepsFromFile()
     {
         executeTarget( "testResolveDepsFromFile" );
@@ -120,6 +133,7 @@ public class ResolveTest
         assertThat( "aether-api was resolved as a property", prop, nullValue() 
);
     }
 
+    @Test
     public void testResolveNestedDependencyCollections()
     {
         executeTarget( "testResolveNestedDependencyCollections" );
@@ -132,6 +146,7 @@ public class ResolveTest
         assertThat( "aether-api was resolved as a property", prop, nullValue() 
);
     }
 
+    @Test
     public void testResolveResourceCollectionOnly()
     {
         executeTarget( "testResolveResourceCollectionOnly" );
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java 
b/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java
index a22d573..d686ed9 100644
--- a/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java
+++ b/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant;
  * 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
@@ -25,12 +25,18 @@ import static org.hamcrest.Matchers.*;
 import java.io.File;
 import java.io.IOException;
 
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
+import junit.framework.JUnit4TestAdapter;
+import org.junit.Test;
 
 public class SettingsTest
     extends AntBuildsTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( SettingsTest.class );
+    }
 
+    @Test
     public void testUserSettings()
     {
         executeTarget( "testUserSettings" );
@@ -38,6 +44,7 @@ public class SettingsTest
                     equalTo( "userSettings.xml" ) );
     }
 
+    @Test
     public void testGlobalSettings()
     {
         executeTarget( "testGlobalSettings" );
@@ -45,6 +52,7 @@ public class SettingsTest
                     equalTo( "globalSettings.xml" ) );
     }
 
+    @Test
     public void testBothSettings()
     {
         executeTarget( "testBothSettings" );
@@ -54,6 +62,7 @@ public class SettingsTest
                     equalTo( "userSettings.xml" ) );
     }
 
+    @Test
     public void testFallback()
         throws IOException
     {
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java 
b/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java
index f79729b..76ec13c 100644
--- a/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java
+++ b/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant.tasks;
  * 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
@@ -21,7 +21,7 @@ package org.apache.maven.resolver.internal.ant.tasks;
 
 import static org.junit.Assert.assertEquals;
 
-import org.apache.maven.resolver.internal.ant.tasks.Layout;
+import junit.framework.JUnit4TestAdapter;
 import org.apache.tools.ant.BuildException;
 import org.eclipse.aether.artifact.DefaultArtifact;
 import org.junit.Test;
@@ -30,6 +30,10 @@ import org.junit.Test;
  */
 public class LayoutTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( LayoutTest.class );
+    }
 
     @Test( expected = BuildException.class )
     public void testUnknownVariable()
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
 
b/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
index 10ca42b..600139d 100644
--- 
a/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
+++ 
b/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant.types;
  * 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
@@ -21,13 +21,17 @@ package org.apache.maven.resolver.internal.ant.types;
 
 import static org.junit.Assert.*;
 
-import org.apache.maven.resolver.internal.ant.types.Dependency;
+import junit.framework.JUnit4TestAdapter;
 import org.junit.Test;
 
 /**
  */
 public class DependencyTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( DependencyTest.class );
+    }
 
     @Test
     public void testSetCoordsGidAidVer()
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java 
b/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java
index 64d510f..14320e0 100644
--- 
a/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java
+++ 
b/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant.types;
  * 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
@@ -21,6 +21,7 @@ package org.apache.maven.resolver.internal.ant.types;
 
 import static org.junit.Assert.*;
 
+import junit.framework.JUnit4TestAdapter;
 import org.apache.maven.resolver.internal.ant.types.Exclusion;
 import org.junit.Test;
 
@@ -28,6 +29,10 @@ import org.junit.Test;
  */
 public class ExclusionTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( ExclusionTest.class );
+    }
 
     @Test
     public void testSetCoordsGid()
diff --git 
a/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java 
b/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java
index 35131b1..f5ace48 100644
--- a/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java
+++ b/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java
@@ -8,9 +8,9 @@ package org.apache.maven.resolver.internal.ant.types;
  * 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
@@ -21,6 +21,7 @@ package org.apache.maven.resolver.internal.ant.types;
 
 import static org.junit.Assert.*;
 
+import junit.framework.JUnit4TestAdapter;
 import org.apache.maven.resolver.internal.ant.types.Pom;
 import org.junit.Test;
 
@@ -28,6 +29,10 @@ import org.junit.Test;
  */
 public class PomTest
 {
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter( PomTest.class );
+    }
 
     @Test
     public void testSetCoordsGid()

Reply via email to