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 2e6462554..dc5298b20 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
@@ -106,6 +106,7 @@ public static Test suite()
// Tests that don't run stable and need to be fixed
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng7487DeadlockTest.class );
suite.addTestSuite( MavenITmng7470ResolverTransportTest.class );
suite.addTestSuite( MavenITmng7464ReadOnlyMojoParametersWarningTest.class );
suite.addTestSuite( MavenITmng7404IgnorePrefixlessExpressionsTest.class );
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7487DeadlockTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7487DeadlockTest.java
new file mode 100644
index 000000000..59b8c861a
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7487DeadlockTest.java
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+package org.apache.maven.it;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+public class MavenITmng7487DeadlockTest extends AbstractMavenIntegrationTestCase
+{
+ private static final String PROJECT_PATH = "/mng-7487-deadlock";
+
+ public MavenITmng7487DeadlockTest()
+ {
+ super( "(,3.8.4],[3.8.6,)" );
+ }
+
+ public void testDeadlock() throws IOException, VerificationException
+ {
+ final File rootDir = ResourceExtractor.simpleExtractResources( getClass(), PROJECT_PATH );
+
+ final File pluginDir = new File( rootDir, "plugin" );
+ final Verifier pluginVerifier = newVerifier( pluginDir.getAbsolutePath() );
+ pluginVerifier.executeGoal( "install" );
+
+ final File consumerDir = new File( rootDir, "consumer" );
+ final Verifier consumerVerifier = newVerifier( consumerDir.getAbsolutePath() );
+ consumerVerifier.setForkJvm( true );;
+ consumerVerifier.addCliOption( "-T2" );
+ consumerVerifier.executeGoal( "package" );
+ consumerVerifier.verifyErrorFreeLog();
+ consumerVerifier.verifyTextInLog( "BUILD SUCCESS" );
+ }
+
+}
diff --git a/core-it-suite/src/test/resources/bootstrap/group-13/pom.xml b/core-it-suite/src/test/resources/bootstrap/group-13/pom.xml
index 2c3a7322b..8fa4b91f8 100644
--- a/core-it-suite/src/test/resources/bootstrap/group-13/pom.xml
+++ b/core-it-suite/src/test/resources/bootstrap/group-13/pom.xml
@@ -51,7 +51,7 @@ under the License.
org.apache.maven
- maven-core
+ maven-core
3.1.0
diff --git a/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/pom.xml b/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/pom.xml
new file mode 100644
index 000000000..016676166
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/pom.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.its.mng7487
+ consumer
+ 1.0-SNAPSHOT
+
+
+
+
+ org.apache.maven.its.mng7487
+ plugin
+ 1.0-SNAPSHOT
+
+
+ fork
+
+ require-compile-phase
+
+
+
+ aggregate
+
+ aggregator
+
+
+
+
+
+
+
+
+ UTF-8
+ 1.7
+ 1.7
+
+
+
diff --git a/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/src/main/java/com/example/demo/DemoApplication.java b/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/src/main/java/com/example/demo/DemoApplication.java
new file mode 100644
index 000000000..1c209368b
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7487-deadlock/consumer/src/main/java/com/example/demo/DemoApplication.java
@@ -0,0 +1,9 @@
+package com.example.demo;
+
+public class DemoApplication
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello world!" );
+ }
+}
diff --git a/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml b/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml
new file mode 100644
index 000000000..78054e626
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/pom.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.its.mng7487
+ plugin
+ 1.0-SNAPSHOT
+ maven-plugin
+
+
+ 1.7
+ 1.7
+ 3.1.1
+
+
+
+
+ org.apache.maven.plugin-tools
+ maven-plugin-annotations
+ 3.3
+ provided
+
+
+ org.apache.maven
+ maven-plugin-api
+ ${maven-version}
+ provided
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-plugin-plugin
+ 3.3
+
+
+
+
diff --git a/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/src/main/java/testmojo/AggregatorMojo.java b/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/src/main/java/testmojo/AggregatorMojo.java
new file mode 100644
index 000000000..63f509748
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/src/main/java/testmojo/AggregatorMojo.java
@@ -0,0 +1,37 @@
+package testmojo;
+
+/*
+ * 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.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+
+@Mojo( name = "aggregator", requiresProject = true, defaultPhase = LifecyclePhase.COMPILE, aggregator = true )
+public class AggregatorMojo extends AbstractMojo
+{
+ public void execute() throws MojoExecutionException, MojoFailureException
+ {
+ getLog().info( "MNG-7487 plugin aggregator goal executed" );
+ }
+}
diff --git a/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/src/main/java/testmojo/RequiresCompilePhaseMojo.java b/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/src/main/java/testmojo/RequiresCompilePhaseMojo.java
new file mode 100644
index 000000000..291ef7a8a
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7487-deadlock/plugin/src/main/java/testmojo/RequiresCompilePhaseMojo.java
@@ -0,0 +1,38 @@
+package testmojo;
+
+/*
+ * 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.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+
+@Mojo( name = "require-compile-phase", requiresProject = true, defaultPhase = LifecyclePhase.VALIDATE )
+@Execute( phase = LifecyclePhase.TEST_COMPILE )
+public class RequiresCompilePhaseMojo extends AbstractMojo
+{
+ public void execute() throws MojoExecutionException, MojoFailureException
+ {
+ getLog().info( "MNG-7487 plugin require-compile-phase goal executed" );
+ }
+}