From 36157231790e3812c9d3fb2b8a0cade697c30735 Mon Sep 17 00:00:00 2001 From: Maarten Mulders Date: Tue, 14 Apr 2020 22:03:37 +0200 Subject: [PATCH] [MNG-4660] Use of --resume-from in multi-module project fails with missing inter-module dependencies --- its/core-it-suite/pom.xml | 6 + .../apache/maven/it/IntegrationTestSuite.java | 2 + ...avenITmng4660OutdatedPackagedArtifact.java | 122 ++++++++++++++++++ .../it/MavenITmng4660ResumeFromTest.java | 112 ++++++++++++++++ .../module-a/pom.xml | 36 ++++++ .../java/org/apache/maven/it/Example.java | 24 ++++ .../module-b/pom.xml | 44 +++++++ .../org/apache/maven/it/AnotherExample.java | 28 ++++ .../java/org/apache/maven/it/TestCase.java | 31 +++++ .../pom.xml | 59 +++++++++ .../mng-4660-resume-from/module-a/pom.xml | 36 ++++++ .../java/org/apache/maven/it/Example.java | 24 ++++ .../mng-4660-resume-from/module-b/pom.xml | 44 +++++++ .../org/apache/maven/it/AnotherExample.java | 28 ++++ .../java/org/apache/maven/it/TestCase.java | 34 +++++ .../resources/mng-4660-resume-from/pom.xml | 59 +++++++++ 16 files changed, 689 insertions(+) create mode 100644 its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660OutdatedPackagedArtifact.java create mode 100644 its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660ResumeFromTest.java create mode 100644 its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/pom.xml create mode 100644 its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/src/main/java/org/apache/maven/it/Example.java create mode 100644 its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/pom.xml create mode 100644 its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/src/main/java/org/apache/maven/it/AnotherExample.java create mode 100644 its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/src/test/java/org/apache/maven/it/TestCase.java create mode 100644 its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/pom.xml create mode 100644 its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml create mode 100644 its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/src/main/java/org/apache/maven/it/Example.java create mode 100644 its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml create mode 100644 its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/main/java/org/apache/maven/it/AnotherExample.java create mode 100644 its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/test/java/org/apache/maven/it/TestCase.java create mode 100644 its/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml diff --git a/its/core-it-suite/pom.xml b/its/core-it-suite/pom.xml index 1830219045..2850f66d9c 100644 --- a/its/core-it-suite/pom.xml +++ b/its/core-it-suite/pom.xml @@ -91,6 +91,12 @@ under the License. 4.12 + + org.hamcrest + hamcrest-all + 1.3 + test + org.codehaus.plexus plexus-utils diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index 924e1fe413..3f0cbc8d1e 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -107,6 +107,8 @@ public class IntegrationTestSuite // ------------------------------------------------------------------------------------------------------------- // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 + suite.addTestSuite( MavenITmng4660ResumeFromTest.class ); + suite.addTestSuite( MavenITmng4660OutdatedPackagedArtifact.class ); suite.addTestSuite( MavenITmng6759TransitiveDependencyRepositoriesTest.class ); suite.addTestSuite( MavenITmng6720FailFastTest.class ); suite.addTestSuite( MavenITmng6558ToolchainsBuildingEventTest.class ); diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660OutdatedPackagedArtifact.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660OutdatedPackagedArtifact.java new file mode 100644 index 0000000000..afc46de503 --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660OutdatedPackagedArtifact.java @@ -0,0 +1,122 @@ +package org.apache.maven.it; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.maven.it.util.ResourceExtractor; +import org.apache.maven.shared.utils.io.FileUtils; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import static org.junit.Assert.assertThat; +import static org.hamcrest.Matchers.greaterThan; + +/** + * This is a test case for a new check introduced with MNG-4660. + * That check verifies if a packaged artifact within the Reactor is up-to-date with the outputDirectory of the same project. + * + * @author Maarten Mulders + * @author Martin Kanters + */ +public class MavenITmng4660OutdatedPackagedArtifact extends AbstractMavenIntegrationTestCase { + public MavenITmng4660OutdatedPackagedArtifact() + { + super( "[3.7.0,)" ); + } + + /** + * Test that Maven logs a warning when a packaged artifact is found that is older than the outputDirectory of the + * same artifact. + */ + public void testShouldWarnWhenPackagedArtifactIsOutdated() throws Exception + { + final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4660-outdated-packaged-artifact" ); + + // 1. Package the whole project + final Verifier verifier1 = newVerifier( testDir.getAbsolutePath() ); + verifier1.deleteDirectory( "target" ); + verifier1.deleteArtifacts( "org.apache.maven.its.mng4660" ); + + verifier1.executeGoal( "package" ); + + Path module1Jar = testDir.toPath().resolve( "module-a/target/module-a-1.0.jar" ).toAbsolutePath(); + verifier1.verifyErrorFreeLog(); + verifier1.assertFilePresent( module1Jar.toString() ); + verifier1.resetStreams(); + + if ( System.getProperty( "java.version", "" ).startsWith( "1." ) ) + { + // Simulating the delay between two invocations. It also makes sure we're not hit by tests that run so fast, + // that the difference in file modification time (see below) is too small to observe. Java 8 on Linux and + // macOS returns that value with "just" second precision, which is not detailed enough. + Thread.sleep( 1_000 ); + } + + // 2. Create a properties file with some content and compile only that module (module A). + final Verifier verifier2 = newVerifier( testDir.getAbsolutePath() ); + final Path resourcesDirectory = Files.createDirectories( Paths.get( testDir.toString(), "module-a", "src", "main", "resources" ) ); + final Path fileToWrite = resourcesDirectory.resolve( "example.properties" ); + FileUtils.fileWrite( fileToWrite.toString(), "x=42" ); + + verifier2.setAutoclean( false ); + verifier2.addCliOption( "--projects" ); + verifier2.addCliOption( ":module-a" ); + verifier2.executeGoal( "compile" ); + + Path module1PropertiesFile = testDir.toPath().resolve( "module-a/target/classes/example.properties" ) + .toAbsolutePath(); + + verifier2.assertFilePresent( module1PropertiesFile.toString() ); + assertThat( Files.getLastModifiedTime( module1PropertiesFile ), + greaterThan ( Files.getLastModifiedTime( module1Jar ) ) ); + + Path module1Class = testDir.toPath().resolve( "module-a/target/classes/org/apache/maven/it/Example.class" ) + .toAbsolutePath(); + verifier2.verifyErrorFreeLog(); + verifier2.assertFilePresent( module1Class.toString() ); + verifier2.resetStreams(); + + // 3. Resume project build from module B, that depends on module A we just touched. Its packaged artifact + // is no longer in sync with its compiled artifacts. + final Verifier verifier3 = newVerifier( testDir.getAbsolutePath() ); + verifier3.setAutoclean( false ); + verifier3.addCliOption( "--resume-from" ); + verifier3.addCliOption( ":module-b" ); + verifier3.executeGoal( "compile" ); + + verifier3.verifyErrorFreeLog(); + try + { + verifier3.verifyTextInLog( "Packaged artifact is not up-to-date" ); + } + catch ( VerificationException e ) + { + String message = e.getMessage() + System.lineSeparator(); + message += " " + module1Jar.getFileName() + " -> " + Files.getLastModifiedTime( module1Jar ) + + System.lineSeparator(); + message += " " + module1PropertiesFile.getFileName() + " -> " + Files.getLastModifiedTime( module1PropertiesFile ) + + System.lineSeparator(); + throw new VerificationException( message, e.getCause() ); + } + verifier3.resetStreams(); + } +} diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660ResumeFromTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660ResumeFromTest.java new file mode 100644 index 0000000000..b223812a9f --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660ResumeFromTest.java @@ -0,0 +1,112 @@ +package org.apache.maven.it; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.maven.it.util.ResourceExtractor; + +import java.io.File; + +/** + * This is a test case for MNG-4660. + * + * @author Maarten Mulders + * @author Martin Kanters + */ +public class MavenITmng4660ResumeFromTest extends AbstractMavenIntegrationTestCase { + public MavenITmng4660ResumeFromTest() + { + super( "[3.7.0,)" ); + } + + /** + * Test that the --resume-from flag resolves dependencies inside the same Maven project + * without having them installed first. + * This test case uses the target/classes folder of module-a, for the situation where + * module-a has not been packaged. + */ + public void testShouldResolveOutputDirectoryFromEarlierBuild() throws Exception + { + final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4660-resume-from" ); + + final Verifier verifier1 = newVerifier( testDir.getAbsolutePath() ); + verifier1.deleteDirectory( "target" ); + verifier1.deleteArtifacts( "org.apache.maven.its.mng4660" ); + + try + { + verifier1.executeGoal( "test" ); // The test goal will not create a packaged artifact + fail( "Expected this invocation to fail" ); // See TestCase.java + } + catch ( final VerificationException ve ) + { + verifier1.verifyTextInLog( "Deliberately fail test case" ); + } + finally + { + verifier1.resetStreams(); + } + + final Verifier verifier2 = newVerifier( testDir.getAbsolutePath() ); + verifier2.setAutoclean( false ); + verifier2.addCliOption( "--resume-from" ); + verifier2.addCliOption( ":module-b" ); + verifier2.executeGoal( "compile" ); // to prevent the unit test from failing (again) + + verifier2.verifyErrorFreeLog(); + verifier2.resetStreams(); + } + + /** + * Test that the --resume-from flag resolves dependencies inside the same Maven project + * without having them installed first. + * This test case uses the packaged artifact of module-a. + */ + public void testShouldResolvePackagedArtifactFromEarlierBuild() throws Exception + { + final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4660-resume-from" ); + + final Verifier verifier1 = newVerifier( testDir.getAbsolutePath() ); + verifier1.deleteDirectory( "target" ); + verifier1.deleteArtifacts( "org.apache.maven.its.mng4660" ); + + try + { + verifier1.executeGoal( "verify" ); // The verify goal will create a packaged artifact + fail( "Expected this invocation to fail" ); // See TestCase.java + } + catch ( final VerificationException ve ) + { + verifier1.verifyTextInLog( "Deliberately fail test case" ); + } + finally + { + verifier1.resetStreams(); + } + + final Verifier verifier2 = newVerifier( testDir.getAbsolutePath() ); + verifier2.setAutoclean( false ); + verifier2.addCliOption( "--resume-from" ); + verifier2.addCliOption( ":module-b" ); + verifier2.executeGoal( "compile" ); // to prevent the unit test from failing (again) + + verifier2.verifyErrorFreeLog(); + verifier2.resetStreams(); + } +} diff --git a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/pom.xml new file mode 100644 index 0000000000..f6e2caa983 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/pom.xml @@ -0,0 +1,36 @@ + + + + + + + 4.0.0 + + module-a + + + org.apache.maven.its.mng4660 + parent + 1.0 + + + diff --git a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/src/main/java/org/apache/maven/it/Example.java b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/src/main/java/org/apache/maven/it/Example.java new file mode 100644 index 0000000000..1608aba21d --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-a/src/main/java/org/apache/maven/it/Example.java @@ -0,0 +1,24 @@ +package org.apache.maven.it; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +public class Example +{ +} \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/pom.xml new file mode 100644 index 0000000000..e00e63b5c3 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/pom.xml @@ -0,0 +1,44 @@ + + + + + + + 4.0.0 + + module-b + + + org.apache.maven.its.mng4660 + parent + 1.0 + + + + + org.apache.maven.its.mng4660 + module-a + 1.0 + + + + diff --git a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/src/main/java/org/apache/maven/it/AnotherExample.java b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/src/main/java/org/apache/maven/it/AnotherExample.java new file mode 100644 index 0000000000..20ab1874a5 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/src/main/java/org/apache/maven/it/AnotherExample.java @@ -0,0 +1,28 @@ +package org.apache.maven.it; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +public class AnotherExample +{ + public AnotherExample() + { + new Example(); + } +} \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/src/test/java/org/apache/maven/it/TestCase.java b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/src/test/java/org/apache/maven/it/TestCase.java new file mode 100644 index 0000000000..74a4579e55 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/module-b/src/test/java/org/apache/maven/it/TestCase.java @@ -0,0 +1,31 @@ +package org.apache.maven.it; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.junit.Test; + +public class TestCase +{ + @Test + public void testCase() + { + final Example example = new Example(); + } +} \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/pom.xml new file mode 100644 index 0000000000..565b2fc7a8 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-outdated-packaged-artifact/pom.xml @@ -0,0 +1,59 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng4660 + parent + 1.0 + + pom + + Maven Integration Test :: MNG-4660 + + This is a test case for a new check which verifies if a packaged artifact + within the Reactor is up-to-date with the outputDirectory of the same project. + + + + UTF-8 + 1.8 + 1.8 + + + + module-b + module-a + + + + + junit + junit + 4.12 + test + + + + diff --git a/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml new file mode 100644 index 0000000000..f6e2caa983 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml @@ -0,0 +1,36 @@ + + + + + + + 4.0.0 + + module-a + + + org.apache.maven.its.mng4660 + parent + 1.0 + + + diff --git a/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/src/main/java/org/apache/maven/it/Example.java b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/src/main/java/org/apache/maven/it/Example.java new file mode 100644 index 0000000000..1608aba21d --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/src/main/java/org/apache/maven/it/Example.java @@ -0,0 +1,24 @@ +package org.apache.maven.it; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +public class Example +{ +} \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml new file mode 100644 index 0000000000..e00e63b5c3 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml @@ -0,0 +1,44 @@ + + + + + + + 4.0.0 + + module-b + + + org.apache.maven.its.mng4660 + parent + 1.0 + + + + + org.apache.maven.its.mng4660 + module-a + 1.0 + + + + diff --git a/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/main/java/org/apache/maven/it/AnotherExample.java b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/main/java/org/apache/maven/it/AnotherExample.java new file mode 100644 index 0000000000..20ab1874a5 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/main/java/org/apache/maven/it/AnotherExample.java @@ -0,0 +1,28 @@ +package org.apache.maven.it; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +public class AnotherExample +{ + public AnotherExample() + { + new Example(); + } +} \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/test/java/org/apache/maven/it/TestCase.java b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/test/java/org/apache/maven/it/TestCase.java new file mode 100644 index 0000000000..932ff51671 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/test/java/org/apache/maven/it/TestCase.java @@ -0,0 +1,34 @@ +package org.apache.maven.it; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.junit.Test; + +import static org.junit.Assert.fail; + +public class TestCase +{ + @Test + public void testCase() + { + final Example example = new Example(); + fail( "Deliberately fail test case" ); + } +} \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml b/its/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml new file mode 100644 index 0000000000..1589fd08d3 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml @@ -0,0 +1,59 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng4660 + parent + 1.0 + + pom + + Maven Integration Test :: MNG-4660 + + Test that the --resume-from flag resolves dependencies inside the same Maven project + without having them installed first. + + + + UTF-8 + 1.8 + 1.8 + + + + module-b + module-a + + + + + junit + junit + 4.12 + test + + + +