mirror of https://github.com/apache/maven.git
Cleanup file access and assertions in ITs (#1912)
This commit is contained in:
parent
a14732597b
commit
4b0dd4362a
|
@ -18,17 +18,14 @@
|
|||
*/
|
||||
package org.apache.maven.it;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.security.DigestInputStream;
|
||||
import java.security.MessageDigest;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* @author Benjamin Bentmann
|
||||
|
@ -64,12 +61,6 @@ class ItUtils {
|
|||
return hash.toString();
|
||||
}
|
||||
|
||||
public static String getLogContent(Verifier verifier) throws IOException {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
Files.copy(Paths.get(verifier.getBasedir(), verifier.getLogFileName()), baos);
|
||||
return baos.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ItUtils#setUserHome(Verifier, Path)
|
||||
*/
|
||||
|
@ -90,4 +81,16 @@ class ItUtils {
|
|||
verifier.setEnvironmentVariable("MAVEN_OPTS", "\"-Duser.home=" + path + "\"");
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertCanonicalFileEquals(File expected, File actual) throws IOException {
|
||||
assertEquals(expected.getCanonicalFile(), actual.getCanonicalFile());
|
||||
}
|
||||
|
||||
public static void assertCanonicalFileEquals(String expected, String actual, String message) throws IOException {
|
||||
assertEquals(new File(expected).getCanonicalFile(), new File(actual).getCanonicalFile(), message);
|
||||
}
|
||||
|
||||
public static void assertCanonicalFileEquals(String expected, String actual) throws IOException {
|
||||
assertEquals(new File(expected).getCanonicalFile(), new File(actual).getCanonicalFile());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class MavenIT0010DependencyClosureResolutionTest extends AbstractMavenIntegrationTestCase {
|
||||
public MavenIT0010DependencyClosureResolutionTest() {
|
||||
super(ALL_MAVEN_VERSIONS);
|
||||
|
@ -45,7 +46,7 @@ public class MavenIT0010DependencyClosureResolutionTest extends AbstractMavenInt
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0010");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
|
@ -56,8 +57,8 @@ public class MavenIT0010DependencyClosureResolutionTest extends AbstractMavenInt
|
|||
verifier.verifyArtifactPresent("org.apache.maven.its.it0010", "b", "0.2", "jar");
|
||||
verifier.verifyArtifactPresent("org.apache.maven.its.it0010", "parent", "1.0", "pom");
|
||||
|
||||
List<String> artifacts = verifier.loadLines("target/compile.txt", "UTF-8");
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0010:a:jar:0.1"));
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0010:b:jar:0.2"));
|
||||
List<String> artifacts = verifier.loadLines("target/compile.txt");
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.it0010:a:jar:0.1"), artifacts.toString());
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.it0010:b:jar:0.2"), artifacts.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class MavenIT0011DefaultVersionByDependencyManagementTest extends AbstractMavenIntegrationTestCase {
|
||||
public MavenIT0011DefaultVersionByDependencyManagementTest() {
|
||||
super(ALL_MAVEN_VERSIONS);
|
||||
|
@ -42,15 +43,15 @@ public class MavenIT0011DefaultVersionByDependencyManagementTest extends Abstrac
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0011");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
List<String> artifacts = verifier.loadLines("target/compile.txt", "UTF-8");
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0011:a:jar:0.1"));
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0011:b:jar:0.2"));
|
||||
List<String> artifacts = verifier.loadLines("target/compile.txt");
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.it0011:a:jar:0.1"), artifacts.toString());
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.it0011:b:jar:0.2"), artifacts.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -42,7 +41,7 @@ public class MavenIT0018DependencyManagementTest extends AbstractMavenIntegratio
|
|||
Verifier verifier = newVerifier(testDir.getAbsolutePath());
|
||||
verifier.setAutoclean(false);
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0018");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument(
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -43,7 +42,7 @@ public class MavenIT0021PomProfileTest extends AbstractMavenIntegrationTestCase
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0021");
|
||||
verifier.getSystemProperties().setProperty("includeProfile", "true");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("-Pprofile-2");
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class MavenIT0063SystemScopeDependencyTest extends AbstractMavenIntegrationTestCase {
|
||||
public MavenIT0063SystemScopeDependencyTest() {
|
||||
super(ALL_MAVEN_VERSIONS);
|
||||
|
@ -48,7 +49,7 @@ public class MavenIT0063SystemScopeDependencyTest extends AbstractMavenIntegrati
|
|||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
List<String> lines = verifier.loadLines("target/compile.txt", "UTF-8");
|
||||
List<String> lines = verifier.loadLines("target/compile.txt");
|
||||
assertEquals(2, lines.size());
|
||||
assertEquals(
|
||||
new File(testDir, "jdk/lib/tools.jar").getCanonicalFile(),
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-885">MNG-885</a>.
|
||||
*
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class MavenIT0085TransitiveSystemScopeTest extends AbstractMavenIntegrationTestCase {
|
||||
public MavenIT0085TransitiveSystemScopeTest() {
|
||||
super(ALL_MAVEN_VERSIONS);
|
||||
|
@ -47,14 +48,14 @@ public class MavenIT0085TransitiveSystemScopeTest extends AbstractMavenIntegrati
|
|||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0085");
|
||||
verifier.getSystemProperties().setProperty("test.home", testDir.getAbsolutePath());
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
Collection<String> lines = verifier.loadLines("target/test.txt", "UTF-8");
|
||||
assertTrue(lines.toString(), lines.contains("system.jar"));
|
||||
Collection<String> lines = verifier.loadLines("target/test.txt");
|
||||
assertTrue(lines.contains("system.jar"), lines.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-1898">MNG-1898</a>.
|
||||
*
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-1898">MNG-1898</a>.
|
||||
*
|
||||
|
@ -50,7 +52,7 @@ public class MavenIT0087PluginRealmWithProjectLevelDepsTest extends AbstractMave
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0087");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class MavenIT0090EnvVarInterpolationTest extends AbstractMavenIntegrationTestCase {
|
||||
public MavenIT0090EnvVarInterpolationTest() {
|
||||
super(ALL_MAVEN_VERSIONS);
|
||||
|
|
|
@ -27,12 +27,13 @@ import java.util.Locale;
|
|||
|
||||
import org.apache.maven.shared.utils.io.FileUtils;
|
||||
import org.apache.maven.shared.verifier.VerificationException;
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
/**
|
||||
* Downloads a snapshot dependency that was deployed with uniqueVersion = false, and checks it can be
|
||||
* updated. See <a href="https://issues.apache.org/jira/browse/MNG-1908">MNG-1908</a>.
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest extends AbstractMavenIntegrationTestCase {
|
||||
public MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest() {
|
||||
super("[2.0,3.0-alpha-1),[3.0-alpha-7,)");
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Benjamin Bentmann
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* <a href="https://issues.apache.org/jira/browse/MNG-7244">MNG-7244</a> removes the deprecation of
|
||||
* <code>pom.X</code>.
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Benjamin Bentmann
|
||||
|
@ -53,66 +55,66 @@ public class MavenIT0142DirectDependencyScopesTest extends AbstractMavenIntegrat
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0142");
|
||||
verifier.filterFile("pom-template.xml", "pom.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("pom-template.xml", "pom.xml");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
List<String> compileArtifacts = verifier.loadLines("target/compile-artifacts.txt", "UTF-8");
|
||||
List<String> compileArtifacts = verifier.loadLines("target/compile-artifacts.txt");
|
||||
assertTrue(
|
||||
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0142:system:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0142:system:jar:0.1"), compileArtifacts.toString());
|
||||
assertTrue(
|
||||
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0142:provided:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0142:provided:jar:0.1"), compileArtifacts.toString());
|
||||
assertTrue(
|
||||
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0142:compile:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0142:compile:jar:0.1"), compileArtifacts.toString());
|
||||
assertEquals(3, compileArtifacts.size());
|
||||
|
||||
List<String> compileClassPath = verifier.loadLines("target/compile-cp.txt", "UTF-8");
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("classes"));
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("system-0.1.jar"));
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("provided-0.1.jar"));
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("compile-0.1.jar"));
|
||||
List<String> compileClassPath = verifier.loadLines("target/compile-cp.txt");
|
||||
assertTrue(compileClassPath.contains("classes"), compileClassPath.toString());
|
||||
assertTrue(compileClassPath.contains("system-0.1.jar"), compileClassPath.toString());
|
||||
assertTrue(compileClassPath.contains("provided-0.1.jar"), compileClassPath.toString());
|
||||
assertTrue(compileClassPath.contains("compile-0.1.jar"), compileClassPath.toString());
|
||||
assertEquals(4, compileClassPath.size());
|
||||
|
||||
List<String> runtimeArtifacts = verifier.loadLines("target/runtime-artifacts.txt", "UTF-8");
|
||||
List<String> runtimeArtifacts = verifier.loadLines("target/runtime-artifacts.txt");
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0142:compile:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0142:compile:jar:0.1"), runtimeArtifacts.toString());
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:0.1"), runtimeArtifacts.toString());
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(),
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:retro:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:retro:0.1"),
|
||||
runtimeArtifacts.toString());
|
||||
assertEquals(3, runtimeArtifacts.size());
|
||||
|
||||
List<String> runtimeClassPath = verifier.loadLines("target/runtime-cp.txt", "UTF-8");
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("classes"));
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("compile-0.1.jar"));
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("runtime-0.1.jar"));
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("runtime-0.1-retro.jar"));
|
||||
List<String> runtimeClassPath = verifier.loadLines("target/runtime-cp.txt");
|
||||
assertTrue(runtimeClassPath.contains("classes"), runtimeClassPath.toString());
|
||||
assertTrue(runtimeClassPath.contains("compile-0.1.jar"), runtimeClassPath.toString());
|
||||
assertTrue(runtimeClassPath.contains("runtime-0.1.jar"), runtimeClassPath.toString());
|
||||
assertTrue(runtimeClassPath.contains("runtime-0.1-retro.jar"), runtimeClassPath.toString());
|
||||
assertEquals(4, runtimeClassPath.size());
|
||||
|
||||
List<String> testArtifacts = verifier.loadLines("target/test-artifacts.txt", "UTF-8");
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:system:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:provided:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:compile:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:0.1"));
|
||||
List<String> testArtifacts = verifier.loadLines("target/test-artifacts.txt");
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0142:system:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0142:provided:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0142:compile:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(
|
||||
testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:retro:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:test:jar:0.1"));
|
||||
testArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:retro:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0142:test:jar:0.1"), testArtifacts.toString());
|
||||
assertEquals(6, testArtifacts.size());
|
||||
|
||||
List<String> testClassPath = verifier.loadLines("target/test-cp.txt", "UTF-8");
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("test-classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("system-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("provided-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("compile-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("runtime-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("runtime-0.1-retro.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("test-0.1.jar"));
|
||||
List<String> testClassPath = verifier.loadLines("target/test-cp.txt");
|
||||
assertTrue(testClassPath.contains("classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("test-classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("system-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("provided-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("compile-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("runtime-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("runtime-0.1-retro.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("test-0.1.jar"), testClassPath.toString());
|
||||
assertEquals(8, testClassPath.size());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,10 +22,12 @@ import java.io.File;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Benjamin Bentmann
|
||||
|
@ -57,47 +59,47 @@ public class MavenIT0143TransitiveDependencyScopesTest extends AbstractMavenInte
|
|||
* dependency that extends a class from the transitive dependency, i.e.
|
||||
* project imports A from direct dependency and A extends B from transitive dependency.
|
||||
*/
|
||||
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt", "UTF-8");
|
||||
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt");
|
||||
assertTrue(
|
||||
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"), compileArtifacts.toString());
|
||||
assertTrue(
|
||||
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"), compileArtifacts.toString());
|
||||
assertEquals(2, compileArtifacts.size());
|
||||
|
||||
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt", "UTF-8");
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("classes"));
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("direct-0.1.jar"));
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("compile-0.1.jar"));
|
||||
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt");
|
||||
assertTrue(compileClassPath.contains("classes"), compileClassPath.toString());
|
||||
assertTrue(compileClassPath.contains("direct-0.1.jar"), compileClassPath.toString());
|
||||
assertTrue(compileClassPath.contains("compile-0.1.jar"), compileClassPath.toString());
|
||||
assertEquals(3, compileClassPath.size());
|
||||
|
||||
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt", "UTF-8");
|
||||
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt");
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"), runtimeArtifacts.toString());
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"), runtimeArtifacts.toString());
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"), runtimeArtifacts.toString());
|
||||
assertEquals(3, runtimeArtifacts.size());
|
||||
|
||||
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt", "UTF-8");
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("classes"));
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("direct-0.1.jar"));
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("compile-0.1.jar"));
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("runtime-0.1.jar"));
|
||||
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt");
|
||||
assertTrue(runtimeClassPath.contains("classes"), runtimeClassPath.toString());
|
||||
assertTrue(runtimeClassPath.contains("direct-0.1.jar"), runtimeClassPath.toString());
|
||||
assertTrue(runtimeClassPath.contains("compile-0.1.jar"), runtimeClassPath.toString());
|
||||
assertTrue(runtimeClassPath.contains("runtime-0.1.jar"), runtimeClassPath.toString());
|
||||
assertEquals(4, runtimeClassPath.size());
|
||||
|
||||
List<String> testArtifacts = verifier.loadLines(targetDir + "/test-artifacts.txt", "UTF-8");
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
|
||||
List<String> testArtifacts = verifier.loadLines(targetDir + "/test-artifacts.txt");
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"), testArtifacts.toString());
|
||||
assertEquals(3, testArtifacts.size());
|
||||
|
||||
List<String> testClassPath = verifier.loadLines(targetDir + "/test-cp.txt", "UTF-8");
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("test-classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("direct-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("compile-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("runtime-0.1.jar"));
|
||||
List<String> testClassPath = verifier.loadLines(targetDir + "/test-cp.txt");
|
||||
assertTrue(testClassPath.contains("classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("test-classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("direct-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("compile-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("runtime-0.1.jar"), testClassPath.toString());
|
||||
assertEquals(5, testClassPath.size());
|
||||
}
|
||||
|
||||
|
@ -112,41 +114,41 @@ public class MavenIT0143TransitiveDependencyScopesTest extends AbstractMavenInte
|
|||
Verifier verifier = run("provided");
|
||||
String targetDir = "target-provided";
|
||||
|
||||
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt", "UTF-8");
|
||||
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt");
|
||||
assertTrue(
|
||||
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"), compileArtifacts.toString());
|
||||
assertTrue(
|
||||
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"), compileArtifacts.toString());
|
||||
assertTrue(
|
||||
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"), compileArtifacts.toString());
|
||||
assertEquals(3, compileArtifacts.size());
|
||||
|
||||
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt", "UTF-8");
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("classes"));
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("direct-0.1.jar"));
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("compile-0.1.jar"));
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("runtime-0.1.jar"));
|
||||
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt");
|
||||
assertTrue(compileClassPath.contains("classes"), compileClassPath.toString());
|
||||
assertTrue(compileClassPath.contains("direct-0.1.jar"), compileClassPath.toString());
|
||||
assertTrue(compileClassPath.contains("compile-0.1.jar"), compileClassPath.toString());
|
||||
assertTrue(compileClassPath.contains("runtime-0.1.jar"), compileClassPath.toString());
|
||||
assertEquals(4, compileClassPath.size());
|
||||
|
||||
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt", "UTF-8");
|
||||
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt");
|
||||
assertEquals(0, runtimeArtifacts.size());
|
||||
|
||||
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt", "UTF-8");
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("classes"));
|
||||
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt");
|
||||
assertTrue(runtimeClassPath.contains("classes"), runtimeClassPath.toString());
|
||||
assertEquals(1, runtimeClassPath.size());
|
||||
|
||||
List<String> testArtifacts = verifier.loadLines(targetDir + "/test-artifacts.txt", "UTF-8");
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
|
||||
List<String> testArtifacts = verifier.loadLines(targetDir + "/test-artifacts.txt");
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"), testArtifacts.toString());
|
||||
assertEquals(3, testArtifacts.size());
|
||||
|
||||
List<String> testClassPath = verifier.loadLines(targetDir + "/test-cp.txt", "UTF-8");
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("test-classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("direct-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("compile-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("runtime-0.1.jar"));
|
||||
List<String> testClassPath = verifier.loadLines(targetDir + "/test-cp.txt");
|
||||
assertTrue(testClassPath.contains("classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("test-classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("direct-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("compile-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("runtime-0.1.jar"), testClassPath.toString());
|
||||
assertEquals(5, testClassPath.size());
|
||||
}
|
||||
|
||||
|
@ -161,41 +163,41 @@ public class MavenIT0143TransitiveDependencyScopesTest extends AbstractMavenInte
|
|||
Verifier verifier = run("runtime");
|
||||
String targetDir = "target-runtime";
|
||||
|
||||
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt", "UTF-8");
|
||||
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt");
|
||||
assertEquals(0, compileArtifacts.size());
|
||||
|
||||
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt", "UTF-8");
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("classes"));
|
||||
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt");
|
||||
assertTrue(compileClassPath.contains("classes"), compileClassPath.toString());
|
||||
assertEquals(1, compileClassPath.size());
|
||||
|
||||
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt", "UTF-8");
|
||||
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt");
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"), runtimeArtifacts.toString());
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"), runtimeArtifacts.toString());
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"), runtimeArtifacts.toString());
|
||||
assertEquals(3, runtimeArtifacts.size());
|
||||
|
||||
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt", "UTF-8");
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("classes"));
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("direct-0.1.jar"));
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("compile-0.1.jar"));
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("runtime-0.1.jar"));
|
||||
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt");
|
||||
assertTrue(runtimeClassPath.contains("classes"), runtimeClassPath.toString());
|
||||
assertTrue(runtimeClassPath.contains("direct-0.1.jar"), runtimeClassPath.toString());
|
||||
assertTrue(runtimeClassPath.contains("compile-0.1.jar"), runtimeClassPath.toString());
|
||||
assertTrue(runtimeClassPath.contains("runtime-0.1.jar"), runtimeClassPath.toString());
|
||||
assertEquals(4, runtimeClassPath.size());
|
||||
|
||||
List<String> testArtifacts = verifier.loadLines(targetDir + "/test-artifacts.txt", "UTF-8");
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
|
||||
List<String> testArtifacts = verifier.loadLines(targetDir + "/test-artifacts.txt");
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"), testArtifacts.toString());
|
||||
assertEquals(3, testArtifacts.size());
|
||||
|
||||
List<String> testClassPath = verifier.loadLines(targetDir + "/test-cp.txt", "UTF-8");
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("test-classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("direct-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("compile-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("runtime-0.1.jar"));
|
||||
List<String> testClassPath = verifier.loadLines(targetDir + "/test-cp.txt");
|
||||
assertTrue(testClassPath.contains("classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("test-classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("direct-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("compile-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("runtime-0.1.jar"), testClassPath.toString());
|
||||
assertEquals(5, testClassPath.size());
|
||||
}
|
||||
|
||||
|
@ -210,32 +212,32 @@ public class MavenIT0143TransitiveDependencyScopesTest extends AbstractMavenInte
|
|||
Verifier verifier = run("test");
|
||||
String targetDir = "target-test";
|
||||
|
||||
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt", "UTF-8");
|
||||
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt");
|
||||
assertEquals(0, compileArtifacts.size());
|
||||
|
||||
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt", "UTF-8");
|
||||
assertTrue(compileClassPath.toString(), compileClassPath.contains("classes"));
|
||||
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt");
|
||||
assertTrue(compileClassPath.contains("classes"), compileClassPath.toString());
|
||||
assertEquals(1, compileClassPath.size());
|
||||
|
||||
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt", "UTF-8");
|
||||
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt");
|
||||
assertEquals(0, runtimeArtifacts.size());
|
||||
|
||||
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt", "UTF-8");
|
||||
assertTrue(runtimeClassPath.toString(), runtimeClassPath.contains("classes"));
|
||||
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt");
|
||||
assertTrue(runtimeClassPath.contains("classes"), runtimeClassPath.toString());
|
||||
assertEquals(1, runtimeClassPath.size());
|
||||
|
||||
List<String> testArtifacts = verifier.loadLines(targetDir + "/test-artifacts.txt", "UTF-8");
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
|
||||
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
|
||||
List<String> testArtifacts = verifier.loadLines(targetDir + "/test-artifacts.txt");
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"), testArtifacts.toString());
|
||||
assertTrue(testArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"), testArtifacts.toString());
|
||||
assertEquals(3, testArtifacts.size());
|
||||
|
||||
List<String> testClassPath = verifier.loadLines(targetDir + "/test-cp.txt", "UTF-8");
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("test-classes"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("direct-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("compile-0.1.jar"));
|
||||
assertTrue(testClassPath.toString(), testClassPath.contains("runtime-0.1.jar"));
|
||||
List<String> testClassPath = verifier.loadLines(targetDir + "/test-cp.txt");
|
||||
assertTrue(testClassPath.contains("classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("test-classes"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("direct-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("compile-0.1.jar"), testClassPath.toString());
|
||||
assertTrue(testClassPath.contains("runtime-0.1.jar"), testClassPath.toString());
|
||||
assertEquals(5, testClassPath.size());
|
||||
}
|
||||
|
||||
|
@ -248,8 +250,8 @@ public class MavenIT0143TransitiveDependencyScopesTest extends AbstractMavenInte
|
|||
verifier.deleteArtifacts("org.apache.maven.its.it0143");
|
||||
Map<String, String> filterProps = verifier.newDefaultFilterMap();
|
||||
filterProps.put("@scope@", scope);
|
||||
verifier.filterFile("pom-template.xml", "pom.xml", "UTF-8", filterProps);
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8", filterProps);
|
||||
verifier.filterFile("pom-template.xml", "pom.xml", filterProps);
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", filterProps);
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.setLogFileName("log-" + scope + ".txt");
|
||||
|
|
|
@ -22,10 +22,11 @@ import java.io.File;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* @author Benjamin Bentmann
|
||||
*
|
||||
|
@ -97,7 +98,7 @@ public class MavenIT0144LifecycleExecutionOrderTest extends AbstractMavenIntegra
|
|||
expected.add("post-site");
|
||||
expected.add("site-deploy");
|
||||
|
||||
List<String> phases = verifier.loadLines("target/phases.log", "UTF-8");
|
||||
List<String> phases = verifier.loadLines("target/phases.log");
|
||||
assertEquals(expected, phases);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.io.IOException;
|
|||
import java.net.InetAddress;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.eclipse.jetty.server.Handler;
|
||||
import org.eclipse.jetty.server.NetworkConnector;
|
||||
|
@ -80,7 +79,7 @@ public class MavenIT0146InstallerSnapshotNaming extends AbstractMavenIntegration
|
|||
properties.put("@host@", InetAddress.getLoopbackAddress().getCanonicalHostName());
|
||||
properties.put("@port@", Integer.toString(port));
|
||||
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8", properties);
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", properties);
|
||||
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
|
@ -117,7 +116,7 @@ public class MavenIT0146InstallerSnapshotNaming extends AbstractMavenIntegration
|
|||
properties.put("@host@", InetAddress.getLoopbackAddress().getCanonicalHostName());
|
||||
properties.put("@port@", Integer.toString(port));
|
||||
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8", properties);
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", properties);
|
||||
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.VerificationException;
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -25,10 +25,11 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-187">MNG-187</a>.
|
||||
*
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-249">MNG-249</a>.
|
||||
*
|
||||
|
@ -51,19 +52,19 @@ public class MavenITmng0249ResolveDepsFromReactorTest extends AbstractMavenInteg
|
|||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
List<String> ccp = verifier.loadLines("test-component-c/target/compile.txt", "UTF-8");
|
||||
assertTrue(ccp.toString(), ccp.contains("test-component-c/classes"));
|
||||
assertTrue(ccp.toString(), ccp.contains("test-component-b/classes"));
|
||||
assertTrue(ccp.toString(), ccp.contains("test-component-a/classes"));
|
||||
List<String> ccp = verifier.loadLines("test-component-c/target/compile.txt");
|
||||
assertTrue(ccp.contains("test-component-c/classes"), ccp.toString());
|
||||
assertTrue(ccp.contains("test-component-b/classes"), ccp.toString());
|
||||
assertTrue(ccp.contains("test-component-a/classes"), ccp.toString());
|
||||
|
||||
List<String> rcp = verifier.loadLines("test-component-c/target/runtime.txt", "UTF-8");
|
||||
assertTrue(rcp.toString(), rcp.contains("test-component-c/classes"));
|
||||
assertTrue(rcp.toString(), rcp.contains("test-component-b/classes"));
|
||||
assertTrue(rcp.toString(), rcp.contains("test-component-a/classes"));
|
||||
List<String> rcp = verifier.loadLines("test-component-c/target/runtime.txt");
|
||||
assertTrue(rcp.contains("test-component-c/classes"), rcp.toString());
|
||||
assertTrue(rcp.contains("test-component-b/classes"), rcp.toString());
|
||||
assertTrue(rcp.contains("test-component-a/classes"), rcp.toString());
|
||||
|
||||
List<String> tcp = verifier.loadLines("test-component-c/target/test.txt", "UTF-8");
|
||||
assertTrue(tcp.toString(), tcp.contains("test-component-c/classes"));
|
||||
assertTrue(tcp.toString(), tcp.contains("test-component-b/classes"));
|
||||
assertTrue(tcp.toString(), tcp.contains("test-component-a/classes"));
|
||||
List<String> tcp = verifier.loadLines("test-component-c/target/test.txt");
|
||||
assertTrue(tcp.contains("test-component-c/classes"), tcp.toString());
|
||||
assertTrue(tcp.contains("test-component-b/classes"), tcp.toString());
|
||||
assertTrue(tcp.contains("test-component-a/classes"), tcp.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -49,7 +48,7 @@ public class MavenITmng0377PluginLookupFromPrefixTest extends AbstractMavenInteg
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0377");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("-Dtouch.outputFile=target/file.txt");
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -57,7 +56,7 @@ public class MavenITmng0449PluginVersionResolutionTest extends AbstractMavenInte
|
|||
}
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.filterFile("../settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("../settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
@ -94,7 +93,7 @@ public class MavenITmng0449PluginVersionResolutionTest extends AbstractMavenInte
|
|||
}
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.filterFile("../settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("../settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("org.apache.maven.its.mng0449:maven-it-plugin-a:touch");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-461">MNG-461</a>.
|
||||
*
|
||||
|
@ -49,14 +50,14 @@ public class MavenITmng0461TolerateMissingDependencyPomTest extends AbstractMave
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0461");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
List<String> classpath = verifier.loadLines("target/classpath.txt", "UTF-8");
|
||||
assertTrue(classpath.toString(), classpath.contains("dep-0.1.jar"));
|
||||
List<String> classpath = verifier.loadLines("target/classpath.txt");
|
||||
assertTrue(classpath.contains("dep-0.1.jar"), classpath.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-469">MNG-469</a>.
|
||||
*
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -22,10 +22,12 @@ import java.io.File;
|
|||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.VerificationException;
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-479">MNG-479</a>.
|
||||
*
|
||||
|
@ -62,7 +64,7 @@ public class MavenITmng0479OverrideCentralRepoTest extends AbstractMavenIntegrat
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("org.apache.maven.its.plugins:maven-it-plugin-expression:2.1-SNAPSHOT:eval");
|
||||
|
@ -121,7 +123,7 @@ public class MavenITmng0479OverrideCentralRepoTest extends AbstractMavenIntegrat
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0479");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
|
@ -139,7 +141,7 @@ public class MavenITmng0479OverrideCentralRepoTest extends AbstractMavenIntegrat
|
|||
verifier = newVerifier(new File(testDir, "test-2").getAbsolutePath());
|
||||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
try {
|
||||
|
@ -156,7 +158,7 @@ public class MavenITmng0479OverrideCentralRepoTest extends AbstractMavenIntegrat
|
|||
verifier = newVerifier(new File(testDir, "test-3").getAbsolutePath());
|
||||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
try {
|
||||
|
@ -174,7 +176,7 @@ public class MavenITmng0479OverrideCentralRepoTest extends AbstractMavenIntegrat
|
|||
verifier = newVerifier(new File(testDir, "test-4").getAbsolutePath());
|
||||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
try {
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-505">MNG-505</a>.
|
||||
*
|
||||
|
@ -53,18 +55,18 @@ public class MavenITmng0505VersionRangeTest extends AbstractMavenIntegrationTest
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0505");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
Collection<String> artifacts = verifier.loadLines("target/artifacts.txt", "UTF-8");
|
||||
Collection<String> artifacts = verifier.loadLines("target/artifacts.txt");
|
||||
assertEquals(4, artifacts.size());
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0505:a:jar:1.1"));
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0505:b:jar:1.0"));
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0505:c:jar:3.8"));
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0505:d:jar:2.1.1"));
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.mng0505:a:jar:1.1"), artifacts.toString());
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.mng0505:b:jar:1.0"), artifacts.toString());
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.mng0505:c:jar:3.8"), artifacts.toString());
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.mng0505:d:jar:2.1.1"), artifacts.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-507">MNG-507</a>.
|
||||
*
|
||||
|
@ -61,7 +62,7 @@ public class MavenITmng0507ArtifactRelocationTest extends AbstractMavenIntegrati
|
|||
verifier.verifyArtifactPresent("org.apache.maven", "maven-core-it-support-old-location", "1.1", "pom");
|
||||
verifier.verifyArtifactNotPresent("org.apache.maven", "maven-core-it-support-old-location", "1.1", "jar");
|
||||
|
||||
List<String> artifacts = verifier.loadLines("target/artifacts.txt", "UTF-8");
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven:maven-core-it-support:jar:1.1"));
|
||||
List<String> artifacts = verifier.loadLines("target/artifacts.txt");
|
||||
assertTrue(artifacts.contains("org.apache.maven:maven-core-it-support:jar:1.1"), artifacts.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.eclipse.jetty.security.ConstraintMapping;
|
||||
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
||||
|
@ -41,6 +40,7 @@ import org.junit.jupiter.api.BeforeEach;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.eclipse.jetty.util.security.Constraint.__BASIC_AUTH;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-553">MNG-553</a>.
|
||||
|
@ -122,7 +122,7 @@ public class MavenITmng0553SettingsAuthzEncryptionTest extends AbstractMavenInte
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0553");
|
||||
verifier.verifyArtifactNotPresent("org.apache.maven.its.mng0553", "a", "0.1-SNAPSHOT", "jar");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8", filterProps);
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", filterProps);
|
||||
ItUtils.setUserHome(verifier, new File(testDir, "userhome"));
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
|
@ -156,8 +156,8 @@ public class MavenITmng0553SettingsAuthzEncryptionTest extends AbstractMavenInte
|
|||
verifier.verifyArtifactNotPresent("org.apache.maven.its.mng0553", "a", "0.1-SNAPSHOT", "jar");
|
||||
|
||||
// NOTE: The tilde ~ in the file name is essential part of the test
|
||||
verifier.filterFile("security-template.xml", "settings~security.xml", "UTF-8", filterProps);
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8", filterProps);
|
||||
verifier.filterFile("security-template.xml", "settings~security.xml", filterProps);
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", filterProps);
|
||||
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
|
@ -194,7 +194,7 @@ public class MavenITmng0553SettingsAuthzEncryptionTest extends AbstractMavenInte
|
|||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
List<String> log = verifier.loadLines(verifier.getLogFileName(), null);
|
||||
List<String> log = verifier.loadLogLines();
|
||||
assertNotNull(findPassword(log));
|
||||
|
||||
verifier = newVerifier(testDir.getAbsolutePath());
|
||||
|
@ -207,7 +207,7 @@ public class MavenITmng0553SettingsAuthzEncryptionTest extends AbstractMavenInte
|
|||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
log = verifier.loadLines(verifier.getLogFileName(), null);
|
||||
log = verifier.loadLogLines();
|
||||
assertNotNull(findPassword(log));
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-666">MNG-666</a>.
|
||||
*
|
||||
|
@ -50,7 +51,7 @@ public class MavenITmng0666IgnoreLegacyPomTest extends AbstractMavenIntegrationT
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0059");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
|
@ -59,7 +60,7 @@ public class MavenITmng0666IgnoreLegacyPomTest extends AbstractMavenIntegrationT
|
|||
|
||||
verifier.verifyArtifactPresent("org.apache.maven.its.it0059", "test", "3.8.1", "jar");
|
||||
|
||||
List<String> artifacts = verifier.loadLines("target/artifacts.txt", "UTF-8");
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0059:test:jar:3.8.1"));
|
||||
List<String> artifacts = verifier.loadLines("target/artifacts.txt");
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.it0059:test:jar:3.8.1"), artifacts.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-674">MNG-674</a> and
|
||||
* <a href="https://issues.apache.org/jira/browse/MNG-4997">MNG-4997</a>.
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-680">MNG-680</a>.
|
||||
*
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -27,10 +27,9 @@ import java.io.PrintWriter;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.maven.shared.verifier.VerificationException;
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.eclipse.jetty.server.Handler;
|
||||
import org.eclipse.jetty.server.NetworkConnector;
|
||||
|
@ -39,6 +38,8 @@ import org.eclipse.jetty.server.Server;
|
|||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-768">MNG-768</a>.
|
||||
*
|
||||
|
@ -110,9 +111,8 @@ public class MavenITmng0768OfflineModeTest extends AbstractMavenIntegrationTestC
|
|||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0768");
|
||||
verifier.setLogFileName("log1.txt");
|
||||
Properties props = new Properties();
|
||||
props.put("@port@", Integer.toString(port));
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8", props);
|
||||
Map<String, String> props = Map.of("@port@", Integer.toString(port));
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", props);
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument(
|
||||
|
@ -140,7 +140,7 @@ public class MavenITmng0768OfflineModeTest extends AbstractMavenIntegrationTestC
|
|||
verifier.verifyErrorFreeLog();
|
||||
}
|
||||
|
||||
assertTrue(requestedUris.toString(), requestedUris.isEmpty());
|
||||
assertTrue(requestedUris.isEmpty(), requestedUris.toString());
|
||||
|
||||
{
|
||||
// phase 3: delete test artifact and run build in offline mode to check it fails now
|
||||
|
@ -166,7 +166,7 @@ public class MavenITmng0768OfflineModeTest extends AbstractMavenIntegrationTestC
|
|||
|
||||
System.out.println("Bound server socket to the port " + port);
|
||||
|
||||
assertTrue(requestedUris.toString(), requestedUris.isEmpty());
|
||||
assertTrue(requestedUris.isEmpty(), requestedUris.toString());
|
||||
} finally {
|
||||
server.stop();
|
||||
server.join();
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-814">MNG-814</a>.
|
||||
*
|
||||
|
|
|
@ -22,10 +22,11 @@ import java.io.File;
|
|||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-818">MNG-818</a>.
|
||||
*
|
||||
|
@ -50,14 +51,14 @@ public class MavenITmng0818WarDepsNotTransitiveTest extends AbstractMavenIntegra
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0080");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
Collection<String> artifacts = verifier.loadLines("target/artifacts.txt", "UTF-8");
|
||||
Collection<String> artifacts = verifier.loadLines("target/artifacts.txt");
|
||||
assertEquals(Collections.singletonList("org.apache.maven.its.it0080:war:war:0.1"), artifacts);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,13 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-820">MNG-820</a>.
|
||||
*
|
||||
|
@ -49,18 +52,18 @@ public class MavenITmng0820ConflictResolutionTest extends AbstractMavenIntegrati
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0820");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
Collection<String> artifacts = verifier.loadLines("target/artifacts.txt", "UTF-8");
|
||||
Collection<String> artifacts = verifier.loadLines("target/artifacts.txt");
|
||||
assertEquals(3, artifacts.size());
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0820:d:jar:2.0"));
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0820:c:jar:1.4"));
|
||||
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0820:a:jar:1.0"));
|
||||
assertFalse(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0505:b:jar:1.0"));
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.mng0820:d:jar:2.0"), artifacts.toString());
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.mng0820:c:jar:1.4"), artifacts.toString());
|
||||
assertTrue(artifacts.contains("org.apache.maven.its.mng0820:a:jar:1.0"), artifacts.toString());
|
||||
assertFalse(artifacts.contains("org.apache.maven.its.mng0505:b:jar:1.0"), artifacts.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -23,11 +23,11 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.maven.shared.utils.io.FileUtils;
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-828">MNG-828</a>.
|
||||
*
|
||||
|
@ -58,7 +58,7 @@ public class MavenITmng0828PluginConfigValuesInDebugTest extends AbstractMavenIn
|
|||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
String log = FileUtils.fileRead(new File(verifier.getBasedir(), verifier.getLogFileName()));
|
||||
String log = verifier.loadLogContent();
|
||||
|
||||
checkLog(log, "[DEBUG] (f) aliasDefaultExpressionParam = test");
|
||||
checkLog(log, "[DEBUG] (f) basedir = " + testDir.getCanonicalPath());
|
||||
|
@ -110,7 +110,7 @@ public class MavenITmng0828PluginConfigValuesInDebugTest extends AbstractMavenIn
|
|||
|
||||
private void checkLog(String log, String expected) {
|
||||
assertTrue(
|
||||
NL + ">>>" + NL + log + "<<<" + NL + NL + "does not contains: " + NL + expected + NL,
|
||||
log.contains(expected));
|
||||
log.contains(expected),
|
||||
NL + ">>>" + NL + log + "<<<" + NL + NL + "does not contains: " + NL + expected + NL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.VerificationException;
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -51,7 +50,7 @@ public class MavenITmng0836PluginParentResolutionTest extends AbstractMavenInteg
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng836");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
// Maven 3.x aims to separate plugins and project dependencies (MNG-4191)
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-848">MNG-848</a>.
|
||||
*
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-866">MNG-866</a> and
|
||||
* <a href="https://issues.apache.org/jira/browse/MNG-160">MNG-160</a>.
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -50,7 +49,7 @@ public class MavenITmng0870ReactorAwarePluginDiscoveryTest extends AbstractMaven
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("project/target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0870");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("initialize");
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-947">MNG-947</a>.
|
||||
*
|
||||
|
@ -52,28 +54,28 @@ public class MavenITmng0947OptionalDependencyTest extends AbstractMavenIntegrati
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0947");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
List<String> compile = verifier.loadLines("target/compile.txt", "UTF-8");
|
||||
assertTrue(compile.toString(), compile.contains("org.apache.maven.its.mng0947:d:jar:0.1 (optional)"));
|
||||
assertTrue(compile.toString(), compile.contains("org.apache.maven.its.mng0947:e:jar:0.1 (optional)"));
|
||||
List<String> compile = verifier.loadLines("target/compile.txt");
|
||||
assertTrue(compile.contains("org.apache.maven.its.mng0947:d:jar:0.1 (optional)"), compile.toString());
|
||||
assertTrue(compile.contains("org.apache.maven.its.mng0947:e:jar:0.1 (optional)"), compile.toString());
|
||||
assertEquals(2, compile.size());
|
||||
|
||||
List<String> runtime = verifier.loadLines("target/runtime.txt", "UTF-8");
|
||||
assertTrue(runtime.toString(), runtime.contains("org.apache.maven.its.mng0947:c:jar:0.1"));
|
||||
assertTrue(runtime.toString(), runtime.contains("org.apache.maven.its.mng0947:d:jar:0.1 (optional)"));
|
||||
assertTrue(runtime.toString(), runtime.contains("org.apache.maven.its.mng0947:e:jar:0.1 (optional)"));
|
||||
List<String> runtime = verifier.loadLines("target/runtime.txt");
|
||||
assertTrue(runtime.contains("org.apache.maven.its.mng0947:c:jar:0.1"), runtime.toString());
|
||||
assertTrue(runtime.contains("org.apache.maven.its.mng0947:d:jar:0.1 (optional)"), runtime.toString());
|
||||
assertTrue(runtime.contains("org.apache.maven.its.mng0947:e:jar:0.1 (optional)"), runtime.toString());
|
||||
assertEquals(3, runtime.size());
|
||||
|
||||
List<String> test = verifier.loadLines("target/test.txt", "UTF-8");
|
||||
assertTrue(test.toString(), test.contains("org.apache.maven.its.mng0947:c:jar:0.1"));
|
||||
assertTrue(test.toString(), test.contains("org.apache.maven.its.mng0947:d:jar:0.1 (optional)"));
|
||||
assertTrue(test.toString(), test.contains("org.apache.maven.its.mng0947:e:jar:0.1 (optional)"));
|
||||
List<String> test = verifier.loadLines("target/test.txt");
|
||||
assertTrue(test.contains("org.apache.maven.its.mng0947:c:jar:0.1"), test.toString());
|
||||
assertTrue(test.contains("org.apache.maven.its.mng0947:d:jar:0.1 (optional)"), test.toString());
|
||||
assertTrue(test.contains("org.apache.maven.its.mng0947:e:jar:0.1 (optional)"), test.toString());
|
||||
assertEquals(3, test.size());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-956">MNG-956</a>.
|
||||
*
|
||||
|
@ -48,7 +49,7 @@ public class MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest extend
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng0956");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,10 +20,11 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-1021">MNG-1021</a>.
|
||||
*
|
||||
|
@ -58,7 +59,7 @@ public class MavenITmng1021EqualAttachmentBuildNumberTest extends AbstractMavenI
|
|||
|
||||
String dir = "repo/org/apache/maven/its/mng1021/test/";
|
||||
String snapshot = getSnapshotVersion(new File(testDir, dir + "1-SNAPSHOT"));
|
||||
assertTrue(snapshot, snapshot.endsWith("-1"));
|
||||
assertTrue(snapshot.endsWith("-1"), snapshot);
|
||||
|
||||
verifier.verifyFilePresent(dir + "maven-metadata.xml");
|
||||
verifier.verifyFilePresent(dir + "maven-metadata.xml.md5");
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -53,7 +52,7 @@ public class MavenITmng1088ReactorPluginResolutionTest extends AbstractMavenInte
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("client/target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng1088");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
// NOTE: It's essential part of the test to invoke a phase before "compile"
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-1142">MNG-1142</a>.
|
||||
*
|
||||
|
@ -67,15 +69,15 @@ public class MavenITmng1142VersionRangeIntersectionTest extends AbstractMavenInt
|
|||
verifier.deleteArtifacts("org.apache.maven.its.mng1142");
|
||||
verifier.addCliArgument("-s");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.filterFile("../settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("../settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
List<String> classpath = verifier.loadLines("target/classpath.txt", "UTF-8");
|
||||
List<String> classpath = verifier.loadLines("target/classpath.txt");
|
||||
|
||||
assertFalse(classpath.toString(), classpath.contains("a-1.1.2.jar"));
|
||||
assertTrue(classpath.toString(), classpath.contains("a-1.1.1.jar"));
|
||||
assertTrue(classpath.toString(), classpath.contains("b-0.1.jar"));
|
||||
assertFalse(classpath.contains("a-1.1.2.jar"), classpath.toString());
|
||||
assertTrue(classpath.contains("a-1.1.1.jar"), classpath.toString());
|
||||
assertTrue(classpath.contains("b-0.1.jar"), classpath.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-1233">MNG-1233</a>.
|
||||
*
|
||||
|
@ -49,27 +51,27 @@ public class MavenITmng1233WarDepWithProvidedScopeTest extends AbstractMavenInte
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.it0083");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
Collection<String> compileArtifacts = verifier.loadLines("target/compile.txt", "UTF-8");
|
||||
Collection<String> compileArtifacts = verifier.loadLines("target/compile.txt");
|
||||
assertTrue(
|
||||
compileArtifacts.toString(),
|
||||
compileArtifacts.contains("org.apache.maven.its.it0083:direct-dep:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0083:direct-dep:jar:0.1"),
|
||||
compileArtifacts.toString());
|
||||
assertTrue(
|
||||
compileArtifacts.toString(),
|
||||
compileArtifacts.contains("org.apache.maven.its.it0083:trans-dep:jar:0.1"));
|
||||
compileArtifacts.contains("org.apache.maven.its.it0083:trans-dep:jar:0.1"),
|
||||
compileArtifacts.toString());
|
||||
|
||||
Collection<String> runtimeArtifacts = verifier.loadLines("target/runtime.txt", "UTF-8");
|
||||
Collection<String> runtimeArtifacts = verifier.loadLines("target/runtime.txt");
|
||||
assertTrue(
|
||||
runtimeArtifacts.toString(),
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0083:direct-dep:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0083:direct-dep:jar:0.1"),
|
||||
runtimeArtifacts.toString());
|
||||
assertFalse(
|
||||
runtimeArtifacts.toString(),
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0083:trans-dep:jar:0.1"));
|
||||
runtimeArtifacts.contains("org.apache.maven.its.it0083:trans-dep:jar:0.1"),
|
||||
runtimeArtifacts.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,12 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-1323">MNG-1323</a>.
|
||||
*
|
||||
|
@ -54,7 +56,7 @@ public class MavenITmng1323AntrunDependenciesTest extends AbstractMavenIntegrati
|
|||
verifier.deleteDirectory("b/target");
|
||||
verifier.deleteDirectory("c/target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng1323");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -48,7 +47,7 @@ public class MavenITmng1349ChecksumFormatsTest extends AbstractMavenIntegrationT
|
|||
Verifier verifier = newVerifier(testDir.getAbsolutePath());
|
||||
verifier.setAutoclean(false);
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng1349");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-1412">MNG-1412</a>:
|
||||
* it tests that dependencies order in classpath matches <code>pom.xml</code>.
|
||||
|
@ -46,29 +47,29 @@ public class MavenITmng1412DependenciesOrderTest extends AbstractMavenIntegratio
|
|||
verifier.setAutoclean(false);
|
||||
verifier.deleteDirectory("target");
|
||||
verifier.deleteArtifacts("org.apache.maven.its.mng1412");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
|
||||
verifier.filterFile("settings-template.xml", "settings.xml");
|
||||
verifier.addCliArgument("--settings");
|
||||
verifier.addCliArgument("settings.xml");
|
||||
verifier.addCliArgument("validate");
|
||||
verifier.execute();
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
List<String> compileArtifacts = verifier.loadLines("target/compile-artifacts.txt", "UTF-8");
|
||||
List<String> compileArtifacts = verifier.loadLines("target/compile-artifacts.txt");
|
||||
assertArtifactOrder(compileArtifacts);
|
||||
|
||||
List<String> compileClassPath = verifier.loadLines("target/compile-classpath.txt", "UTF-8");
|
||||
List<String> compileClassPath = verifier.loadLines("target/compile-classpath.txt");
|
||||
assertClassPathOrder(compileClassPath.subList(1, compileClassPath.size()));
|
||||
|
||||
List<String> runtimeArtifacts = verifier.loadLines("target/runtime-artifacts.txt", "UTF-8");
|
||||
List<String> runtimeArtifacts = verifier.loadLines("target/runtime-artifacts.txt");
|
||||
assertArtifactOrder(runtimeArtifacts);
|
||||
|
||||
List<String> runtimeClassPath = verifier.loadLines("target/runtime-classpath.txt", "UTF-8");
|
||||
List<String> runtimeClassPath = verifier.loadLines("target/runtime-classpath.txt");
|
||||
assertClassPathOrder(runtimeClassPath.subList(1, runtimeClassPath.size()));
|
||||
|
||||
List<String> testArtifacts = verifier.loadLines("target/test-artifacts.txt", "UTF-8");
|
||||
List<String> testArtifacts = verifier.loadLines("target/test-artifacts.txt");
|
||||
assertArtifactOrder(testArtifacts);
|
||||
|
||||
List<String> testClassPath = verifier.loadLines("target/test-classpath.txt", "UTF-8");
|
||||
List<String> testClassPath = verifier.loadLines("target/test-classpath.txt");
|
||||
assertClassPathOrder(testClassPath.subList(2, testClassPath.size()));
|
||||
}
|
||||
|
||||
|
|
|
@ -21,10 +21,11 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-1415">MNG-1415</a>.
|
||||
*
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.apache.maven.it;
|
|||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.VerificationException;
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -22,10 +22,11 @@ import java.io.File;
|
|||
import java.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.VerificationException;
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-1701">MNG-1701</a>.
|
||||
*
|
||||
|
@ -62,7 +63,7 @@ public class MavenITmng1701DuplicatePluginTest extends AbstractMavenIntegrationT
|
|||
logLevel = "ERROR";
|
||||
}
|
||||
|
||||
List<String> lines = verifier.loadLines(verifier.getLogFileName(), "UTF-8");
|
||||
List<String> lines = verifier.loadLogLines();
|
||||
boolean foundMessage = false;
|
||||
for (String line : lines) {
|
||||
if (line.startsWith("[" + logLevel + "]")
|
||||
|
@ -73,6 +74,6 @@ public class MavenITmng1701DuplicatePluginTest extends AbstractMavenIntegrationT
|
|||
}
|
||||
}
|
||||
|
||||
assertTrue("Duplicate plugin message wasn't generated.", foundMessage);
|
||||
assertTrue(foundMessage, "Duplicate plugin message wasn't generated.");
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue