diff --git a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
index 4e4388237..936532965 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
@@ -231,6 +231,7 @@ public static Test suite()
suite.addTestSuite( MavenITmng4679SnapshotUpdateInPluginTest.class );
suite.addTestSuite( MavenITmng4677DisabledPluginConfigInheritanceTest.class );
suite.addTestSuite( MavenITmng4666CoreRealmImportTest.class );
+ suite.addTestSuite( MavenITmng4660ResumeFromTest.class );
suite.addTestSuite( MavenITmng4654ArtifactHandlerForMainArtifactTest.class );
suite.addTestSuite( MavenITmng4644StrictPomParsingRejectsMisplacedTextTest.class );
// suite.addTestSuite( MavenITmng4633DualCompilerExecutionsWeaveModeTest.class );
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660ResumeFromTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660ResumeFromTest.java
new file mode 100644
index 000000000..c1cbf660c
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4660ResumeFromTest.java
@@ -0,0 +1,74 @@
+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()
+ {
+ // TODO Update version range once bug has been fixed!
+ super( "[3.6.3,)" );
+ }
+
+ /**
+ * Test that the --resume-from flag resolves dependencies inside the same Maven project
+ * without having them installed first.
+ */
+ public void testIt() 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");
+ 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/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml b/core-it-suite/src/test/resources/mng-4660-resume-from/module-a/pom.xml
new file mode 100644
index 000000000..f6e2caa98
--- /dev/null
+++ b/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/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml b/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/pom.xml
new file mode 100644
index 000000000..e00e63b5c
--- /dev/null
+++ b/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/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/test/java/org/apache/maven/it/TestCase.java b/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 000000000..0fe241b00
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-4660-resume-from/module-b/src/test/java/org/apache/maven/it/TestCase.java
@@ -0,0 +1,33 @@
+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()
+ {
+ fail( "Deliberately fail test case" );
+ }
+}
\ No newline at end of file
diff --git a/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml b/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml
new file mode 100644
index 000000000..5fa0e49fe
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-4660-resume-from/pom.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.its.mng4660
+ parent
+ 1.0
+
+ pom
+
+
+ UTF-8
+ 1.8
+ 1.8
+
+
+
+ module-a
+ module-b
+
+
+
+
+ junit
+ junit
+ 4.4
+ test
+
+
+
+
+
+
+ maven-compiler-plugin
+ 3.8.1
+
+
+
+
+