Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

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;
Expand All @@ -34,11 +33,11 @@ public class MavenITmng3991ValidDependencyScopeTest extends AbstractMavenIntegra

public MavenITmng3991ValidDependencyScopeTest() {
// TODO: One day, we should be able to error out but this requires to consider extensions and their use cases
super("[4.0,)");
super(ALL_MAVEN_VERSIONS);
}

/**
* Test that invalid dependency scopes cause a validation error during building.
* Test that invalid dependency scopes cause a validation warning during building.
*
* @throws Exception in case of failure
*/
Expand All @@ -49,13 +48,10 @@ public void testit() throws Exception {
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
try {
verifier.addCliArgument("validate");
verifier.execute();
verifier.verifyErrorFreeLog();
fail("Invalid dependency scope did not cause validation error");
} catch (VerificationException e) {
// expected
}
verifier.addCliArgument("validate");
verifier.execute();
verifier.verifyErrorFreeLog();
verifier.verifyTextInLog(
"[WARNING] 'dependencies.dependency.scope' for org.apache.maven.its.mng3991:a:jar must be one of");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
public class MavenITmng4262MakeLikeReactorDottedPath370Test extends AbstractMavenIntegrationTestCase {

public MavenITmng4262MakeLikeReactorDottedPath370Test() {
super("[4.0.0-alpha-1,)");
super(ALL_MAVEN_VERSIONS);
}

private void clean(Verifier verifier) throws Exception {
Expand All @@ -47,6 +47,7 @@ private void clean(Verifier verifier) throws Exception {
*/
@Test
public void testitMakeRoot() throws Exception {
requiresMavenVersion("[4.0.0,)");
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-4262");

Verifier verifier = newVerifier(new File(testDir, "parent").getAbsolutePath());
Expand Down

This file was deleted.

This file was deleted.

Loading