From 5a5f0c9479e63f2cfe75590dcb9c9bd7dd8f9b63 Mon Sep 17 00:00:00 2001 From: Benjamin Marwell Date: Mon, 30 Oct 2023 19:52:03 +0100 Subject: [PATCH] [#74] integration tests (#81) * [#74] rework integration tests pt.1 * [#74] rework integration tests pt.2 * [#74] rework integration tests pt.3, Wagon334MojoHttpIT * [#74] pull dependency versions into properties --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/maven.yml | 4 +- pom.xml | 50 +++++++++++++++--- .../codehaus/mojo/wagon/AbstractCopyMojo.java | 2 +- .../mojo/wagon/AbstractSingleWagonMojo.java | 2 +- .../mojo/wagon/AbstractWagonMojo.java | 2 +- .../org/codehaus/mojo/wagon/CopyMojo.java | 2 +- .../org/codehaus/mojo/wagon/ExistMojo.java | 2 +- .../mojo/wagon/MergeMavenRepoMojo.java | 2 +- .../mojo/wagon/shared/DefaultWagonUpload.java | 1 - .../mojo/wagon/shared/WagonUpload.java | 1 - .../codehaus/mojo/wagon/AbstractJettyIT.java | 51 +++++++++++++++++++ ...oHttpTest.java => Wagon334MojoHttpIT.java} | 25 ++++++--- ...asicTest.java => WagonMojoFtpBasicIT.java} | 26 +++++----- ...MojoHttpTest.java => WagonMojoHttpIT.java} | 39 ++++++++++---- ...Test.java => WagonMojoHttpSettingsIT.java} | 33 ++++++++---- ...onMojoSshTest.java => WagonMojoSshIT.java} | 4 +- src/test/projects/ftp-basic/pom.xml | 6 +-- .../1.2/commons-dbutils-1.2-bin.tar.gz.asc | 1 + .../commons-dbutils-1.2-bin.tar.gz.asc.md5 | 1 + .../commons-dbutils-1.2-bin.tar.gz.asc.sha1 | 1 + src/test/projects/http-download-02/pom.xml | 5 +- .../1.1/common-dbutils-1.1.pom.asc | 1 + .../1.1/commons-dbutils-1.1-sources.txt | 1 + .../1.2/commons-dbutils-1.2-sources.txt | 1 + src/test/projects/http-download/pom.xml | 13 ++--- src/test/resources/simplelogger.properties | 1 + 26 files changed, 206 insertions(+), 71 deletions(-) create mode 100644 src/test/java/org/codehaus/mojo/wagon/AbstractJettyIT.java rename src/test/java/org/codehaus/mojo/wagon/{Wagon334MojoHttpTest.java => Wagon334MojoHttpIT.java} (69%) rename src/test/java/org/codehaus/mojo/wagon/{WagonMojoFtpBasicTest.java => WagonMojoFtpBasicIT.java} (90%) rename src/test/java/org/codehaus/mojo/wagon/{WagonMojoHttpTest.java => WagonMojoHttpIT.java} (59%) rename src/test/java/org/codehaus/mojo/wagon/{WagonMojoHttpSettingsTest.java => WagonMojoHttpSettingsIT.java} (59%) rename src/test/java/org/codehaus/mojo/wagon/{WagonMojoSshTest.java => WagonMojoSshIT.java} (93%) create mode 100644 src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc create mode 100644 src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc.md5 create mode 100644 src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc.sha1 create mode 100644 src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.1/common-dbutils-1.1.pom.asc create mode 100644 src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.1/commons-dbutils-1.1-sources.txt create mode 100644 src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-sources.txt create mode 100644 src/test/resources/simplelogger.properties diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 27386c7..6b88494 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -24,8 +24,8 @@ jobs: name: Verify uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v3 with: - ff-goal: '-P run-its install' # site use project version for reporting - verify-goal: '-P run-its install' # should be the same as for first build + ff-goal: '-ntp -P run-its verify' # site use project version for reporting + verify-goal: '-ntp -P run-its verify' # should be the same as for first build deploy: name: Deploy diff --git a/pom.xml b/pom.xml index 4b215b4..dfc6deb 100644 --- a/pom.xml +++ b/pom.xml @@ -86,11 +86,18 @@ 8 3.0.0 - 2.9.0 - 1.12.2 + + 2.9.2 + 2.0.0 - 1.1.1 2022-01-18T09:14:02Z + + + 1.7.9 + + + 9.4.51.v20230217 + 1.1.1 @@ -181,7 +188,13 @@ org.slf4j slf4j-api - 1.7.9 + ${dependency.slf4j.version} + + + org.slf4j + slf4j-simple + ${dependency.slf4j.version} + test @@ -210,12 +223,21 @@ + + org.eclipse.jetty + jetty-server + ${dependency.jetty.version} + test + + + org.eclipse.jetty + jetty-http + ${dependency.jetty.version} + test + - - install - @@ -297,6 +319,20 @@ + + + org.apache.maven.plugins + maven-failsafe-plugin + + + integration-test + + integration-test + verify + + + + diff --git a/src/main/java/org/codehaus/mojo/wagon/AbstractCopyMojo.java b/src/main/java/org/codehaus/mojo/wagon/AbstractCopyMojo.java index 653c08d..0996749 100644 --- a/src/main/java/org/codehaus/mojo/wagon/AbstractCopyMojo.java +++ b/src/main/java/org/codehaus/mojo/wagon/AbstractCopyMojo.java @@ -80,4 +80,4 @@ private void disconnectWagon( Wagon wagon ) } } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/mojo/wagon/AbstractSingleWagonMojo.java b/src/main/java/org/codehaus/mojo/wagon/AbstractSingleWagonMojo.java index 6ae305e..7b0fc41 100644 --- a/src/main/java/org/codehaus/mojo/wagon/AbstractSingleWagonMojo.java +++ b/src/main/java/org/codehaus/mojo/wagon/AbstractSingleWagonMojo.java @@ -92,4 +92,4 @@ public void execute() protected abstract void execute( Wagon wagon ) throws MojoExecutionException, WagonException, IOException; -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/mojo/wagon/AbstractWagonMojo.java b/src/main/java/org/codehaus/mojo/wagon/AbstractWagonMojo.java index cd2e486..527412c 100644 --- a/src/main/java/org/codehaus/mojo/wagon/AbstractWagonMojo.java +++ b/src/main/java/org/codehaus/mojo/wagon/AbstractWagonMojo.java @@ -61,4 +61,4 @@ protected WagonFileSet getWagonFileSet( String fromDir, String includes, String { return WagonUtils.getWagonFileSet( fromDir, includes, excludes, caseSensitive, toDir ); } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/mojo/wagon/CopyMojo.java b/src/main/java/org/codehaus/mojo/wagon/CopyMojo.java index f561f6d..51cf5bc 100644 --- a/src/main/java/org/codehaus/mojo/wagon/CopyMojo.java +++ b/src/main/java/org/codehaus/mojo/wagon/CopyMojo.java @@ -78,4 +78,4 @@ protected void copy( Wagon srcWagon, Wagon targetWagon ) wagonCopy.copy( srcWagon, fileSet, targetWagon, optimize, this.getLog() ); } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/mojo/wagon/ExistMojo.java b/src/main/java/org/codehaus/mojo/wagon/ExistMojo.java index 5583c87..38885cd 100644 --- a/src/main/java/org/codehaus/mojo/wagon/ExistMojo.java +++ b/src/main/java/org/codehaus/mojo/wagon/ExistMojo.java @@ -56,4 +56,4 @@ protected void execute( Wagon wagon ) } } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/mojo/wagon/MergeMavenRepoMojo.java b/src/main/java/org/codehaus/mojo/wagon/MergeMavenRepoMojo.java index d324be7..b48450f 100644 --- a/src/main/java/org/codehaus/mojo/wagon/MergeMavenRepoMojo.java +++ b/src/main/java/org/codehaus/mojo/wagon/MergeMavenRepoMojo.java @@ -45,4 +45,4 @@ protected void copy( Wagon srcWagon, Wagon targetWagon ) mavenRepoMerger.merge( srcWagon, targetWagon, optimize, this.getLog() ); } -} \ No newline at end of file +} diff --git a/src/main/java/org/codehaus/mojo/wagon/shared/DefaultWagonUpload.java b/src/main/java/org/codehaus/mojo/wagon/shared/DefaultWagonUpload.java index 8ff7234..50672ef 100644 --- a/src/main/java/org/codehaus/mojo/wagon/shared/DefaultWagonUpload.java +++ b/src/main/java/org/codehaus/mojo/wagon/shared/DefaultWagonUpload.java @@ -23,7 +23,6 @@ import java.io.IOException; import java.util.Arrays; -import org.apache.maven.plugin.logging.Log; import org.apache.maven.shared.model.fileset.FileSet; import org.apache.maven.shared.model.fileset.util.FileSetManager; import org.apache.maven.wagon.CommandExecutor; diff --git a/src/main/java/org/codehaus/mojo/wagon/shared/WagonUpload.java b/src/main/java/org/codehaus/mojo/wagon/shared/WagonUpload.java index 7e2e38d..bf9b752 100644 --- a/src/main/java/org/codehaus/mojo/wagon/shared/WagonUpload.java +++ b/src/main/java/org/codehaus/mojo/wagon/shared/WagonUpload.java @@ -21,7 +21,6 @@ import java.io.IOException; -import org.apache.maven.plugin.logging.Log; import org.apache.maven.shared.model.fileset.FileSet; import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.WagonException; diff --git a/src/test/java/org/codehaus/mojo/wagon/AbstractJettyIT.java b/src/test/java/org/codehaus/mojo/wagon/AbstractJettyIT.java new file mode 100644 index 0000000..8130640 --- /dev/null +++ b/src/test/java/org/codehaus/mojo/wagon/AbstractJettyIT.java @@ -0,0 +1,51 @@ +package org.codehaus.mojo.wagon; + +import java.io.IOException; +import java.nio.file.Path; +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; +import org.eclipse.jetty.server.handler.DefaultHandler; +import org.eclipse.jetty.server.handler.HandlerList; +import org.eclipse.jetty.server.handler.ResourceHandler; +import org.junit.After; +import org.junit.Before; + +public abstract class AbstractJettyIT { + + private Server server; + private int port; + + @Before + public void runJetty() throws Exception { + server = new Server(); + ServerConnector connector = new ServerConnector(server); + connector.setPort(0); + connector.setHost("localhost"); + server.addConnector(connector); + + ResourceHandler resource_handler = new ResourceHandler(); + resource_handler.setDirectoriesListed(true); + resource_handler.setResourceBase(getDirectoryToServe().toString()); + + HandlerList handlers = new HandlerList(); + handlers.setHandlers(new Handler[] { resource_handler, new DefaultHandler() }); + server.setHandler(handlers); + + server.start(); + this.port = connector.getLocalPort(); + } + + + @After + public void tearDown() throws Exception { + server.stop(); + } + + protected int getServerPort() { + return this.port; + } + + protected abstract Path getDirectoryToServe() throws IOException; + +} diff --git a/src/test/java/org/codehaus/mojo/wagon/Wagon334MojoHttpTest.java b/src/test/java/org/codehaus/mojo/wagon/Wagon334MojoHttpIT.java similarity index 69% rename from src/test/java/org/codehaus/mojo/wagon/Wagon334MojoHttpTest.java rename to src/test/java/org/codehaus/mojo/wagon/Wagon334MojoHttpIT.java index 26114be..091b885 100644 --- a/src/test/java/org/codehaus/mojo/wagon/Wagon334MojoHttpTest.java +++ b/src/test/java/org/codehaus/mojo/wagon/Wagon334MojoHttpIT.java @@ -2,7 +2,10 @@ import java.io.File; +import java.io.IOException; +import java.nio.file.Path; import org.junit.Assert; +import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -17,17 +20,21 @@ @RunWith( MavenJUnitTestRunner.class ) @MavenVersions( { "3.6.3" } ) -public class Wagon334MojoHttpTest +public class Wagon334MojoHttpIT extends AbstractJettyIT { @Rule public final TestResources resources = new TestResources(); - public final MavenRuntime maven; + private final MavenRuntimeBuilder mavenBuilder; + public MavenRuntime maven; - public Wagon334MojoHttpTest(MavenRuntimeBuilder builder ) - throws Exception - { - this.maven = builder.withCliOptions( "-B" ).build(); + public Wagon334MojoHttpIT(MavenRuntimeBuilder builder ) { + this.mavenBuilder = builder.withCliOptions( "-B" ); + } + + @Before + public void setPort() throws Exception { + this.maven = this.mavenBuilder.withCliOptions( "-Dserver.port=" + getServerPort() ).build(); } @Test @@ -46,4 +53,10 @@ public void testDownload() Assert.assertTrue( new File(downloadDir, "commons-dbutils-1.2-bin.tar.gz.asc.md5" ).exists() ); Assert.assertTrue( new File(downloadDir, "commons-dbutils-1.2-bin.tar.gz.asc.sha1" ).exists() ); } + + @Override + protected Path getDirectoryToServe() throws IOException { + return resources.getBasedir("http-download-02").toPath() + .resolve("files"); + } } diff --git a/src/test/java/org/codehaus/mojo/wagon/WagonMojoFtpBasicTest.java b/src/test/java/org/codehaus/mojo/wagon/WagonMojoFtpBasicIT.java similarity index 90% rename from src/test/java/org/codehaus/mojo/wagon/WagonMojoFtpBasicTest.java rename to src/test/java/org/codehaus/mojo/wagon/WagonMojoFtpBasicIT.java index a94bbe8..b9b8833 100644 --- a/src/test/java/org/codehaus/mojo/wagon/WagonMojoFtpBasicTest.java +++ b/src/test/java/org/codehaus/mojo/wagon/WagonMojoFtpBasicIT.java @@ -1,7 +1,13 @@ package org.codehaus.mojo.wagon; +import io.takari.maven.testing.TestResources; +import io.takari.maven.testing.executor.MavenExecution; +import io.takari.maven.testing.executor.MavenExecutionResult; +import io.takari.maven.testing.executor.MavenRuntime; +import io.takari.maven.testing.executor.MavenRuntime.MavenRuntimeBuilder; +import io.takari.maven.testing.executor.MavenVersions; +import io.takari.maven.testing.executor.junit.MavenJUnitTestRunner; import java.io.File; - import org.apache.ftpserver.ConnectionConfigFactory; import org.apache.ftpserver.FtpServer; import org.apache.ftpserver.FtpServerFactory; @@ -15,17 +21,9 @@ import org.junit.Test; import org.junit.runner.RunWith; -import io.takari.maven.testing.TestResources; -import io.takari.maven.testing.executor.MavenExecution; -import io.takari.maven.testing.executor.MavenExecutionResult; -import io.takari.maven.testing.executor.MavenRuntime; -import io.takari.maven.testing.executor.MavenRuntime.MavenRuntimeBuilder; -import io.takari.maven.testing.executor.MavenVersions; -import io.takari.maven.testing.executor.junit.MavenJUnitTestRunner; - @RunWith( MavenJUnitTestRunner.class ) @MavenVersions( { "3.2.5" } ) -public class WagonMojoFtpBasicTest +public class WagonMojoFtpBasicIT { @Rule public final TestResources resources = new TestResources(); @@ -33,7 +31,7 @@ public class WagonMojoFtpBasicTest public final MavenRuntime maven; public final FtpServer ftpServer; - public WagonMojoFtpBasicTest( MavenRuntimeBuilder builder ) + public WagonMojoFtpBasicIT( MavenRuntimeBuilder builder ) throws Exception { this.ftpServer = createFtp(); @@ -60,9 +58,9 @@ public void testFtpBasic() MavenExecution mavenExec = maven.forProject( projDir ); MavenExecutionResult result = mavenExec.execute( "clean", "verify" ); result.assertErrorFreeLog(); - Assert.assertTrue( new File( result.getBasedir(), "target/it/WagonMojoFtpBasicTest.class" ).exists() ); - Assert.assertTrue( new File( result.getBasedir(), "target/it/single-dir/WagonMojoFtpBasicTest.class" ).exists() ); - Assert.assertTrue( new File( result.getBasedir(), "target/it/single-dir/WagonMojoHttpTest.class" ).exists() ); + Assert.assertTrue( new File( result.getBasedir(), "target/it/" + this.getClass().getSimpleName() + ".class" ).exists() ); + Assert.assertTrue( new File( result.getBasedir(), "target/it/single-dir/"+ this.getClass().getSimpleName() + ".class" ).exists() ); + Assert.assertTrue( new File( result.getBasedir(), "target/it/single-dir/" + this.getClass().getSimpleName() + ".class" ).exists() ); } diff --git a/src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpTest.java b/src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpIT.java similarity index 59% rename from src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpTest.java rename to src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpIT.java index 09b79bc..b642045 100644 --- a/src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpTest.java +++ b/src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpIT.java @@ -1,11 +1,6 @@ package org.codehaus.mojo.wagon; -import java.io.File; - -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; +import static java.util.Objects.requireNonNull; import io.takari.maven.testing.TestResources; import io.takari.maven.testing.executor.MavenExecution; @@ -14,20 +9,36 @@ import io.takari.maven.testing.executor.MavenRuntime.MavenRuntimeBuilder; import io.takari.maven.testing.executor.MavenVersions; import io.takari.maven.testing.executor.junit.MavenJUnitTestRunner; +import java.io.File; +import java.io.IOException; +import java.net.URL; +import java.nio.file.Path; +import java.nio.file.Paths; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; @RunWith( MavenJUnitTestRunner.class ) @MavenVersions( { "3.2.5" } ) -public class WagonMojoHttpTest +public class WagonMojoHttpIT extends AbstractJettyIT { @Rule public final TestResources resources = new TestResources(); + private final MavenRuntimeBuilder mavenBuilder; - public final MavenRuntime maven; + public MavenRuntime maven; - public WagonMojoHttpTest( MavenRuntimeBuilder builder ) + public WagonMojoHttpIT( MavenRuntimeBuilder builder ) throws Exception { - this.maven = builder.withCliOptions( "-B" ).build(); + this.mavenBuilder = builder.withCliOptions( "-B" ); + } + + @Before + public void setPort() throws Exception { + this.maven = this.mavenBuilder.withCliOptions( "-Dserver.port=" + getServerPort() ).build(); } @Test @@ -41,6 +52,12 @@ public void testDownload() result.assertErrorFreeLog(); Assert.assertTrue( new File( result.getBasedir(), - "target/it/http-download/1.1/commons-dbutils-1.1-sources.jar" ).exists() ); + "target/it/http-download/1.1/commons-dbutils-1.1-sources.txt" ).exists() ); + } + + @Override + protected Path getDirectoryToServe() throws IOException { + return resources.getBasedir("http-download").toPath() + .resolve("files"); } } diff --git a/src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpSettingsTest.java b/src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpSettingsIT.java similarity index 59% rename from src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpSettingsTest.java rename to src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpSettingsIT.java index 1d0bdb4..7c569d2 100644 --- a/src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpSettingsTest.java +++ b/src/test/java/org/codehaus/mojo/wagon/WagonMojoHttpSettingsIT.java @@ -1,11 +1,5 @@ package org.codehaus.mojo.wagon; -import java.io.File; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - import io.takari.maven.testing.TestResources; import io.takari.maven.testing.executor.MavenExecution; import io.takari.maven.testing.executor.MavenExecutionResult; @@ -13,20 +7,33 @@ import io.takari.maven.testing.executor.MavenRuntime.MavenRuntimeBuilder; import io.takari.maven.testing.executor.MavenVersions; import io.takari.maven.testing.executor.junit.MavenJUnitTestRunner; +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; @RunWith( MavenJUnitTestRunner.class ) @MavenVersions( { "3.2.5" } ) -public class WagonMojoHttpSettingsTest +public class WagonMojoHttpSettingsIT extends AbstractJettyIT { @Rule public final TestResources resources = new TestResources(); - public final MavenRuntime maven; + public MavenRuntime maven; + private final MavenRuntimeBuilder mavenBuilder; - public WagonMojoHttpSettingsTest( MavenRuntimeBuilder builder ) + public WagonMojoHttpSettingsIT( MavenRuntimeBuilder builder ) throws Exception { - this.maven = builder.withCliOptions( "-B", "-e", "-s", "settings.xml" ).build(); + this.mavenBuilder = builder.withCliOptions( "-B", "-e", "-s", "settings.xml"); + } + + @Before + public void setPort() throws Exception { + this.maven = this.mavenBuilder.withCliOptions( "-Dserver.port=" + getServerPort() ).build(); } @Test @@ -39,4 +46,10 @@ public void testDownload() MavenExecutionResult result = mavenExec.execute( "clean", "verify" ); result.assertErrorFreeLog(); } + + @Override + protected Path getDirectoryToServe() throws IOException { + return resources.getBasedir("http-download").toPath() + .resolve("files"); + } } diff --git a/src/test/java/org/codehaus/mojo/wagon/WagonMojoSshTest.java b/src/test/java/org/codehaus/mojo/wagon/WagonMojoSshIT.java similarity index 93% rename from src/test/java/org/codehaus/mojo/wagon/WagonMojoSshTest.java rename to src/test/java/org/codehaus/mojo/wagon/WagonMojoSshIT.java index ad771a2..a692ac0 100644 --- a/src/test/java/org/codehaus/mojo/wagon/WagonMojoSshTest.java +++ b/src/test/java/org/codehaus/mojo/wagon/WagonMojoSshIT.java @@ -17,14 +17,14 @@ @RunWith( MavenJUnitTestRunner.class ) @MavenVersions( { "3.2.5" } ) -public class WagonMojoSshTest +public class WagonMojoSshIT { @Rule public final TestResources resources = new TestResources(); public final MavenRuntime maven; - public WagonMojoSshTest( MavenRuntimeBuilder builder ) + public WagonMojoSshIT( MavenRuntimeBuilder builder ) throws Exception { this.maven = builder.withCliOptions( "-B", "-e", "-s", "settings.xml" ).build(); diff --git a/src/test/projects/ftp-basic/pom.xml b/src/test/projects/ftp-basic/pom.xml index 7d79954..19c08f1 100644 --- a/src/test/projects/ftp-basic/pom.xml +++ b/src/test/projects/ftp-basic/pom.xml @@ -41,7 +41,7 @@ download-single - WagonMojoFtpBasicTest.class + WagonMojoFtpBasicIT.class ${downloadDirectory.base} @@ -53,7 +53,7 @@ ${downloadDirectory.base}/single-dir - WagonMojoFtpBasicTest.class,WagonMojoHttpTest.class + WagonMojoFtpBasicIT.class,WagonMojoHttpTest.class @@ -73,4 +73,4 @@ - \ No newline at end of file + diff --git a/src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc b/src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc new file mode 100644 index 0000000..c6cac69 --- /dev/null +++ b/src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc @@ -0,0 +1 @@ +empty diff --git a/src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc.md5 b/src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc.md5 new file mode 100644 index 0000000..c6cac69 --- /dev/null +++ b/src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc.md5 @@ -0,0 +1 @@ +empty diff --git a/src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc.sha1 b/src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc.sha1 new file mode 100644 index 0000000..c6cac69 --- /dev/null +++ b/src/test/projects/http-download-02/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-bin.tar.gz.asc.sha1 @@ -0,0 +1 @@ +empty diff --git a/src/test/projects/http-download-02/pom.xml b/src/test/projects/http-download-02/pom.xml index cdece8f..830b689 100644 --- a/src/test/projects/http-download-02/pom.xml +++ b/src/test/projects/http-download-02/pom.xml @@ -10,6 +10,7 @@ ${project.build.directory}/it/http-download 3.3.4 + 8080 @@ -40,7 +41,7 @@ download - https://repo1.maven.org/maven2/commons-dbutils/commons-dbutils/1.2 + http://localhost:${server.port}/maven2/commons-dbutils/commons-dbutils/1.2 commons-dbutils-1.2-bin.tar.gz.asc, commons-dbutils-1.2-bin.tar.gz.asc.md5, @@ -53,4 +54,4 @@ - \ No newline at end of file + diff --git a/src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.1/common-dbutils-1.1.pom.asc b/src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.1/common-dbutils-1.1.pom.asc new file mode 100644 index 0000000..c6cac69 --- /dev/null +++ b/src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.1/common-dbutils-1.1.pom.asc @@ -0,0 +1 @@ +empty diff --git a/src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.1/commons-dbutils-1.1-sources.txt b/src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.1/commons-dbutils-1.1-sources.txt new file mode 100644 index 0000000..c6cac69 --- /dev/null +++ b/src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.1/commons-dbutils-1.1-sources.txt @@ -0,0 +1 @@ +empty diff --git a/src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-sources.txt b/src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-sources.txt new file mode 100644 index 0000000..c6cac69 --- /dev/null +++ b/src/test/projects/http-download/files/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-sources.txt @@ -0,0 +1 @@ +empty diff --git a/src/test/projects/http-download/pom.xml b/src/test/projects/http-download/pom.xml index 9dae79e..a00039a 100644 --- a/src/test/projects/http-download/pom.xml +++ b/src/test/projects/http-download/pom.xml @@ -10,6 +10,7 @@ ${project.build.directory}/it/http-download 3.0.0 + 8080 @@ -42,7 +43,7 @@ list - https://repo1.maven.org/maven2/commons-dbutils/commons-dbutils + http://localhost:${server.port}/maven2/commons-dbutils/commons-dbutils @@ -54,8 +55,8 @@ download-single - https://repo1.maven.org/maven2/commons-dbutils/commons-dbutils/1.1 - commons-dbutils-1.1-sources.jar + http://localhost:${server.port}/maven2/commons-dbutils/commons-dbutils/1.1 + commons-dbutils-1.1-sources.txt ${downloadDirectory.base} @@ -66,7 +67,7 @@ download-single - https://repo1.maven.org/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-sources.jar + http://localhost:${server.port}/maven2/commons-dbutils/commons-dbutils/1.2/commons-dbutils-1.2-sources.txt ${downloadDirectory.base} @@ -77,8 +78,8 @@ download - https://repo1.maven.org/maven2/commons-dbutils/commons-dbutils - 1*/** + http://localhost:${server.port}/maven2/commons-dbutils/commons-dbutils + 1.1/** 1.0/**, 1.2/**, 1.3/**, 1.4/**, 1.5/**, 1.6/** ${downloadDirectory.base} diff --git a/src/test/resources/simplelogger.properties b/src/test/resources/simplelogger.properties new file mode 100644 index 0000000..cd90c2a --- /dev/null +++ b/src/test/resources/simplelogger.properties @@ -0,0 +1 @@ +org.slf4j.simpleLogger.defaultLogLevel=warn