You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2018/12/28 13:09:19 UTC

[GitHub] michael-o closed pull request #75: Patch for MNG-5956

michael-o closed pull request #75: Patch for MNG-5956
URL: https://github.com/apache/maven/pull/75
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index a263dca4d6..5f25a998f7 100644
--- a/README.md
+++ b/README.md
@@ -12,12 +12,12 @@ Maven is available under the [Apache License, Version 2.0](http://www.apache.org
 If you want to bootstrap Maven, you'll need:
 
 - Java 1.7+
-- Ant 1.8 or later
+- Maven 3.0.5 or later
 
-Run Ant, specifying a location into which the completed Maven distro should be installed:
+Run Maven, specifying a location into which the completed Maven distro should be installed:
 
 ```
-ant -Dmaven.home="$HOME/apps/maven/apache-maven-3.3.x-SNAPSHOT"
+mvn -DdistributionTargetFolder="$HOME/app/maven/apache-maven-3.4.x-SNAPSHOT" clean package
 ```
 
 Once the build completes, you should have a new Maven distro ready to roll in that directory!
diff --git a/apache-maven/README.txt b/apache-maven/README.txt
index b05080d658..5d3a30a873 100644
--- a/apache-maven/README.txt
+++ b/apache-maven/README.txt
@@ -16,7 +16,7 @@
   Release Notes
   -------------
 
-  The full list of changes can be found at http://maven.apache.org/release-notes.html.
+  The full list of changes can be found at http://maven.apache.org/docs/history.html.
 
   System Requirements
   -------------------
@@ -39,7 +39,7 @@
   Installing Maven
   ----------------
 
-  1) Unpack the archive where you would like to store the binaries, eg:
+  1) Unpack the archive where you would like to store the binaries, e.g.:
 
     Unix-based operating systems (Linux, Solaris and Mac OS X)
       tar zxvf apache-maven-3.x.y.tar.gz
@@ -48,7 +48,7 @@
 
   2) A directory called "apache-maven-3.x.y" will be created.
 
-  3) Add the bin directory to your PATH, eg:
+  3) Add the bin directory to your PATH, e.g.:
 
     Unix-based operating systems (Linux, Solaris and Mac OS X)
       export PATH=/usr/local/apache-maven-3.x.y/bin:$PATH
@@ -69,11 +69,11 @@
   Maven URLS
   ----------
 
-  Home Page:          http://maven.apache.org/
-  Downloads:          http://maven.apache.org/download.html
-  Release Notes:      http://maven.apache.org/release-notes.html
-  Mailing Lists:      http://maven.apache.org/mail-lists.html
-  Source Code:        https://git-wip-us.apache.org/repos/asf/maven.git/apache-maven
-  Issue Tracking:     http://jira.codehaus.org/browse/MNG
+  Home Page:          https://maven.apache.org/
+  Downloads:          https://maven.apache.org/download.html
+  Release Notes:      https://maven.apache.org/docs/history.html
+  Mailing Lists:      https://maven.apache.org/mail-lists.html
+  Source Code:        https://git-wip-us.apache.org/repos/asf/maven.git
+  Issue Tracking:     https://issues.apache.org/jira/browse/MNG
   Wiki:               https://cwiki.apache.org/confluence/display/MAVEN/
-  Available Plugins:  http://maven.apache.org/plugins/index.html
+  Available Plugins:  https://maven.apache.org/plugins/index.html
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index ce3a5ccbf7..2d00468f9d 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>apache-maven</artifactId>
@@ -151,7 +151,7 @@
         <artifactId>maven-assembly-plugin</artifactId>
         <executions>
           <execution>
-            <id>create-distro</id>
+            <id>create-distro-packages</id>
             <phase>package</phase>
             <goals>
               <goal>single</goal>
@@ -181,6 +181,59 @@
   </pluginRepositories>
 
   <profiles>
+    <profile>
+      <id>create-distribution-in-folder</id>
+      <activation>
+        <property>
+          <name>distributionTargetFolder</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>clean</goal>
+                </goals>
+                <id>clean-target-folder</id>
+                <phase>prepare-package</phase>
+                <configuration>
+                  <filesets>
+                    <fileset>
+                      <directory>${distributionTargetFolder}</directory>
+                    </fileset>
+                  </filesets>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>create-distribution-folder</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>single</goal>
+                </goals>
+                <configuration>
+                  <finalName>./</finalName>
+                  <appendAssemblyId>false</appendAssemblyId>
+                  <attach>false</attach>
+                  <outputDirectory>${distributionTargetFolder}</outputDirectory>
+                  <descriptors>
+                    <descriptor>src/main/assembly/dir.xml</descriptor>
+                  </descriptors>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
     <profile>
       <id>apache-release</id>
       <build>
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 6875628599..c815839c02 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -183,6 +183,7 @@ if [ -z "$JAVA_HOME" ] ; then
 fi
 
 CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+CLASSWORLDS_JAR=`echo "${M2_HOME}"/boot/plexus-classworlds-*.jar`
 
 # For Cygwin, switch paths to Windows format before running java
 if $cygwin; then
@@ -192,34 +193,36 @@ if $cygwin; then
     JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
   [ -n "$CLASSPATH" ] &&
     CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$CLASSWORLDS_JAR" ] &&
+    CLASSWORLDS_JAR=`cygpath --path --windows "$CLASSWORLDS_JAR"`
 fi
 
 # traverses directory structure from process work directory to filesystem root
 # first directory with .mvn subdirectory is considered project base directory
 find_maven_basedir() {
-  local basedir
-  local wdir
-  basedir="$(pwd)"
-  wdir="$(pwd)"
+(
+  basedir="`pwd`"
+  wdir="`pwd`"
   while [ "$wdir" != '/' ] ; do
     if [ -d "$wdir"/.mvn ] ; then
       basedir=$wdir
       break
     fi
-    wdir="$(cd "$wdir/.."; pwd)"
+    wdir="`cd "$wdir/.."; pwd`"
   done
   echo "${basedir}"
+)
 }
 
 # concatenates all lines of a file
 concat_lines() {
   if [ -f "$1" ]; then
-    echo "$(tr -s '\n' ' ' < "$1")"
+    echo "`tr -s '\n' ' ' < "$1"`"
   fi
 }
 
-MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-$(find_maven_basedir)}"
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-`find_maven_basedir`}"
+MAVEN_OPTS="`concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config"` $MAVEN_OPTS"
 
 # For Cygwin, switch project base directory path to Windows format before
 # executing Maven. Otherwise this will cause Maven not to consider it.
@@ -238,7 +241,7 @@ export MAVEN_CMD_LINE_ARGS
 exec "$JAVACMD" \
   $MAVEN_OPTS \
   $MAVEN_DEBUG_OPTS \
-  -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
+  -classpath "${CLASSWORLDS_JAR}" \
   "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
   "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
   ${CLASSWORLDS_LAUNCHER} "$@"
diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug
index a1077ce5da..caf0b45257 100755
--- a/apache-maven/src/bin/mvnDebug
+++ b/apache-maven/src/bin/mvnDebug
@@ -38,4 +38,4 @@ MAVEN_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,addre
 
 echo Preparing to Execute Maven in Debug Mode
 
-env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" $(dirname $0)/mvn "$@"
+env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" "`dirname "$0"`/mvn" "$@"
diff --git a/apache-maven/src/bin/mvnyjp b/apache-maven/src/bin/mvnyjp
index ef4f8e1d01..3ddec42e9f 100755
--- a/apache-maven/src/bin/mvnyjp
+++ b/apache-maven/src/bin/mvnyjp
@@ -39,4 +39,4 @@ if [ ! -f "$YJPLIB" ]; then
   exit 1
 fi
 
-env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" $(dirname $0)/mvn "$@"
+env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" "`dirname "$0"`/mvn" "$@"
diff --git a/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
index 1a46225254..390fa42530 100644
--- a/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
+++ b/apache-maven/src/main/appended-resources/META-INF/LICENSE.vm
@@ -16,8 +16,6 @@
 ## specific language governing permissions and limitations
 ## under the License.
 ##
-## $Date: 2008-03-09 23:17:06 -0700 (Sun, 09 Mar 2008) $ $Rev: 635446 $
-##
 
 Apache Maven includes a number of components and libraries with separate 
 copyright notices and license terms. Your use of those components are 
diff --git a/apache-maven/src/main/assembly/bin.xml b/apache-maven/src/main/assembly/bin.xml
index ea14a9d8dc..79723c2a78 100644
--- a/apache-maven/src/main/assembly/bin.xml
+++ b/apache-maven/src/main/assembly/bin.xml
@@ -17,78 +17,14 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<assembly>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
   <id>bin</id>
   <formats>
     <format>zip</format>
     <format>tar.gz</format>
   </formats>
-  <dependencySets>
-    <dependencySet>
-      <useProjectArtifact>false</useProjectArtifact>
-      <outputDirectory>boot</outputDirectory>
-      <includes>
-        <include>org.codehaus.plexus:plexus-classworlds</include>
-      </includes>
-    </dependencySet>
-    <dependencySet>
-      <useProjectArtifact>false</useProjectArtifact>
-      <outputDirectory>lib</outputDirectory>
-      <excludes>
-        <exclude>org.codehaus.plexus:plexus-classworlds</exclude>
-      </excludes>
-    </dependencySet>
-  </dependencySets>
-  <fileSets>
-    <fileSet>
-      <includes>
-        <include>README*</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>target/maven-shared-archive-resources/META-INF</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>LICENSE</include>
-        <include>NOTICE</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>target/licenses/lib</directory>
-      <outputDirectory>lib</outputDirectory>
-      <includes>
-        <include>**</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>src/bin</directory>
-      <outputDirectory>bin</outputDirectory>
-      <includes>
-        <include>*.cmd</include>
-        <include>*.conf</include>
-      </includes>
-      <lineEnding>dos</lineEnding>
-    </fileSet>
-    <fileSet>
-      <directory>src/bin</directory>
-      <outputDirectory>bin</outputDirectory>
-      <includes>
-        <include>m2</include>
-        <include>mvn</include>
-        <include>mvnDebug</include>
-        <!-- This is so that CI systems can periodically run the profiler -->
-        <include>mvnyjp</include>
-      </includes>
-      <lineEnding>unix</lineEnding>
-      <fileMode>0755</fileMode>
-    </fileSet>
-    <fileSet>
-      <directory>src/conf</directory>
-      <outputDirectory>conf</outputDirectory>
-    </fileSet>
-    <fileSet>
-      <directory>src/lib</directory>
-      <outputDirectory>lib</outputDirectory>
-    </fileSet>
-  </fileSets>
+  <componentDescriptors>
+    <componentDescriptor>src/main/assembly/component.xml</componentDescriptor>
+  </componentDescriptors>
 </assembly>
diff --git a/apache-maven/src/main/assembly/component.xml b/apache-maven/src/main/assembly/component.xml
new file mode 100644
index 0000000000..36b2232428
--- /dev/null
+++ b/apache-maven/src/main/assembly/component.xml
@@ -0,0 +1,89 @@
+<!--
+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.
+-->
+<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3 http://maven.apache.org/xsd/component-1.1.3.xsd">
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <outputDirectory>boot</outputDirectory>
+      <includes>
+        <include>org.codehaus.plexus:plexus-classworlds</include>
+      </includes>
+    </dependencySet>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <outputDirectory>lib</outputDirectory>
+      <excludes>
+        <exclude>org.codehaus.plexus:plexus-classworlds</exclude>
+      </excludes>
+    </dependencySet>
+  </dependencySets>
+  <fileSets>
+    <fileSet>
+      <includes>
+        <include>README*</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target/maven-shared-archive-resources/META-INF</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>LICENSE</include>
+        <include>NOTICE</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target/licenses/lib</directory>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+        <include>**</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>src/bin</directory>
+      <outputDirectory>bin</outputDirectory>
+      <includes>
+        <include>*.cmd</include>
+        <include>*.conf</include>
+      </includes>
+      <lineEnding>dos</lineEnding>
+    </fileSet>
+    <fileSet>
+      <directory>src/bin</directory>
+      <outputDirectory>bin</outputDirectory>
+      <includes>
+        <include>m2</include>
+        <include>mvn</include>
+        <include>mvnDebug</include>
+        <!-- This is so that CI systems can periodically run the profiler -->
+        <include>mvnyjp</include>
+      </includes>
+      <lineEnding>unix</lineEnding>
+      <fileMode>0755</fileMode>
+    </fileSet>
+    <fileSet>
+      <directory>src/conf</directory>
+      <outputDirectory>conf</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>src/lib</directory>
+      <outputDirectory>lib</outputDirectory>
+    </fileSet>
+  </fileSets>
+</component>
diff --git a/apache-maven/src/main/assembly/dir.xml b/apache-maven/src/main/assembly/dir.xml
new file mode 100644
index 0000000000..885a63e106
--- /dev/null
+++ b/apache-maven/src/main/assembly/dir.xml
@@ -0,0 +1,29 @@
+<!--
+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.
+-->
+
+<assembly>
+  <id>dir</id>
+  <formats>
+    <format>dir</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <componentDescriptors>
+    <componentDescriptor>src/main/assembly/component.xml</componentDescriptor>
+  </componentDescriptors>
+</assembly>
diff --git a/apache-maven/src/main/assembly/src.xml b/apache-maven/src/main/assembly/src.xml
index 3bf10e052c..fb0aee8153 100644
--- a/apache-maven/src/main/assembly/src.xml
+++ b/apache-maven/src/main/assembly/src.xml
@@ -17,7 +17,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<assembly>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
   <id>src</id>
   <formats>
     <format>zip</format>
diff --git a/build.xml b/build.xml
deleted file mode 100644
index ccfca3bf8d..0000000000
--- a/build.xml
+++ /dev/null
@@ -1,307 +0,0 @@
-<!--
-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.
--->
-
-<!-- START SNIPPET: ant-bootstrap
-
-By default the bootstrap will use ~/.m2/repository as the integration repository but you can define the integration
-repository by specifying a property on the command line:
-
-ant -Dmaven.repo.local=/my/integration/repository
-
-Those familiar with Maven will note this is the same way the local repository can be set from the command-line.
-This facilitates having a set of builds converge on the same repository for integration purposes.
-
-END SNIPPET: ant-bootstrap -->
-
-<project default="all" basedir="." xmlns:artifact="urn:maven-artifact-ant">
-
-  <property name="distributionDirectory" value="apache-maven"/>
-  <property name="distributionId" value="apache-maven"/>
-  <property name="distributionShortName" value="Maven"/>
-  <property name="distributionName" value="Apache Maven"/>
-  <property name="it.workdir.version" value="3.0.x" />
-  <property name="maven-compile.jvmargs" value="-Xmx512m -Xms512m"/>
-  <property name="maven-compile.fork" value="true"/>
-  <property name="maven-compile.maxmemory" value="512m"/>
-
-  <target name="initTaskDefs">
-    <echo>Building ${distributionName} ...</echo>
-    <xmlproperty file="pom.xml" prefix="xmlPom" />
-    <path id="maven-ant-tasks.classpath" path="maven-ant-tasks-2.1.1.jar" />
-    <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
-  </target>
-
-  <target name="isMavenHomeSet" depends="initTaskDefs">
-    <property environment="env" />
-    <condition property="maven.home" value="${env.M2_HOME}">
-      <isset property="env.M2_HOME" />
-    </condition>
-    <fail message="You must set the M2_HOME environment variable or specify a maven.home property to this Ant script">
-      <condition>
-        <or>
-          <not>
-            <isset property="maven.home" />
-          </not>
-          <equals arg1="${maven.home}" arg2="" trim="true" />
-        </or>
-      </condition>
-    </fail>
-    <available property="maven.home.exists" file="${maven.home}" />
-  </target>
-
-  <target name="prompt-maven-home-exists" depends="isMavenHomeSet" if="maven.home.exists">
-    <input addproperty="maven.home.exists.continue" validargs="yes,no" defaultvalue="no">WARNING:
-The specified target directory
-  ${maven.home}
-already exists. It will be deleted and overwritten by the build.
-Do you want to continue?</input>
-    <fail message="Build was aborted by user">
-      <condition>
-        <equals arg1="${maven.home.exists.continue}" arg2="no" trim="true" casesensitive="false" />
-      </condition>
-    </fail>
-  </target>
-
-  <target name="init" depends="isMavenHomeSet">
-    <!-- Initialize properties -->
-    <property name="maven.home.basename.expected" value="${distributionId}-${xmlPom.project.version}" />
-    <property name="maven.assembly" location="${distributionDirectory}/target/${maven.home.basename.expected}-bin.zip" />
-    <property name="maven.repo.local" value="${user.home}/.m2/repository" />
-    <property name="maven.debug" value="-e" />
-    <property name="maven.test.skip" value="false" />
-    <property name="skipTests" value="false" />
-    <property name="surefire.useFile" value="true" />
-    <property name="maven.test.redirectTestOutputToFile" value="${surefire.useFile}" />
-    <property name="maven.goal" value="install" />
-    <echo>maven.home = ${maven.home}</echo>
-    <echo>maven.repo.local = ${maven.repo.local}</echo>
-    <echo>distributionId = ${distributionId}</echo>
-    <echo>distributionName = ${distributionName}</echo>
-    <echo>distributionDirectory = ${distributionDirectory}</echo>
-  </target>
-
-  <target name="clean-bootstrap" description="cleans up generated bootstrap classes">
-    <delete dir="bootstrap" />
-  </target>
-
-  <target name="pull" depends="init" unless="skip.pull">
-    <!-- Pull the dependencies that Maven needs to build -->
-    <copy file="pom.xml" tofile="dependencies.xml" />
-    <replace file="${basedir}/dependencies.xml" token="&lt;!--bootstrap-start-comment--&gt;" value="&lt;!--" />
-    <replace file="${basedir}/dependencies.xml" token="&lt;!--bootstrap-end-comment--&gt;" value="--&gt;" />
-    <artifact:pom file="${basedir}/dependencies.xml" id="pom">
-      <localRepository path="${maven.repo.local}" />
-    </artifact:pom>
-    <artifact:dependencies pathId="pom.pathid" filesetId="pom.fileset" useScope="compile">
-      <localRepository path="${maven.repo.local}" />
-      <pom refid="pom" />
-    </artifact:dependencies>
-    <delete file="${basedir}/dependencies.xml" />
-
-    <!-- Pull the dependencies for Modello -->
-    <artifact:dependencies pathId="modello.pathid" filesetId="modello.fileset">
-      <localRepository path="${maven.repo.local}" />
-      <dependency groupId="org.codehaus.modello" artifactId="modello-maven-plugin" version="${pom.properties.modelloVersion}" />
-    </artifact:dependencies>
-
-    <!-- Pull the dependencies for the MetadataGenerator CLI -->
-    <artifact:dependencies pathId="pmdg.pathid" filesetId="pmdg.fileset">
-      <localRepository path="${maven.repo.local}" />
-      <dependency groupId="org.codehaus.plexus" artifactId="plexus-component-metadata" version="${pom.properties.plexusVersion}" />
-    </artifact:dependencies>
-
-  </target>
-
-  <target name="process-classes" depends="pull" description="generates plexus component metadata.">
-    <mkdir dir="${basedir}/bootstrap/target" />
-    <mkdir dir="${basedir}/bootstrap/target/classes" />
-
-    <path id="pmdg.classpath">
-      <path refid="maven.classpath" />
-      <path refid="pmdg.pathid" />
-    </path>
-
-    <echo>Using plexus version ${pom.properties.plexusVersion}</echo>
-    <java fork="true" classname="org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" failonerror="true">
-      <classpath refid="pmdg.classpath" />
-      <!-- We need to generate component descriptors from the maven-artifact sources which use javadoc annotations. -->
-      <arg value="--source" />
-      <arg value="${basedir}/maven-compat/src/main/java" />
-      <!-- We have separated the artifact handlers and lifecycle mappings into a separate file. -->
-      <arg value="--descriptors" />
-      <arg value="${basedir}/maven-core/src/main/resources/META-INF/plexus" />
-      <!-- Search the classes for annotations that we've compiled. -->
-      <arg value="--classes" />
-      <arg value="${basedir}/bootstrap/target/classes" />
-      <!-- We'll make one big fat components descriptor. -->
-      <arg value="--output" />
-      <arg value="${basedir}/bootstrap/target/classes/META-INF/plexus/components.xml" />
-    </java>
-  </target>
-
-  <target name="generate-sources" depends="pull" description="generates Java sources from Modello mdo model files">
-    <mkdir dir="bootstrap/target" />
-    <mkdir dir="bootstrap/target/generated-sources" />
-
-    <macrodef name="modello-single-mode">
-      <attribute name="file" />
-      <attribute name="mode" />
-      <attribute name="version" />
-      <sequential>
-        <java fork="true" classname="org.codehaus.modello.ModelloCli" failonerror="true">
-          <classpath refid="modello.pathid" />
-          <arg file="@{file}" />
-          <!-- model file -->
-          <arg value="@{mode}" />
-          <!-- output type -->
-          <arg file="bootstrap/target/generated-sources" />
-          <!-- output directory -->
-          <arg value="@{version}" />
-          <!-- model version -->
-          <arg value="false" />
-          <!-- package with version -->
-          <arg value="true" />
-          <!-- use Java 5 -->
-          <arg value="UTF-8" />
-          <!-- encoding -->
-        </java>
-      </sequential>
-    </macrodef>
-
-    <macrodef name="modello">
-      <attribute name="file" />
-      <attribute name="version" default="1.0.0" />
-      <sequential>
-        <echo taskname="modello" message="Generating sources for @{file}" />
-        <modello-single-mode file="@{file}" version="@{version}" mode="java" />
-        <modello-single-mode file="@{file}" version="@{version}" mode="xpp3-reader" />
-        <modello-single-mode file="@{file}" version="@{version}" mode="xpp3-writer" />
-      </sequential>
-    </macrodef>
-
-    <macrodef name="modello-ex">
-      <attribute name="file" />
-      <attribute name="version" default="1.0.0" />
-      <sequential>
-        <modello file="@{file}" version="@{version}" />
-        <modello-single-mode file="@{file}" version="@{version}" mode="xpp3-extended-reader" />
-      </sequential>
-    </macrodef>
-
-    <modello-ex file="maven-model/src/main/mdo/maven.mdo" version="4.0.0" />
-    <modello file="maven-plugin-api/src/main/mdo/lifecycle.mdo" />
-    <modello file="maven-model-builder/src/main/mdo/profiles.mdo" />
-    <modello file="maven-settings/src/main/mdo/settings.mdo" version="1.1.0" />
-    <modello file="maven-core/src/main/mdo/toolchains.mdo" version="1.1.0" />
-    <modello file="maven-repository-metadata/src/main/mdo/metadata.mdo" version="1.1.0" />
-    <modello file="maven-compat/src/main/mdo/profiles.mdo" />
-    <modello file="maven-compat/src/main/mdo/paramdoc.mdo" />
-    <modello file="maven-embedder/src/main/mdo/core-extensions.mdo" />
-  </target>
-
-  <target name="compile-boot" depends="generate-sources" description="compiles the bootstrap sources">
-    <path id="sources">
-      <dirset dir=".">
-        <include name="bootstrap/target/generated-sources" />
-        <include name="*/src/main/java" />
-      </dirset>
-    </path>
-
-    <mkdir dir="bootstrap/target/classes" />
-    <javac destdir="bootstrap/target/classes" encoding="UTF-8" source="1.7" target="1.7" debug="true" includeAntRuntime="false">
-      <src refid="sources" />
-      <classpath refid="pom.pathid" />
-    </javac>
-
-    <copy todir="bootstrap/target/classes" encoding="ISO-8859-1">
-      <fileset dir="maven-core/src/main/resources">
-        <include name="**/build.properties" />
-      </fileset>
-      <filterset begintoken="${" endtoken="}">
-        <filter token="project.version" value="${xmlPom.project.version}"/>
-      </filterset>
-    </copy>
-    <echo file="bootstrap/target/classes/META-INF/maven/org.apache.maven/maven-core/pom.properties" encoding="ISO-8859-1">
-      version = ${xmlPom.project.version}
-    </echo>
-
-    <path id="maven.classpath">
-      <pathelement location="bootstrap/target/classes" />
-      <dirset dir=".">
-        <include name="*/src/main/resources" />
-      </dirset>
-      <path refid="pom.pathid" />
-    </path>
-  </target>
-
-  <target name="maven-compile" depends="compile-boot,process-classes" description="compiles Maven using the bootstrap Maven, skipping automated tests">
-    <java fork="${maven-compile.fork}" classname="org.apache.maven.cli.MavenCli" failonerror="true" timeout="600000"  maxmemory="${maven-compile.maxmemory}">
-      <!--jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/-->
-      <!--jvmarg value="${maven-compile.jvmargs}"/-->
-      <classpath refid="maven.classpath" />
-      <arg value="${maven.debug}" />
-      <arg value="-B" />
-      <arg value="-V" />
-      <arg value="clean" />
-      <arg value="${maven.goal}" />
-      <arg value="-Dmaven.test.skip=${maven.test.skip}" />
-      <arg value="-DskipTests=${skipTests}" />
-      <arg value="-Dmaven.repo.local=${maven.repo.local}" />
-      <arg value="-Dsurefire.useFile=${surefire.useFile}" />
-      <arg value="-Dmaven.test.redirectTestOutputToFile=${maven.test.redirectTestOutputToFile}" />
-      <arg value="-DdistributionId=${distributionId}" />
-      <arg value="-DdistributionShortName=${distributionShortName}" />
-      <arg value="-DdistributionName=${distributionName}" />
-      <jvmarg value="-Dmaven.multiModuleProjectDirectory=${basedir}" />
-    </java>
-  </target>
-
-  <target name="maven-assembly" depends="maven-compile" description="generates the Maven installation assembly using the bootstrap Maven">
-    <echo>
-The new Maven distribution was created as part of the MAVEN-COMPILE step, above.
-This goal just validates the presence of that distribution.
-</echo>
-    <condition property="build.failed">
-      <not>
-        <available file="${maven.assembly}" />
-      </not>
-    </condition>
-    <fail if="build.failed" message="Assembly task seemed to succeed, but couldn't find assembly file: ${maven.assembly}" />
-  </target>
-
-  <target name="extract-assembly" depends="init,prompt-maven-home-exists,maven-assembly" description="extracts the maven assembly into maven.home">
-    <echo>Extracting assembly to ${maven.home} ...</echo>
-    <!-- If we are starting from scratch make sure the directory is created -->
-    <delete dir="${maven.home}" />
-    <mkdir dir="${maven.home}" />
-    <unzip src="${maven.assembly}" dest="${maven.home}">
-      <mapper type="regexp" from="^[^\\/]+[\\/](.*)$$" to="\1" />
-    </unzip>
-    <chmod perm="+x">
-      <fileset dir="${maven.home}/bin">
-        <include name="mvn" />
-        <include name="mvnDebug" />
-        <include name="mvnyjp" />
-      </fileset>
-    </chmod>
-  </target>
-
-  <target name="all" depends="clean-bootstrap,init,extract-assembly" />
-
-</project>
diff --git a/doap_Maven.rdf b/doap_Maven.rdf
index a50b68f334..88bf82af25 100644
--- a/doap_Maven.rdf
+++ b/doap_Maven.rdf
@@ -33,6 +33,17 @@ under the License.
     <release>
       <Version>
         <name>Latest stable release</name>
+        <created>2015-11-14</created>
+        <revision>3.3.9</revision>
+        <file-release>http://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip</file-release>
+        <file-release>http://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz</file-release>
+        <file-release>http://archive.apache.org/dist/maven/maven-3/3.3.9/source/apache-maven-3.3.9-src.zip</file-release>
+        <file-release>http://archive.apache.org/dist/maven/maven-3/3.3.9/source/apache-maven-3.3.9-src.tar.gz</file-release>
+      </Version>
+    </release>
+    <release>
+      <Version>
+        <name>Apache Maven 3.3.3</name>
         <created>2015-04-28</created>
         <revision>3.3.3</revision>
         <file-release>http://archive.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.zip</file-release>
diff --git a/maven-aether-provider/pom.xml b/maven-aether-provider/pom.xml
index 93e93e92ef..d851edba37 100644
--- a/maven-aether-provider/pom.xml
+++ b/maven-aether-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-aether-provider</artifactId>
diff --git a/maven-ant-tasks-2.1.1.jar b/maven-ant-tasks-2.1.1.jar
deleted file mode 100644
index 7810a541b8..0000000000
Binary files a/maven-ant-tasks-2.1.1.jar and /dev/null differ
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index 97fb70ac61..c8a63b7996 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-artifact</artifactId>
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
index 147e88e4ae..675f1d94dd 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
@@ -272,7 +272,7 @@ public void addMetadata( ArtifactMetadata metadata )
             return Collections.emptyList();
         }
 
-        return metadataMap.values();
+        return Collections.unmodifiableCollection( metadataMap.values() );
     }
 
     // ----------------------------------------------------------------------
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
index e7d24c43fa..f434ef0693 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
@@ -33,7 +33,7 @@
  *
  * <p>Features:
  * <ul>
- * <li>mixing of '<code>-</code>' (dash) and '<code>.</code>' (dot) separators,</li>
+ * <li>mixing of '<code>-</code>' (hyphen) and '<code>.</code>' (dot) separators,</li>
  * <li>transition between characters and digits also constitutes a separator:
  *     <code>1.0alpha1 =&gt; [1, 0, alpha, 1]</code></li>
  * <li>unlimited number of version components,</li>
@@ -50,7 +50,7 @@
  *     </ul>
  *     Unknown qualifiers are considered after known qualifiers, with lexical order (always case insensitive),
  *   </li>
- * <li>a dash usually precedes a qualifier, and is always less important than something preceded with a dot.</li>
+ * <li>a hyphen usually precedes a qualifier, and is always less important than something preceded with a dot.</li>
  * </ul></p>
  *
  * @see <a href="https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning">"Versioning" on Maven Wiki</a>
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
index 0d094ef8a4..7ee854fa7a 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
@@ -261,7 +261,7 @@ public VersionRange restrict( VersionRange restriction )
         }
         else
         {
-            restrictions = intersection( r1, r2 );
+            restrictions = Collections.unmodifiableList( intersection( r1, r2 ) );
         }
 
         ArtifactVersion version = null;
diff --git a/maven-builder-support/pom.xml b/maven-builder-support/pom.xml
index 904aa93935..90fa43b58e 100644
--- a/maven-builder-support/pom.xml
+++ b/maven-builder-support/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-builder-support</artifactId>
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index 05f28bdcda..0c219c10c9 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-compat</artifactId>
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java
index e0a55879ea..34d4222d6a 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java
@@ -256,7 +256,7 @@ public void setMirroredRepositories( List<ArtifactRepository> mirroredRepositori
     {
         if ( mirroredRepositories != null )
         {
-            this.mirroredRepositories = mirroredRepositories;
+            this.mirroredRepositories = Collections.unmodifiableList( mirroredRepositories );
         }
         else
         {
diff --git a/maven-compat/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-compat/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
index 7bc5a5c3a4..6834a174b8 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
@@ -101,6 +101,7 @@ private ProjectBuildingRequest toRequest( ProjectBuilderConfiguration configurat
                 {
                     request.setActiveProfileIds( req.getActiveProfiles() );
                     request.setInactiveProfileIds( req.getInactiveProfiles() );
+                    request.setGoals( request.getGoals() );
                 }
             }
         }
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
index cfdd7f96fc..bc42637f49 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
@@ -118,7 +118,10 @@ public boolean hasMissingArtifacts()
 
     public List<Artifact> getMissingArtifacts()
     {
-        return missingArtifacts == null ? Collections.<Artifact> emptyList() : missingArtifacts;
+        return missingArtifacts == null
+                   ? Collections.<Artifact>emptyList()
+                   : Collections.unmodifiableList( missingArtifacts );
+
     }
 
     public MetadataResolutionResult addMissingArtifact( Artifact artifact )
@@ -148,7 +151,10 @@ public boolean hasExceptions()
 
     public List<Exception> getExceptions()
     {
-        return exceptions == null ? Collections.<Exception> emptyList() : exceptions;
+        return exceptions == null
+                   ? Collections.<Exception>emptyList()
+                   : Collections.unmodifiableList( exceptions );
+
     }
 
     // ------------------------------------------------------------------------
@@ -185,7 +191,10 @@ public OverConstrainedVersionException getVersionRangeViolation( int i )
 
     public List<Exception> getVersionRangeViolations()
     {
-        return versionRangeViolations == null ? Collections.<Exception> emptyList() : versionRangeViolations;
+        return versionRangeViolations == null
+                   ? Collections.<Exception>emptyList()
+                   : Collections.unmodifiableList( versionRangeViolations );
+
     }
 
     // ------------------------------------------------------------------------
@@ -217,8 +226,10 @@ public ArtifactResolutionException getMetadataResolutionException( int i )
 
     public List<ArtifactResolutionException> getMetadataResolutionExceptions()
     {
-        return metadataResolutionExceptions == null ? Collections.<ArtifactResolutionException> emptyList()
-                        : metadataResolutionExceptions;
+        return metadataResolutionExceptions == null
+                   ? Collections.<ArtifactResolutionException>emptyList()
+                   : Collections.unmodifiableList( metadataResolutionExceptions );
+
     }
 
     // ------------------------------------------------------------------------
@@ -246,7 +257,7 @@ public MetadataResolutionResult addError( Exception e )
             return Collections.emptyList();
         }
 
-        return errorArtifactExceptions;
+        return Collections.unmodifiableList( errorArtifactExceptions );
     }
 
     // ------------------------------------------------------------------------
@@ -283,7 +294,7 @@ public CyclicDependencyException getCircularDependencyException( int i )
             return Collections.emptyList();
         }
 
-        return circularDependencyExceptions;
+        return Collections.unmodifiableList( circularDependencyExceptions );
     }
 
     // ------------------------------------------------------------------------
@@ -297,7 +308,7 @@ public CyclicDependencyException getCircularDependencyException( int i )
             return Collections.emptyList();
         }
 
-        return repositories;
+        return Collections.unmodifiableList( repositories );
     }
 
     public MetadataResolutionResult setRepositories( final List<ArtifactRepository> repositories )
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java
index dfc463b519..4839d689b7 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java
@@ -28,15 +28,12 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.IOUtil;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.RandomAccessFile;
-import java.nio.ByteBuffer;
+import java.nio.channels.Channels;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
 import java.util.Date;
@@ -242,18 +239,12 @@ private void writeLastUpdated( File touchfile, String key, String error )
                 Properties props = new Properties();
 
                 channel = new RandomAccessFile( touchfile, "rw" ).getChannel();
-                lock = channel.lock( 0, channel.size(), false );
+                lock = channel.lock();
 
                 if ( touchfile.canRead() )
                 {
                     getLogger().debug( "Reading resolution-state from: " + touchfile );
-                    ByteBuffer buffer = ByteBuffer.allocate( (int) channel.size() );
-
-                    channel.read( buffer );
-                    buffer.flip();
-
-                    ByteArrayInputStream stream = new ByteArrayInputStream( buffer.array() );
-                    props.load( stream );
+                    props.load( Channels.newInputStream( channel ) );
                 }
 
                 props.setProperty( key, Long.toString( System.currentTimeMillis() ) );
@@ -267,18 +258,15 @@ private void writeLastUpdated( File touchfile, String key, String error )
                     props.remove( key + ERROR_KEY_SUFFIX );
                 }
 
-                ByteArrayOutputStream stream = new ByteArrayOutputStream();
-
                 getLogger().debug( "Writing resolution-state to: " + touchfile );
-                props.store( stream, "Last modified on: " + new Date() );
+                channel.truncate( 0 );
+                props.store( Channels.newOutputStream( channel ), "Last modified on: " + new Date() );
 
-                byte[] data = stream.toByteArray();
-                ByteBuffer buffer = ByteBuffer.allocate( data.length );
-                buffer.put( data );
-                buffer.flip();
+                lock.release();
+                lock = null;
 
-                channel.position( 0 );
-                channel.write( buffer );
+                channel.close();
+                channel = null;
             }
             catch ( IOException e )
             {
@@ -359,27 +347,26 @@ private Properties read( File touchfile )
 
         synchronized ( touchfile.getAbsolutePath().intern() )
         {
+            FileInputStream in = null;
             FileLock lock = null;
-            FileChannel channel = null;
+
             try
             {
                 Properties props = new Properties();
 
-                FileInputStream stream = new FileInputStream( touchfile );
-                try
-                {
-                    channel = stream.getChannel();
-                    lock = channel.lock( 0, channel.size(), true );
+                in = new FileInputStream( touchfile );
+                lock = in.getChannel().lock( 0, Long.MAX_VALUE, true );
 
-                    getLogger().debug( "Reading resolution-state from: " + touchfile );
-                    props.load( stream );
+                getLogger().debug( "Reading resolution-state from: " + touchfile );
+                props.load( in );
 
-                    return props;
-                }
-                finally
-                {
-                    IOUtil.close( stream );
-                }
+                lock.release();
+                lock = null;
+
+                in.close();
+                in = null;
+
+                return props;
             }
             catch ( IOException e )
             {
@@ -402,11 +389,11 @@ private Properties read( File touchfile )
                     }
                 }
 
-                if ( channel != null )
+                if ( in != null )
                 {
                     try
                     {
-                        channel.close();
+                        in.close();
                     }
                     catch ( IOException e )
                     {
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
index 866968ba9d..ba3409649b 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
@@ -144,6 +144,9 @@ public Artifact createDependencyArtifact( Dependency d )
         }
         catch ( InvalidVersionSpecificationException e )
         {
+            // MNG-5368: Log a message instead of returning 'null' silently.
+            this.logger.error( String.format( "Invalid version specification '%s' creating dependency artifact '%s'.",
+                                              d.getVersion(), d ), e );
             return null;
         }
 
@@ -180,6 +183,11 @@ public Artifact createExtensionArtifact( String groupId, String artifactId, Stri
         }
         catch ( InvalidVersionSpecificationException e )
         {
+            // MNG-5368: Log a message instead of returning 'null' silently.
+            this.logger.error( String.format(
+                "Invalid version specification '%s' creating extension artifact '%s:%s:%s'.",
+                version, groupId, artifactId, version, e ) );
+
             return null;
         }
 
@@ -193,18 +201,24 @@ public Artifact createParentArtifact( String groupId, String artifactId, String
 
     public Artifact createPluginArtifact( Plugin plugin )
     {
+        String version = plugin.getVersion();
+        if ( StringUtils.isEmpty( version ) )
+        {
+            version = "RELEASE";
+        }
+
         VersionRange versionRange;
         try
         {
-            String version = plugin.getVersion();
-            if ( StringUtils.isEmpty( version ) )
-            {
-                version = "RELEASE";
-            }
             versionRange = VersionRange.createFromVersionSpec( version );
         }
         catch ( InvalidVersionSpecificationException e )
         {
+            // MNG-5368: Log a message instead of returning 'null' silently.
+            this.logger.error( String.format(
+                "Invalid version specification '%s' creating plugin artifact '%s'.",
+                version, plugin, e ) );
+
             return null;
         }
 
diff --git a/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java b/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java
index 672e07b35e..ead01574b0 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/EmptyLifecyclePluginAnalyzer.java
@@ -24,6 +24,7 @@
 import java.util.Set;
 
 import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer;
+import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginExecution;
 
@@ -33,6 +34,7 @@
 public class EmptyLifecyclePluginAnalyzer
     implements LifeCyclePluginAnalyzer
 {
+
     public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
     {
         Set<Plugin> plugins;
@@ -57,6 +59,12 @@
         return plugins;
     }
 
+    @Override
+    public Set<Plugin> getDefaultBuildPlugins( final Model model, final Set<String> goals )
+    {
+        return Collections.emptySet();
+    }
+
     private Plugin newPlugin( String artifactId, String... goals )
     {
         Plugin plugin = new Plugin();
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 199d15d164..22a3e4e220 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-core</artifactId>
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
index 8e45b20305..59a9ba54a1 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
@@ -401,7 +401,7 @@ public void setMirroredRepositories( List<ArtifactRepository> mirroredRepositori
     {
         if ( mirroredRepositories != null )
         {
-            this.mirroredRepositories = mirroredRepositories;
+            this.mirroredRepositories = Collections.unmodifiableList( mirroredRepositories );
         }
         else
         {
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
index 7795dec620..8ce418a7b9 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
@@ -125,7 +125,10 @@ public boolean hasMissingArtifacts()
 
     public List<Artifact> getMissingArtifacts()
     {
-        return missingArtifacts == null ? Collections.<Artifact>emptyList() : missingArtifacts;
+        return missingArtifacts == null
+                   ? Collections.<Artifact>emptyList()
+                   : Collections.unmodifiableList( missingArtifacts );
+
     }
 
     public ArtifactResolutionResult addMissingArtifact( Artifact artifact )
@@ -160,7 +163,10 @@ public boolean hasExceptions()
 
     public List<Exception> getExceptions()
     {
-        return exceptions == null ? Collections.<Exception>emptyList() : exceptions;
+        return exceptions == null
+                   ? Collections.<Exception>emptyList()
+                   : Collections.unmodifiableList( exceptions );
+
     }
 
     // ------------------------------------------------------------------------
@@ -197,7 +203,10 @@ public OverConstrainedVersionException getVersionRangeViolation( int i )
 
     public List<Exception> getVersionRangeViolations()
     {
-        return versionRangeViolations == null ? Collections.<Exception>emptyList() : versionRangeViolations;
+        return versionRangeViolations == null
+                   ? Collections.<Exception>emptyList()
+                   : Collections.unmodifiableList( versionRangeViolations );
+
     }
 
     // ------------------------------------------------------------------------
@@ -229,8 +238,10 @@ public ArtifactResolutionException getMetadataResolutionException( int i )
 
     public List<ArtifactResolutionException> getMetadataResolutionExceptions()
     {
-        return metadataResolutionExceptions == null ? Collections.<ArtifactResolutionException>emptyList()
-                        : metadataResolutionExceptions;
+        return metadataResolutionExceptions == null
+                   ? Collections.<ArtifactResolutionException>emptyList()
+                   : Collections.unmodifiableList( metadataResolutionExceptions );
+
     }
 
     // ------------------------------------------------------------------------
@@ -262,7 +273,7 @@ public ArtifactResolutionResult addErrorArtifactException( ArtifactResolutionExc
             return Collections.emptyList();
         }
 
-        return errorArtifactExceptions;
+        return Collections.unmodifiableList( errorArtifactExceptions );
     }
 
     // ------------------------------------------------------------------------
@@ -299,7 +310,7 @@ public CyclicDependencyException getCircularDependencyException( int i )
             return Collections.emptyList();
         }
 
-        return circularDependencyExceptions;
+        return Collections.unmodifiableList( circularDependencyExceptions );
     }
 
     // ------------------------------------------------------------------------
@@ -313,7 +324,7 @@ public CyclicDependencyException getCircularDependencyException( int i )
             return Collections.emptyList();
         }
 
-        return repositories;
+        return Collections.unmodifiableList( repositories );
     }
 
     public ArtifactResolutionResult setRepositories( final List<ArtifactRepository> repositories )
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java
index 5651641232..cb7e9cfc9d 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java
@@ -99,6 +99,7 @@ public void addDependencies( Set<Artifact> artifacts, List<ArtifactRepository> r
 
                 children.add( new ResolutionNode( a, remoteRepositories, this ) );
             }
+            children = Collections.unmodifiableList( children );
         }
         else
         {
diff --git a/maven-core/src/main/java/org/apache/maven/exception/ExceptionSummary.java b/maven-core/src/main/java/org/apache/maven/exception/ExceptionSummary.java
index dcc376a4b9..6615af61ce 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/ExceptionSummary.java
+++ b/maven-core/src/main/java/org/apache/maven/exception/ExceptionSummary.java
@@ -53,7 +53,10 @@ public ExceptionSummary( Throwable exception, String message, String reference,
         this.exception = exception;
         this.message = ( message != null ) ? message : "";
         this.reference = ( reference != null ) ? reference : "";
-        this.children = ( children != null ) ? children : Collections.<ExceptionSummary>emptyList();
+        this.children = ( children != null )
+                            ? Collections.unmodifiableList( children )
+                            : Collections.<ExceptionSummary>emptyList();
+
     }
 
     public Throwable getException()
diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
index 71a6894c69..218b4ecdfa 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
@@ -1105,6 +1105,7 @@ public ProjectBuildingRequest getProjectBuildingRequest()
             projectBuildingRequest.setProfiles( getProfiles() );
             projectBuildingRequest.setProcessPlugins( true );
             projectBuildingRequest.setBuildStartTime( getStartTime() );
+            projectBuildingRequest.setGoals( getGoals() );
         }
 
         return projectBuildingRequest;
diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java
index 87d8676627..112a064923 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionResult.java
@@ -64,8 +64,10 @@ public MavenExecutionResult setTopologicallySortedProjects( List<MavenProject> t
 
     public List<MavenProject> getTopologicallySortedProjects()
     {
-        return null == topologicallySortedProjects ? Collections.<MavenProject>emptyList()
-                        : topologicallySortedProjects;
+        return null == topologicallySortedProjects
+                   ? Collections.<MavenProject>emptyList()
+                   : Collections.unmodifiableList( topologicallySortedProjects );
+
     }
 
     public DependencyResolutionResult getDependencyResolutionResult()
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
index 6f994b3d3f..8d0405ca95 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
@@ -100,7 +100,10 @@ public void execute( MavenSession session )
     // TODO: This whole method could probably removed by injecting lifeCyclePluginAnalyzer straight into client site.
     // TODO: But for some reason the whole plexus appcontext refuses to start when I try this.
 
+    @Override
+    @Deprecated
     public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
+        throws LifecycleMappingNotFoundException
     {
         return lifeCyclePluginAnalyzer.getPluginsBoundByDefaultToAllLifecycles( packaging );
     }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java
index 48cd0c5c45..788c2fea07 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java
@@ -66,9 +66,9 @@ public DefaultLifecycles( Map<String, Lifecycle> lifecycles, Logger logger )
         this.lifecycles = lifecycles;
     }
 
-    public Lifecycle get( String key )
+    public Lifecycle get( String phase )
     {
-        return getPhaseToLifecycleMap().get( key );
+        return getPhaseToLifecycleMap().get( phase );
     }
 
     /**
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java
index ed07c1d5e7..536e167986 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifeCyclePluginAnalyzer.java
@@ -20,6 +20,8 @@
  */
 
 import java.util.Set;
+
+import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 
 /**
@@ -28,5 +30,23 @@
  */
 public interface LifeCyclePluginAnalyzer
 {
-    Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging );
+
+    @Deprecated
+    Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
+        throws LifecycleMappingNotFoundException;
+
+    /**
+     * Gets a set of default build {@code Plugin}s for a given {@code Model} and a Maven execution with the given goals.
+     *
+     * @param model The model to get the default build {@code Plugin}s for.
+     * @param goals A set of goals of the current Maven invokation.
+     *
+     * @return A set of default build {@code Plugin}s for {@code Model}.
+     *
+     * @throws LifecycleMappingNotFoundException if {@code model} does not declare a supported packaging.
+     * @since 3.4
+     */
+    Set<Plugin> getDefaultBuildPlugins( Model model, Set<String> goals )
+        throws LifecycleMappingNotFoundException;
+
 }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
index 04c602cfe2..9e74ba2853 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
@@ -47,21 +47,15 @@
     @Deprecated
     String ROLE = LifecycleExecutor.class.getName();
 
-    // For a given project packaging find all the plugins that are bound to any registered
-    // lifecycles. The project builder needs to now what default plugin information needs to be
-    // merged into POM being built. Once the POM builder has this plugin information, versions can be assigned
-    // by the POM builder because they will have to be defined in plugin management. Once this is setComplete then it
-    // can be passed back so that the default configuration information can be populated.
-    //
-    // We need to know the specific version so that we can lookup the right version of the plugin descriptor
-    // which tells us what the default configuration is.
-    //
-
     /**
      * @return The plugins bound to the lifecycles of the specified packaging or {@code null} if the packaging is
-     *         unknown.
+     * unknown.
+     *
+     * @deprecated Please use {@link LifeCyclePluginAnalyzer}.
      */
-    Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging );
+    @Deprecated
+    Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
+        throws LifecycleMappingNotFoundException;
 
     MavenExecutionPlan calculateExecutionPlan( MavenSession session, String... tasks )
         throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingDelegate.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingDelegate.java
index f070198712..0b4465f5a0 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingDelegate.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingDelegate.java
@@ -21,6 +21,7 @@
 
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.InvalidPluginDescriptorException;
@@ -45,6 +46,16 @@
  */
 public interface LifecycleMappingDelegate
 {
+
+    /**
+     * Gets a set of lifecycle identifiers of lifecycles this delegate is requiring to operate.
+     *
+     * @return An unmodifiable set of lifecycle identifiers of lifecycles this delegate is requiring to operate.
+     *
+     * @since 3.4
+     */
+    Set<String> getRequiredLifecycles();
+
     Map<String, List<MojoExecution>> calculateLifecycleMappings( MavenSession session, MavenProject project,
                                                                  Lifecycle lifecycle, String lifecyclePhase )
         throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingNotFoundException.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingNotFoundException.java
new file mode 100644
index 0000000000..983f052482
--- /dev/null
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleMappingNotFoundException.java
@@ -0,0 +1,45 @@
+package org.apache.maven.lifecycle;
+
+/*
+ * 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.
+ */
+
+/**
+ * Signals a failure to locate a lifecycle mapping.
+ *
+ * @author Christian Schulte
+ *
+ * @since 3.4
+ */
+public final class LifecycleMappingNotFoundException extends Exception
+{
+
+    private String packaging;
+
+    public LifecycleMappingNotFoundException( final String packaging )
+    {
+        super( String.format( "No lifecycle mapping found for packaging '%s'.", packaging ) );
+        this.packaging = packaging;
+    }
+
+    public String getPackaging()
+    {
+        return this.packaging;
+    }
+
+}
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java
index 8348530a4f..305fa4e4cc 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java
@@ -20,9 +20,11 @@
  */
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.TreeMap;
 
 import org.apache.maven.execution.MavenSession;
@@ -51,6 +53,13 @@
     @Requirement
     private BuildPluginManager pluginManager;
 
+    @Override
+    public Set<String> getRequiredLifecycles()
+    {
+        // The default delegate requires no lifecycles to operate.
+        return Collections.emptySet();
+    }
+
     public Map<String, List<MojoExecution>> calculateLifecycleMappings( MavenSession session, MavenProject project,
                                                                         Lifecycle lifecycle, String lifecyclePhase )
         throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
index a72ce8edd4..b98b5f1283 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
@@ -19,12 +19,25 @@
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.maven.lifecycle.DefaultLifecycles;
 import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer;
 import org.apache.maven.lifecycle.Lifecycle;
+import org.apache.maven.lifecycle.LifecycleMappingDelegate;
+import org.apache.maven.lifecycle.LifecycleMappingNotFoundException;
 import org.apache.maven.lifecycle.mapping.LifecycleMapping;
 import org.apache.maven.lifecycle.mapping.LifecycleMojo;
 import org.apache.maven.lifecycle.mapping.LifecyclePhase;
+import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginExecution;
 import org.codehaus.plexus.component.annotations.Component;
@@ -32,23 +45,14 @@
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 /**
  * @since 3.0
  * @author Benjamin Bentmann
  * @author Jason van Zyl
  * @author jdcasey
  * @author Kristian Rosenvold (extracted class only)
- *         <p/>
- *         NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
+ * <p/>
+ * NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
  */
 @Component( role = LifeCyclePluginAnalyzer.class )
 public class DefaultLifecyclePluginAnalyzer
@@ -61,6 +65,12 @@
     @Requirement
     private DefaultLifecycles defaultLifeCycles;
 
+    @Requirement( hint = DefaultLifecycleMappingDelegate.HINT )
+    private LifecycleMappingDelegate defaultLifecycleMappingDelegate;
+
+    @Requirement
+    private Map<String, LifecycleMappingDelegate> lifecycleMappingDelegates;
+
     @Requirement
     private Logger logger;
 
@@ -72,25 +82,23 @@ public DefaultLifecyclePluginAnalyzer()
     // <plugin/> block in a Maven POM. We have to do some wiggling to pull the sources of information
     // together and this really shows the problem of constructing a sensible default configuration but
     // it's all encapsulated here so it appears normalized to the POM builder.
-
     // We are going to take the project packaging and find all plugin in the default lifecycle and create
     // fully populated Plugin objects, including executions with goals and default configuration taken
     // from the plugin.xml inside a plugin.
-    //
-
     public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
+        throws LifecycleMappingNotFoundException
     {
         if ( logger.isDebugEnabled() )
         {
             logger.debug( "Looking up lifecyle mappings for packaging " + packaging + " from "
-                + Thread.currentThread().getContextClassLoader() );
+                              + Thread.currentThread().getContextClassLoader() );
         }
 
         LifecycleMapping lifecycleMappingForPackaging = lifecycleMappings.get( packaging );
 
         if ( lifecycleMappingForPackaging == null )
         {
-            return null;
+            throw new LifecycleMappingNotFoundException( packaging );
         }
 
         Map<Plugin, Plugin> plugins = new LinkedHashMap<>();
@@ -128,6 +136,178 @@ else if ( lifecycle.getDefaultLifecyclePhases() != null )
         return plugins.keySet();
     }
 
+    @Override
+    public Set<Plugin> getDefaultBuildPlugins( final Model model, final Set<String> goals )
+        throws LifecycleMappingNotFoundException
+    {
+        final Map<Plugin, Plugin> defaultBuildPlugins = new LinkedHashMap<>();
+        final Set<String> executedLifecycles = new HashSet<>();
+
+        // Plugins of lifecycles of the 'MavenExecutionRequest' goals or the project default goals.
+        if ( goals != null )
+        {
+            if ( !goals.isEmpty() )
+            {
+                // Command line goals.
+                for ( final String goal : goals )
+                {
+                    if ( !isGoalSpecification( goal ) )
+                    {
+                        final Lifecycle lifecycle = this.defaultLifeCycles.get( goal );
+
+                        if ( lifecycle != null )
+                        {
+                            executedLifecycles.add( lifecycle.getId() );
+                        }
+                    }
+                }
+            }
+            else if ( model.getBuild() != null && model.getBuild().getDefaultGoal() != null )
+            {
+                // No command line goals -> default goal(s).
+                // Copied from 'DefaultLifecycleTaskSegmentCalculator'.
+                if ( !StringUtils.isEmpty( model.getBuild().getDefaultGoal() ) )
+                {
+                    for ( final String goal
+                              : Arrays.asList( StringUtils.split( model.getBuild().getDefaultGoal() ) ) )
+                    {
+                        if ( !isGoalSpecification( goal ) )
+                        {
+                            final Lifecycle lifecycle = this.defaultLifeCycles.get( goal );
+
+                            if ( lifecycle != null )
+                            {
+                                executedLifecycles.add( lifecycle.getId() );
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        // If nothing is to be executed via MavenExecutionRequest or default goals from the model, no need to provide
+        // anything as nothing will ever get executed.
+        if ( !executedLifecycles.isEmpty() )
+        {
+            // Plugins of lifecycles plugin executions are bound to manually.
+            if ( model.getBuild() != null && model.getBuild().getPlugins() != null )
+            {
+                for ( final Plugin plugin : model.getBuild().getPlugins() )
+                {
+                    executedLifecycles.addAll( this.getLifecycleRequirements( plugin ) );
+                }
+            }
+
+            // Plugins of lifecycles required by lifecycle mapping delegates.
+            for ( final Lifecycle lifecycle : this.defaultLifeCycles.getLifeCycles() )
+            {
+                // Keep in sync with
+                //   DefaultLifecycleExecutionPlanCalculator#calculateLifecycleMappings( MavenSession session,
+                //                                                                       MavenProject project,
+                //                                                                       String lifecyclePhase )
+                final LifecycleMappingDelegate lifecycleMappingDelegate =
+                    Arrays.binarySearch( DefaultLifecycles.STANDARD_LIFECYCLES, lifecycle.getId() ) >= 0
+                        ? defaultLifecycleMappingDelegate
+                        : lifecycleMappingDelegates.containsKey( lifecycle.getId() )
+                              ? lifecycleMappingDelegates.get( lifecycle.getId() )
+                              : defaultLifecycleMappingDelegate;
+
+                for ( final String id : lifecycleMappingDelegate.getRequiredLifecycles() )
+                {
+                    executedLifecycles.add( id );
+                }
+            }
+        }
+
+        for ( final Lifecycle lifecycle : this.getOrderedLifecycles() )
+        {
+            if ( executedLifecycles.contains( lifecycle.getId() ) )
+            {
+                org.apache.maven.lifecycle.mapping.Lifecycle lifecycleConfiguration = null;
+
+                if ( lifecycle.getId().equals( "default" ) )
+                {
+                    if ( logger.isDebugEnabled() )
+                    {
+                        logger.debug( String.format( "Looking up lifecyle mappings for packaging '%s' from '%s'",
+                                                     model.getPackaging(),
+                                                     Thread.currentThread().getContextClassLoader() ) );
+
+                    }
+
+                    final LifecycleMapping lifecycleMappingForPackaging =
+                        this.lifecycleMappings.get( model.getPackaging() );
+
+                    if ( lifecycleMappingForPackaging == null )
+                    {
+                        throw new LifecycleMappingNotFoundException( model.getPackaging() );
+                    }
+
+                    lifecycleConfiguration = lifecycleMappingForPackaging.getLifecycles().get( lifecycle.getId() );
+                }
+
+                Map<String, LifecyclePhase> phaseToGoalMapping = null;
+
+                if ( lifecycleConfiguration != null )
+                {
+                    phaseToGoalMapping = lifecycleConfiguration.getLifecyclePhases();
+                }
+                else if ( lifecycle.getDefaultLifecyclePhases() != null )
+                {
+                    phaseToGoalMapping = lifecycle.getDefaultLifecyclePhases();
+                }
+
+                if ( phaseToGoalMapping != null )
+                {
+                    for ( final Map.Entry<String, LifecyclePhase> goalsForLifecyclePhase
+                              : phaseToGoalMapping.entrySet() )
+                    {
+                        final String phase = goalsForLifecyclePhase.getKey();
+                        final LifecyclePhase lifecyclePhase = goalsForLifecyclePhase.getValue();
+
+                        if ( goals != null )
+                        {
+                            parseLifecyclePhaseDefinitions( defaultBuildPlugins, phase, lifecyclePhase );
+                        }
+                    }
+                }
+            }
+        }
+
+        return defaultBuildPlugins.keySet();
+    }
+
+    private Set<String> getLifecycleRequirements( final Plugin plugin )
+    {
+        final Set<String> executedLifecycles = new HashSet<>();
+
+        for ( final PluginExecution pluginExecution : plugin.getExecutions() )
+        {
+            if ( pluginExecution.getPhase() != null )
+            {
+                final Lifecycle lifecycle = this.defaultLifeCycles.get( pluginExecution.getPhase() );
+
+                if ( lifecycle != null )
+                {
+                    executedLifecycles.add( lifecycle.getId() );
+                }
+            }
+            else
+            {
+                // TODO: If omitted, the goals will be bound to the default phase specified by the plugin.
+                // TODO: Forked executions.
+            }
+        }
+
+        return executedLifecycles;
+    }
+
+    // Copied from 'DefaultLifecycleTaskSegmentCalculator'.
+    private static boolean isGoalSpecification( String task )
+    {
+        return task.indexOf( ':' ) >= 0;
+    }
+
     private List<Lifecycle> getOrderedLifecycles()
     {
         // NOTE: The lifecycle order can affect implied execution ids so we better be deterministic.
@@ -152,25 +332,25 @@ private void parseLifecyclePhaseDefinitions( Map<Plugin, Plugin> plugins, String
         List<LifecycleMojo> mojos = goals.getMojos();
         if ( mojos != null )
         {
-            
+
             for ( int i = 0; i < mojos.size(); i++ )
             {
                 LifecycleMojo mojo = mojos.get( i );
-                
+
                 GoalSpec gs = parseGoalSpec( mojo.getGoal() );
-    
+
                 if ( gs == null )
                 {
                     logger.warn( "Ignored invalid goal specification '" + mojo.getGoal()
-                            + "' from lifecycle mapping for phase " + phase );
+                                     + "' from lifecycle mapping for phase " + phase );
                     continue;
                 }
-    
+
                 Plugin plugin = new Plugin();
                 plugin.setGroupId( gs.groupId );
                 plugin.setArtifactId( gs.artifactId );
                 plugin.setVersion( gs.version );
-    
+
                 Plugin existing = plugins.get( plugin );
                 if ( existing != null )
                 {
@@ -184,14 +364,14 @@ private void parseLifecyclePhaseDefinitions( Map<Plugin, Plugin> plugins, String
                 {
                     plugins.put( plugin, plugin );
                 }
-    
+
                 PluginExecution execution = new PluginExecution();
                 execution.setId( getExecutionId( plugin, gs.goal ) );
                 execution.setPhase( phase );
                 execution.setPriority( i - mojos.size() );
                 execution.getGoals().add( gs.goal );
                 execution.setConfiguration( mojo.getConfiguration() );
-                
+
                 plugin.setDependencies( mojo.getDependencies() );
                 plugin.getExecutions().add( execution );
             }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
index 2e4c117e14..8524c5e7c7 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
@@ -104,32 +104,34 @@ private void collectDependencyRequirements( Set<String> scopesToResolve, Set<Str
 
     private Collection<String> toScopes( String classpath )
     {
+        Collection<String> scopes = Collections.emptyList();
+
         if ( StringUtils.isNotEmpty( classpath ) )
         {
             if ( Artifact.SCOPE_COMPILE.equals( classpath ) )
             {
-                return Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_SYSTEM, Artifact.SCOPE_PROVIDED );
+                scopes = Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_SYSTEM, Artifact.SCOPE_PROVIDED );
             }
             else if ( Artifact.SCOPE_RUNTIME.equals( classpath ) )
             {
-                return Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_RUNTIME );
+                scopes = Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_RUNTIME );
             }
             else if ( Artifact.SCOPE_COMPILE_PLUS_RUNTIME.equals( classpath ) )
             {
-                return Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_SYSTEM, Artifact.SCOPE_PROVIDED,
-                                      Artifact.SCOPE_RUNTIME );
+                scopes = Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_SYSTEM, Artifact.SCOPE_PROVIDED,
+                                        Artifact.SCOPE_RUNTIME );
             }
             else if ( Artifact.SCOPE_RUNTIME_PLUS_SYSTEM.equals( classpath ) )
             {
-                return Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_SYSTEM, Artifact.SCOPE_RUNTIME );
+                scopes = Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_SYSTEM, Artifact.SCOPE_RUNTIME );
             }
             else if ( Artifact.SCOPE_TEST.equals( classpath ) )
             {
-                return Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_SYSTEM, Artifact.SCOPE_PROVIDED,
-                                      Artifact.SCOPE_RUNTIME, Artifact.SCOPE_TEST );
+                scopes = Arrays.asList( Artifact.SCOPE_COMPILE, Artifact.SCOPE_SYSTEM, Artifact.SCOPE_PROVIDED,
+                                        Artifact.SCOPE_RUNTIME, Artifact.SCOPE_TEST );
             }
         }
-        return Collections.emptyList();
+        return Collections.unmodifiableCollection( scopes );
     }
 
     public void execute( MavenSession session, List<MojoExecution> mojoExecutions, ProjectIndex projectIndex )
diff --git a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
index 1401e30a1e..b77bf0adbc 100644
--- a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
+++ b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
@@ -22,11 +22,13 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
 import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer;
+import org.apache.maven.lifecycle.LifecycleMappingNotFoundException;
 import org.apache.maven.model.Build;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
@@ -34,11 +36,12 @@
 import org.apache.maven.model.PluginExecution;
 import org.apache.maven.model.PluginManagement;
 import org.apache.maven.model.building.ModelBuildingRequest;
-import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblem.Severity;
 import org.apache.maven.model.building.ModelProblem.Version;
+import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.merge.MavenModelMerger;
+
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 
@@ -55,27 +58,36 @@
     private LifecycleBindingsMerger merger = new LifecycleBindingsMerger();
 
     @Requirement
-    private LifeCyclePluginAnalyzer lifecycle;
+    private LifeCyclePluginAnalyzer lifecyclePluginAnalyzer;
 
     public void injectLifecycleBindings( Model model, ModelBuildingRequest request, ModelProblemCollector problems )
     {
-        String packaging = model.getPackaging();
-
-        Collection<Plugin> defaultPlugins = lifecycle.getPluginsBoundByDefaultToAllLifecycles( packaging );
-
-        if ( defaultPlugins == null )
+        try
         {
-            problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
-                    .setMessage( "Unknown packaging: " + packaging )
-                    .setLocation( model.getLocation( "packaging" ) ) );
+            // MNG-5359: request.setGoals() may not have been called since the goals got added for MNG-5359 in 3.4. In
+            //           this case fall back to the pre 3.4 behaviour. Usages of ProjectBuildingRequest and
+            //           ModelBuildingRequest without setting the goals should behave the same way as before.
+            final Collection<Plugin> defaultPlugins =
+                request.getGoals() == null
+                    ? lifecyclePluginAnalyzer.getPluginsBoundByDefaultToAllLifecycles( model.getPackaging() )
+                    : lifecyclePluginAnalyzer.getDefaultBuildPlugins( model, new HashSet<>( request.getGoals() ) );
+
+            if ( !defaultPlugins.isEmpty() )
+            {
+                Model lifecycleModel = new Model();
+                lifecycleModel.setBuild( new Build() );
+                lifecycleModel.getBuild().getPlugins().addAll( defaultPlugins );
+
+                merger.merge( model, lifecycleModel );
+            }
         }
-        else if ( !defaultPlugins.isEmpty() )
+        catch ( final LifecycleMappingNotFoundException e )
         {
-            Model lifecycleModel = new Model();
-            lifecycleModel.setBuild( new Build() );
-            lifecycleModel.getBuild().getPlugins().addAll( defaultPlugins );
+            problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ).
+                setException( e ).
+                setMessage( "Unknown packaging: " + model.getPackaging() ).
+                setLocation( model.getLocation( "packaging" ) ) );
 
-            merger.merge( model, lifecycleModel );
         }
     }
 
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
index b87994e22a..bad1454c6c 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
@@ -458,7 +458,7 @@ private void discoverPluginComponents( final ClassRealm pluginRealm, Plugin plug
                 it.remove();
             }
         }
-        return artifacts;
+        return Collections.unmodifiableList( artifacts );
     }
 
     private Map<String, ClassLoader> calcImports( MavenProject project, ClassLoader parent, List<String> imports )
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
index 7ab86cfd16..01194c866d 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
@@ -100,7 +100,7 @@ public DefaultPluginPrefixRequest setPluginGroups( List<String> pluginGroups )
     {
         if ( pluginGroups != null )
         {
-            this.pluginGroups = pluginGroups;
+            this.pluginGroups = Collections.unmodifiableList( pluginGroups );
         }
         else
         {
@@ -131,7 +131,7 @@ public DefaultPluginPrefixRequest setRepositories( List<RemoteRepository> reposi
     {
         if ( repositories != null )
         {
-            this.repositories = repositories;
+            this.repositories = Collections.unmodifiableList( repositories );
         }
         else
         {
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java b/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
index 9907066b9d..57f4250c63 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
@@ -140,7 +140,7 @@ public DefaultPluginVersionRequest setRepositories( List<RemoteRepository> repos
     {
         if ( repositories != null )
         {
-            this.repositories = repositories;
+            this.repositories = Collections.unmodifiableList( repositories );
         }
         else
         {
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java b/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java
index dbdf25261d..509e8b48d9 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultDependencyResolutionResult.java
@@ -98,7 +98,10 @@ public void setCollectionErrors( List<Exception> exceptions )
     public List<Exception> getResolutionErrors( Dependency dependency )
     {
         List<Exception> errors = resolutionErrors.get( dependency );
-        return ( errors != null ) ? errors : Collections.<Exception>emptyList();
+        return ( errors != null )
+                   ? Collections.unmodifiableList( errors )
+                   : Collections.<Exception>emptyList();
+
     }
 
     public void setResolutionErrors( Dependency dependency, List<Exception> errors )
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java
index 2cce9f6ac5..54c15bb96e 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java
@@ -91,16 +91,15 @@ public void attachArtifact( MavenProject project, File artifactFile, String arti
         attachArtifact( project, artifact );
     }
 
-    /**
-     * Add an attached artifact or replace the file for an existing artifact.
-     *
-     * @see MavenProject#addAttachedArtifact(org.apache.maven.artifact.Artifact)
-     * @param project project reference.
-     * @param artifact artifact to add or replace.
-     */
     public void attachArtifact( MavenProject project, Artifact artifact )
     {
+        final int size = project.getAttachedArtifacts().size();
         project.addAttachedArtifact( artifact );
+
+        if ( project.getAttachedArtifacts().size() == size && this.getLogger().isInfoEnabled() )
+        {
+            this.getLogger().info( String.format( "Replaced artifact %s.", artifact ) );
+        }
     }
 
     public void addResource( MavenProject project, String resourceDirectory, List<String> includes,
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
index 9d51a6d3a2..3b3fe74376 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
@@ -43,7 +43,6 @@
 import org.apache.maven.model.DeploymentRepository;
 import org.apache.maven.model.Extension;
 import org.apache.maven.model.Model;
-import org.apache.maven.model.Parent;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.ReportPlugin;
@@ -73,9 +72,6 @@
 import org.eclipse.aether.repository.WorkspaceRepository;
 import org.eclipse.aether.resolution.ArtifactRequest;
 import org.eclipse.aether.resolution.ArtifactResult;
-import org.eclipse.aether.resolution.VersionRangeRequest;
-import org.eclipse.aether.resolution.VersionRangeResolutionException;
-import org.eclipse.aether.resolution.VersionRangeResult;
 
 /**
  */
@@ -276,6 +272,7 @@ private ModelBuildingRequest getModelBuildingRequest( InternalConfig config )
         request.setBuildStartTime( configuration.getBuildStartTime() );
         request.setModelResolver( resolver );
         request.setModelCache( new ReactorModelCache() );
+        request.setGoals( configuration.getGoals() );
 
         return request;
     }
@@ -298,44 +295,6 @@ public ProjectBuildingResult build( Artifact artifact, boolean allowStubModel, P
 
         boolean localProject;
 
-        if ( request.isResolveVersionRanges() )
-        {
-            VersionRangeRequest versionRangeRequest = new VersionRangeRequest( pomArtifact, config.repositories, null );
-
-            try
-            {
-                VersionRangeResult versionRangeResult =
-                    repoSystem.resolveVersionRange( config.session, versionRangeRequest );
-
-                if ( versionRangeResult.getHighestVersion() == null )
-                {
-                    throw new ProjectBuildingException(
-                        artifact.getId(), "Error resolving project artifact: No versions matched the requested range",
-                        (Throwable) null );
-
-                }
-
-                if ( versionRangeResult.getVersionConstraint() != null
-                         && versionRangeResult.getVersionConstraint().getRange() != null
-                         && versionRangeResult.getVersionConstraint().getRange().getUpperBound() == null )
-                {
-                    throw new ProjectBuildingException(
-                        artifact.getId(),
-                        "Error resolving project artifact: The requested version range does not specify an upper bound",
-                        (Throwable) null );
-
-                }
-
-                pomArtifact = pomArtifact.setVersion( versionRangeResult.getHighestVersion().toString() );
-            }
-            catch ( VersionRangeResolutionException e )
-            {
-                throw new ProjectBuildingException(
-                    artifact.getId(), "Error resolving project artifact: " + e.getMessage(), e );
-
-            }
-        }
-
         try
         {
             ArtifactRequest pomRequest = new ArtifactRequest();
@@ -654,11 +613,32 @@ private void initProject( MavenProject project, Map<String, MavenProject> projec
         project.setModel( model );
         project.setOriginalModel( result.getRawModel() );
         project.setFile( model.getPomFile() );
-        Parent p = model.getParent();
-        if ( p != null )
+
+        Model parentModel = null;
+        if ( !result.getModelIds().get( 1 ).isEmpty() )
+        {
+            // Note: The parent model already got resolved by the ModelBuilder based on model.getParent().
+            parentModel = result.getRawModel( result.getModelIds().get( 1 ) );
+        }
+
+        if ( parentModel != null )
         {
-            project.setParentArtifact( repositorySystem.createProjectArtifact( p.getGroupId(), p.getArtifactId(),
-                                                                               p.getVersion() ) );
+            String parentGroupId = parentModel.getGroupId();
+            if ( parentGroupId == null && parentModel.getParent() != null )
+            {
+                parentGroupId = parentModel.getParent().getGroupId();
+            }
+
+            String parentVersion = parentModel.getVersion();
+            if ( parentVersion == null && parentModel.getParent() != null )
+            {
+                parentVersion = parentModel.getParent().getVersion();
+            }
+
+            project.setParentArtifact( repositorySystem.createProjectArtifact( parentGroupId,
+                                                                               parentModel.getArtifactId(),
+                                                                               parentVersion ) );
+
             // org.apache.maven.its.mng4834:parent:0.1
             String parentModelId = result.getModelIds().get( 1 );
             File parentPomFile = result.getRawModel( parentModelId ).getPomFile();
@@ -807,7 +787,7 @@ private void initProject( MavenProject project, Map<String, MavenProject> projec
             List<Dependency> deps;
             DependencyManagement dependencyManagement = project.getDependencyManagement();
             if ( ( dependencyManagement != null ) && ( ( deps = dependencyManagement.getDependencies() ) != null )
-                && ( deps.size() > 0 ) )
+                     && ( deps.size() > 0 ) )
             {
                 map = new HashMap<>();
                 for ( Dependency d : dependencyManagement.getDependencies() )
@@ -819,6 +799,7 @@ private void initProject( MavenProject project, Map<String, MavenProject> projec
                         map.put( d.getManagementKey(), artifact );
                     }
                 }
+                map = Collections.unmodifiableMap( map );
             }
             else
             {
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
index f439240bf4..ab5de1c732 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java
@@ -20,6 +20,7 @@
  */
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Properties;
@@ -62,10 +63,13 @@
 
     private boolean resolveDependencies;
 
+    @Deprecated
     private boolean resolveVersionRanges;
 
     private RepositoryMerging repositoryMerging = RepositoryMerging.POM_DOMINANT;
 
+    private List<String> goals;
+
     public DefaultProjectBuildingRequest()
     {
         processPlugins = true;
@@ -95,6 +99,7 @@ public DefaultProjectBuildingRequest( ProjectBuildingRequest request )
         setProject( request.getProject() );
         setResolveDependencies( request.isResolveDependencies() );
         setValidationLevel( request.getValidationLevel() );
+        setGoals( request.getGoals() );
     }
 
     public MavenProject getProject()
@@ -221,14 +226,24 @@ public boolean isResolveDependencies()
         return resolveDependencies;
     }
 
-    /** @since 3.2.2 */
+    /**
+     * @since 3.2.2
+     * @deprecated This got added when implementing MNG-2199 and is no longer used.
+     * Commit 6cf9320942c34bc68205425ab696b1712ace9ba4 updated the way 'MavenProject' objects are initialized.
+     */
+    @Deprecated
     public ProjectBuildingRequest setResolveVersionRanges( boolean value )
     {
         this.resolveVersionRanges = value;
         return this;
     }
 
-    /** @since 3.2.2 */
+    /**
+     * @since 3.2.2
+     * @deprecated This got added when implementing MNG-2199 and is no longer used.
+     * Commit 6cf9320942c34bc68205425ab696b1712ace9ba4 updated the way 'MavenProject' objects are initialized.
+     */
+    @Deprecated
     public boolean isResolveVersionRanges()
     {
         return this.resolveVersionRanges;
@@ -328,6 +343,19 @@ public DefaultProjectBuildingRequest setRepositoryMerging( RepositoryMerging rep
         return this;
     }
 
+    @Override
+    public List<String> getGoals()
+    {
+        return this.goals;
+    }
+
+    @Override
+    public DefaultProjectBuildingRequest setGoals( final List<String> value )
+    {
+        this.goals = value != null ? Collections.unmodifiableList( value ) : null;
+        return this;
+    }
+
     public RepositoryMerging getRepositoryMerging()
     {
         return repositoryMerging;
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java
index 9d66eb0eed..85bd001a8f 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java
@@ -49,7 +49,9 @@
 
         public CacheKey( List<? extends ClassRealm> extensionRealms )
         {
-            this.extensionRealms = ( extensionRealms != null ) ? extensionRealms : Collections.<ClassRealm>emptyList();
+            this.extensionRealms = ( extensionRealms != null )
+                                       ? Collections.unmodifiableList( extensionRealms )
+                                       : Collections.<ClassRealm>emptyList();
 
             this.hashCode = this.extensionRealms.hashCode();
         }
diff --git a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
index 952622ffa2..8337834f5b 100644
--- a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
+++ b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
@@ -778,7 +778,7 @@ public Artifact getParentArtifact()
         {
             return Collections.emptyList();
         }
-        return getModel().getBuild().getPlugins();
+        return Collections.unmodifiableList( getModel().getBuild().getPlugins() );
     }
 
     public List<String> getModules()
@@ -909,19 +909,38 @@ public void setInjectedProfileIds( String source, List<String> injectedProfileId
     }
 
     /**
-     * Add or replace an artifact. This method is now deprecated. Use the @{MavenProjectHelper} to attach artifacts to a
-     * project. In spite of the 'throws' declaration on this API, this method has never thrown an exception since Maven
-     * 3.0.x. Historically, it logged and ignored a second addition of the same g/a/v/c/t. Now it replaces the file for
-     * the artifact, so that plugins (e.g. shade) can change the pathname of the file for a particular set of
-     * coordinates.
+     * Adds or replaces an artifact.
      *
-     * @param artifact the artifact to add or replace.
-     * @throws DuplicateArtifactAttachmentException
+     * @param artifact The artifact to add or replace.
+     *
+     * @deprecated Please use {@link MavenProjectHelper}
+     * @see https://issues.apache.org/jira/browse/MNG-5868
+     * @see https://issues.apache.org/jira/browse/MNG-5387
+     * @see https://issues.apache.org/jira/browse/MNG-4013
+     * @see https://issues.apache.org/jira/browse/MNG-3119
      */
+    @Deprecated
     public void addAttachedArtifact( Artifact artifact )
-        throws DuplicateArtifactAttachmentException
     {
-        getAttachedArtifacts().add( artifact );
+        getAttachedArtifacts();
+        assert this.attachedArtifacts != null : "Unexpected missing attached artifacts.";
+
+        boolean replaced = false;
+        for ( int i = 0, s0 = this.attachedArtifacts.size(); i < s0; i++ )
+        {
+            final Artifact a = this.attachedArtifacts.get( i );
+
+            if ( a.equals( artifact ) )
+            {
+                this.attachedArtifacts.set( i, artifact );
+                replaced = true;
+            }
+        }
+
+        if ( !replaced )
+        {
+            this.attachedArtifacts.add( artifact );
+        }
     }
 
     public List<Artifact> getAttachedArtifacts()
@@ -930,7 +949,7 @@ public void addAttachedArtifact( Artifact artifact )
         {
             attachedArtifacts = new ArrayList<>();
         }
-        return attachedArtifacts;
+        return Collections.unmodifiableList( attachedArtifacts );
     }
 
     public Xpp3Dom getGoalConfiguration( String pluginGroupId, String pluginArtifactId, String executionId,
@@ -1079,7 +1098,7 @@ public int hashCode()
         }
         else
         {
-            return build.getExtensions();
+            return Collections.unmodifiableList( build.getExtensions() );
         }
     }
 
@@ -1605,7 +1624,7 @@ public void addScriptSourceRoot( String path )
         {
             // TODO: let the scope handler deal with this
             if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_PROVIDED.equals( a.getScope() )
-                || Artifact.SCOPE_SYSTEM.equals( a.getScope() ) )
+                     || Artifact.SCOPE_SYSTEM.equals( a.getScope() ) )
             {
                 Dependency dependency = new Dependency();
 
@@ -1619,7 +1638,7 @@ public void addScriptSourceRoot( String path )
                 list.add( dependency );
             }
         }
-        return list;
+        return Collections.unmodifiableList( list );
     }
 
     @Deprecated
@@ -1663,7 +1682,7 @@ public void addScriptSourceRoot( String path )
 
             list.add( dependency );
         }
-        return list;
+        return Collections.unmodifiableList( list );
     }
 
     @Deprecated // used by the Maven ITs
@@ -1678,7 +1697,7 @@ public void addScriptSourceRoot( String path )
 
         List<Dependency> list = new ArrayList<>( artifacts.size() );
 
-        for ( Artifact a : getArtifacts()  )
+        for ( Artifact a : getArtifacts() )
         {
             // TODO: let the scope handler deal with this
             if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_RUNTIME.equals( a.getScope() ) )
@@ -1695,7 +1714,7 @@ public void addScriptSourceRoot( String path )
                 list.add( dependency );
             }
         }
-        return list;
+        return Collections.unmodifiableList( list );
     }
 
     @Deprecated
@@ -1791,7 +1810,7 @@ public void addScriptSourceRoot( String path )
                 list.add( dependency );
             }
         }
-        return list;
+        return Collections.unmodifiableList( list );
     }
 
     @Deprecated
@@ -1863,8 +1882,7 @@ public void setExtensionArtifacts( Set<Artifact> extensionArtifacts )
         {
             return Collections.emptyList();
         }
-        return getModel().getReporting().getPlugins();
-
+        return Collections.unmodifiableList( getModel().getReporting().getPlugins() );
     }
 
     @Deprecated
diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java
index 0380278bf9..c87c8d9b88 100644
--- a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java
@@ -168,12 +168,42 @@
      */
     RepositoryMerging getRepositoryMerging();
 
-    /** @since 3.2.2 */
+    /**
+     * @since 3.2.2
+     * @deprecated This got added when implementing MNG-2199 and is no longer used.
+     * Commit 6cf9320942c34bc68205425ab696b1712ace9ba4 updated the way 'MavenProject' objects are initialized.
+     */
+    @Deprecated
     boolean isResolveVersionRanges();
 
-    /** @since 3.2.2 */
+    /**
+     * @since 3.2.2
+     * @deprecated This got added when implementing MNG-2199 and is no longer used.
+     * Commit 6cf9320942c34bc68205425ab696b1712ace9ba4 updated the way 'MavenProject' objects are initialized.
+     */
+    @Deprecated
     ProjectBuildingRequest setResolveVersionRanges( boolean value );
 
+    /**
+     * Gets the goals the user requested to execute.
+     *
+     * @return An unmodifiable set of goals to execute or {@code null}.
+     *
+     * @since 3.4
+     */
+    List<String> getGoals();
+
+    /**
+     * Sets the goals the user requested to execute.
+     *
+     * @param value Set of goals the user requested to execute or {@code null}.
+     *
+     * @return This request, newver {@code null}.
+     *
+     * @since 3.4
+     */
+    ProjectBuildingRequest setGoals( List<String> value );
+
     /**
      * The possible merge modes for combining remote repositories.
      */
diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java
index 504097fbb4..1928a98142 100644
--- a/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java
+++ b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java
@@ -89,6 +89,15 @@ public ProjectSorter( Collection<MavenProject> projects )
             MavenProject conflictingProject = projectMap.put( projectId, project );
 
             if ( conflictingProject != null )
+            {
+                // skip DuplicateProjectException if they are physically the same pom.xml
+                if ( project.getFile() != null && project.getFile().equals( conflictingProject.getFile() ) )
+                {
+                    continue;
+                }
+
+            }
+            else
             {
                 throw new DuplicateProjectException( projectId, conflictingProject.getFile(), project.getFile(),
                                                      "Project '" + projectId + "' is duplicated in the reactor" );
diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java
index 1d4a2a313b..7113dd31e2 100644
--- a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java
+++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java
@@ -56,7 +56,10 @@ public MavenProject getProject()
     public List<Dependency> getManagedDependencies()
     {
         DependencyManagement depMngt = project.getDependencyManagement();
-        return ( depMngt != null ) ? depMngt.getDependencies() : Collections.<Dependency>emptyList();
+        return ( depMngt != null )
+                   ? Collections.unmodifiableList( depMngt.getDependencies() )
+                   : Collections.<Dependency>emptyList();
+
     }
 
     static class PomArtifactHandler
diff --git a/maven-core/src/site/apt/configuration-management.apt b/maven-core/src/site/apt/configuration-management.apt
index 4af0f0b1c5..ffec0e1091 100644
--- a/maven-core/src/site/apt/configuration-management.apt
+++ b/maven-core/src/site/apt/configuration-management.apt
@@ -120,7 +120,7 @@ Unified source directory
  problems with the current solution are:
  1. information is duplicate. once in POM's dependencies and once in the
  maven.multiproject.includes property.
- 2. it works without problems only for projects with relative paths, eg. from
+ 2. it works without problems only for projects with relative paths, e.g., from
  one CVS repository.. for projects from multiple SCM repositories it's harder
  to maintain the same relative links on all developer computers.
  not sure the unified source directory structure addresses this issue.
diff --git a/maven-core/src/site/apt/default-bindings.apt.vm b/maven-core/src/site/apt/default-bindings.apt.vm
index 02d6c4a93e..50c4654b2e 100644
--- a/maven-core/src/site/apt/default-bindings.apt.vm
+++ b/maven-core/src/site/apt/default-bindings.apt.vm
@@ -42,10 +42,6 @@ Plugin Bindings for <<<default>>> Lifecycle Reference
 
 %{snippet|id=ejb-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Plugin bindings for <<<ejb3>>> packaging
-
-%{snippet|id=ejb3-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
-
 * Plugin bindings for <<<maven-plugin>>> packaging
 
 %{snippet|id=maven-plugin-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
@@ -62,6 +58,3 @@ Plugin Bindings for <<<default>>> Lifecycle Reference
 
 %{snippet|id=rar-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
 
-* Plugin bindings for <<<par>>> packaging
-
-%{snippet|id=par-lifecycle|file=${project.basedir}/src/main/resources/META-INF/plexus/default-bindings.xml}
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java b/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java
index a812c26900..5106fd941e 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/EmptyLifecyclePluginAnalyzer.java
@@ -23,6 +23,7 @@
 import java.util.LinkedHashSet;
 import java.util.Set;
 
+import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginExecution;
 
@@ -32,6 +33,7 @@
 public class EmptyLifecyclePluginAnalyzer
     implements LifeCyclePluginAnalyzer
 {
+
     public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
     {
         Set<Plugin> plugins;
@@ -56,6 +58,12 @@
         return plugins;
     }
 
+    @Override
+    public Set<Plugin> getDefaultBuildPlugins( final Model model, final Set<String> goals )
+    {
+        return Collections.emptySet();
+    }
+
     private Plugin newPlugin( String artifactId, String... goals )
     {
         Plugin plugin = new Plugin();
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java
index b067e244a9..75d7923839 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifeCyclePluginAnalyzerStub.java
@@ -15,20 +15,22 @@
 
 package org.apache.maven.lifecycle.internal.stub;
 
-import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.model.PluginExecution;
-
 import java.util.Collections;
 import java.util.LinkedHashSet;
 import java.util.Set;
 
+import org.apache.maven.lifecycle.LifeCyclePluginAnalyzer;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.PluginExecution;
+
 /**
  * @author Kristian Rosenvold
  */
 public class LifeCyclePluginAnalyzerStub
     implements LifeCyclePluginAnalyzer
 {
+
     public Set<Plugin> getPluginsBoundByDefaultToAllLifecycles( String packaging )
     {
         Set<Plugin> plugins;
@@ -53,6 +55,12 @@
         return plugins;
     }
 
+    @Override
+    public Set<Plugin> getDefaultBuildPlugins( final Model model, final Set<String> goals )
+    {
+        return Collections.emptySet();
+    }
+
     private Plugin newPlugin( String artifactId, String... goals )
     {
         Plugin plugin = new Plugin();
diff --git a/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java b/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
index 73bdbcae45..71616fa63f 100644
--- a/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
+++ b/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java
@@ -169,6 +169,17 @@ protected MavenProject getProject( File pom )
         return projectBuilder.build( pom, configuration ).getProject();
     }
 
+    protected MavenProject getProjectFromRemoteRepository( final File pom )
+        throws Exception
+    {
+        final ProjectBuildingRequest configuration = new DefaultProjectBuildingRequest();
+        configuration.setLocalRepository( this.getLocalRepository() );
+        configuration.setRemoteRepositories( Arrays.asList( this.repositorySystem.createDefaultRemoteRepository() ) );
+        initRepoSession( configuration );
+
+        return projectBuilder.build( pom, configuration ).getProject();
+    }
+
     protected ProjectBuildingRequest newBuildingRequest()
         throws Exception
     {
diff --git a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
index d61fc6ea10..3959cdd393 100644
--- a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
@@ -189,4 +189,134 @@ public void testImportScopePomResolvesFromPropertyBasedRepository()
         request.setResolveDependencies( true );
         projectBuilder.build( pomFile, request );
     }
+
+    /**
+     * Tests whether local version range parent references are build correctly.
+     *
+     * @throws Exception
+     */
+    public void testBuildValidParentVersionRangeLocally() throws Exception
+    {
+        File f1 = getTestFile( "src/test/resources/projects/parent-version-range-local-valid/child/pom.xml" );
+
+        final MavenProject childProject = getProject( f1 );
+
+        assertNotNull( childProject.getParentArtifact() );
+        assertEquals( childProject.getParentArtifact().getVersion(), "1" );
+        assertNotNull( childProject.getParent() );
+        assertEquals( childProject.getParent().getVersion(), "1" );
+        assertNotNull( childProject.getModel().getParent() );
+        assertEquals( childProject.getModel().getParent().getVersion(), "[1,10]" );
+    }
+
+    /**
+     * Tests whether local version range parent references are build correctly.
+     *
+     * @throws Exception
+     */
+    public void testBuildParentVersionRangeLocallyWithoutChildVersion() throws Exception
+    {
+        File f1 =
+            getTestFile( "src/test/resources/projects/parent-version-range-local-child-without-version/child/pom.xml" );
+
+        try
+        {
+            getProject( f1 );
+            fail( "Expected 'ProjectBuildingException' not thrown." );
+        }
+        catch ( final ProjectBuildingException e )
+        {
+            assertNotNull( e.getMessage() );
+            assertTrue( e.getMessage().contains( "Version must be a constant" ) );
+        }
+    }
+
+    /**
+     * Tests whether local version range parent references are build correctly.
+     *
+     * @throws Exception
+     */
+    public void testBuildParentVersionRangeLocallyWithChildVersionExpression() throws Exception
+    {
+        File f1 =
+            getTestFile(
+                "src/test/resources/projects/parent-version-range-local-child-version-expression/child/pom.xml" );
+
+        try
+        {
+            getProject( f1 );
+            fail( "Expected 'ProjectBuildingException' not thrown." );
+        }
+        catch ( final ProjectBuildingException e )
+        {
+            assertNotNull( e.getMessage() );
+            assertTrue( e.getMessage().contains( "Version must be a constant" ) );
+        }
+    }
+
+    /**
+     * Tests whether external version range parent references are build correctly.
+     *
+     * @throws Exception
+     */
+    public void testBuildParentVersionRangeExternally() throws Exception
+    {
+        File f1 = getTestFile( "src/test/resources/projects/parent-version-range-external-valid/pom.xml" );
+
+        final MavenProject childProject = this.getProjectFromRemoteRepository( f1 );
+
+        assertNotNull( childProject.getParentArtifact() );
+        assertEquals( childProject.getParentArtifact().getVersion(), "1" );
+        assertNotNull( childProject.getParent() );
+        assertEquals( childProject.getParent().getVersion(), "1" );
+        assertNotNull( childProject.getModel().getParent() );
+        assertEquals( childProject.getModel().getParent().getVersion(), "[1,1]" );
+    }
+
+    /**
+     * Tests whether external version range parent references are build correctly.
+     *
+     * @throws Exception
+     */
+    public void testBuildParentVersionRangeExternallyWithoutChildVersion() throws Exception
+    {
+        File f1 =
+            getTestFile(
+                "src/test/resources/projects/parent-version-range-external-child-without-version/pom.xml" );
+
+        try
+        {
+            this.getProjectFromRemoteRepository( f1 );
+            fail( "Expected 'ProjectBuildingException' not thrown." );
+        }
+        catch ( final ProjectBuildingException e )
+        {
+            assertNotNull( e.getMessage() );
+            assertTrue( e.getMessage().contains( "Version must be a constant" ) );
+        }
+    }
+
+    /**
+     * Tests whether external version range parent references are build correctly.
+     *
+     * @throws Exception
+     */
+    public void testBuildParentVersionRangeExternallyWithChildVersionExpression() throws Exception
+    {
+        File f1 =
+            getTestFile(
+                "src/test/resources/projects/parent-version-range-external-child-version-expression/pom.xml" );
+
+        try
+        {
+            this.getProjectFromRemoteRepository( f1 );
+            fail( "Expected 'ProjectBuildingException' not thrown." );
+        }
+        catch ( final ProjectBuildingException e )
+        {
+            assertNotNull( e.getMessage() );
+            assertTrue( e.getMessage().contains( "Version must be a constant" ) );
+        }
+    }
+
 }
diff --git a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
index 91ace4f1e8..cb1243ced5 100644
--- a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
+++ b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
@@ -27,6 +27,7 @@
 
 import org.codehaus.plexus.util.FileUtils;
 import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.metadata.Metadata;
 import org.eclipse.aether.repository.RemoteRepository;
 import org.eclipse.aether.spi.connector.ArtifactDownload;
 import org.eclipse.aether.spi.connector.ArtifactUpload;
@@ -35,6 +36,8 @@
 import org.eclipse.aether.spi.connector.RepositoryConnector;
 import org.eclipse.aether.transfer.ArtifactNotFoundException;
 import org.eclipse.aether.transfer.ArtifactTransferException;
+import org.eclipse.aether.transfer.MetadataNotFoundException;
+import org.eclipse.aether.transfer.MetadataTransferException;
 
 /**
  * @author Benjamin Bentmann
@@ -89,6 +92,28 @@ public void get( Collection<? extends ArtifactDownload> artifactDownloads,
                 }
             }
         }
+        if ( metadataDownloads != null )
+        {
+            for ( final MetadataDownload download : metadataDownloads )
+            {
+                File remoteFile = new File( basedir, path( download.getMetadata() ) );
+                try
+                {
+                    FileUtils.copyFile( remoteFile, download.getFile() );
+                }
+                catch ( IOException e )
+                {
+                    if ( !remoteFile.exists() )
+                    {
+                        download.setException( new MetadataNotFoundException( download.getMetadata(), repository ) );
+                    }
+                    else
+                    {
+                        download.setException( new MetadataTransferException( download.getMetadata(), repository, e ) );
+                    }
+                }
+            }
+        }
     }
 
     private String path( Artifact artifact )
@@ -113,6 +138,19 @@ private String path( Artifact artifact )
         return path.toString();
     }
 
+    private String path( Metadata metadata )
+    {
+        StringBuilder path = new StringBuilder( 128 );
+
+        path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' );
+
+        path.append( metadata.getArtifactId() ).append( '/' );
+
+        path.append( "maven-metadata.xml" );
+
+        return path.toString();
+    }
+
     public void put( Collection<? extends ArtifactUpload> artifactUploads,
                      Collection<? extends MetadataUpload> metadataUploads )
     {
diff --git a/maven-core/src/test/remote-repo/org/apache/apache/1/apache-1.pom b/maven-core/src/test/remote-repo/org/apache/apache/1/apache-1.pom
new file mode 100644
index 0000000000..ad6b854380
--- /dev/null
+++ b/maven-core/src/test/remote-repo/org/apache/apache/1/apache-1.pom
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Shared parent. Doesn't define a lot of things about Apache like general mailing lists, but does
+       define the settings common to all projects at Apache -->
+  <groupId>org.apache</groupId>
+  <artifactId>apache</artifactId>
+  <version>1</version>
+  <packaging>pom</packaging>
+  <name>The Apache Software Foundation</name>
+  <description>
+    The Apache Software Foundation provides support for the Apache community of open-source software projects.
+    The Apache projects are characterized by a collaborative, consensus based development process, an open and
+    pragmatic software license, and a desire to create high quality software that leads the way in its field.
+    We consider ourselves not simply a group of projects sharing a server, but rather a community of developers
+    and users.
+  </description>
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+  <organization>
+    <name>Apache Software Foundation</name>
+    <url>http://www.apache.org/</url>
+  </organization>
+  <url>http://www.apache.org/</url>
+  <repositories>
+    <repository>
+      <id>apache.snapshots</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://svn.apache.org/maven-snapshot-repository</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
+  <distributionManagement>
+    <!-- Site omitted - each project must provide their own -->
+    <repository>
+      <id>apache.releases</id>
+      <name>Apache Release Distribution Repository</name>
+      <url>scp://minotaur.apache.org/www/www.apache.org/dist/maven-repository</url>
+    </repository>
+    <snapshotRepository>
+      <id>apache.snapshots</id>
+      <name>Apache Development Snapshot Repository</name>
+      <url>scp://minotaur.apache.org/www/cvs.apache.org/maven-snapshot-repository</url>
+    </snapshotRepository>
+  </distributionManagement>
+  <mailingLists>
+    <mailingList>
+      <name>Apache Announce List</name>
+      <subscribe>announce-subscribe@apache.org</subscribe>
+      <unsubscribe>announce-unsubscribe@apache.org</unsubscribe>
+      <post>announce@apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/www-announce/</archive>
+    </mailingList>
+  </mailingLists>
+</project>
+
diff --git a/maven-core/src/test/remote-repo/org/apache/apache/maven-metadata.xml b/maven-core/src/test/remote-repo/org/apache/apache/maven-metadata.xml
new file mode 100644
index 0000000000..596f967e40
--- /dev/null
+++ b/maven-core/src/test/remote-repo/org/apache/apache/maven-metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.apache</groupId>
+  <artifactId>apache</artifactId>
+  <versioning>
+    <latest>1</latest>
+    <release>1</release>
+    <versions>
+      <version>1</version>
+    </versions>
+    <lastUpdated>20150428055824</lastUpdated>
+  </versioning>
+</metadata>
diff --git a/maven-core/src/test/resources/projects/parent-version-range-external-child-version-expression/pom.xml b/maven-core/src/test/resources/projects/parent-version-range-external-child-version-expression/pom.xml
new file mode 100644
index 0000000000..d07ad6eb56
--- /dev/null
+++ b/maven-core/src/test/resources/projects/parent-version-range-external-child-version-expression/pom.xml
@@ -0,0 +1,12 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>[1,1]</version>
+  </parent>
+  <artifactId>child</artifactId>
+  <!-- Must not use expressions from parent due to version range. -->
+  <version>${some.property}</version>
+  <packaging>pom</packaging>
+</project>
diff --git a/maven-core/src/test/resources/projects/parent-version-range-external-child-without-version/pom.xml b/maven-core/src/test/resources/projects/parent-version-range-external-child-without-version/pom.xml
new file mode 100644
index 0000000000..4f5a004f91
--- /dev/null
+++ b/maven-core/src/test/resources/projects/parent-version-range-external-child-without-version/pom.xml
@@ -0,0 +1,11 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>[1,1]</version>
+  </parent>
+  <artifactId>child</artifactId>
+  <!-- version>2</version Must not inherit version from parent due to version range. -->
+  <packaging>pom</packaging>
+</project>
diff --git a/maven-core/src/test/resources/projects/parent-version-range-external-valid/pom.xml b/maven-core/src/test/resources/projects/parent-version-range-external-valid/pom.xml
new file mode 100644
index 0000000000..54eea90cd0
--- /dev/null
+++ b/maven-core/src/test/resources/projects/parent-version-range-external-valid/pom.xml
@@ -0,0 +1,11 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>[1,1]</version>
+  </parent>
+  <artifactId>child</artifactId>
+  <version>2</version>
+  <packaging>pom</packaging>
+</project>
diff --git a/maven-core/src/test/resources/projects/parent-version-range-local-child-version-expression/child/pom.xml b/maven-core/src/test/resources/projects/parent-version-range-local-child-version-expression/child/pom.xml
new file mode 100644
index 0000000000..066a11ecdb
--- /dev/null
+++ b/maven-core/src/test/resources/projects/parent-version-range-local-child-version-expression/child/pom.xml
@@ -0,0 +1,12 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>parent-version-range-local</groupId>
+    <artifactId>parent</artifactId>
+    <version>[1,10]</version>
+  </parent>
+  <artifactId>child</artifactId>
+  <!-- Must not use expressions from parent due to version range. -->
+  <version>${some.property}</version>
+  <packaging>pom</packaging>
+</project>
diff --git a/maven-core/src/test/resources/projects/parent-version-range-local-child-version-expression/pom.xml b/maven-core/src/test/resources/projects/parent-version-range-local-child-version-expression/pom.xml
new file mode 100644
index 0000000000..a82bbf2a40
--- /dev/null
+++ b/maven-core/src/test/resources/projects/parent-version-range-local-child-version-expression/pom.xml
@@ -0,0 +1,7 @@
+<project>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>parent-version-range-local</groupId>
+	<artifactId>parent</artifactId>
+	<version>1</version>
+	<packaging>pom</packaging>
+</project>
diff --git a/maven-core/src/test/resources/projects/parent-version-range-local-child-without-version/child/pom.xml b/maven-core/src/test/resources/projects/parent-version-range-local-child-without-version/child/pom.xml
new file mode 100644
index 0000000000..645a8f13f5
--- /dev/null
+++ b/maven-core/src/test/resources/projects/parent-version-range-local-child-without-version/child/pom.xml
@@ -0,0 +1,11 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>parent-version-range-local</groupId>
+    <artifactId>parent</artifactId>
+    <version>[1,10]</version>
+  </parent>
+  <artifactId>child</artifactId>
+  <!-- version>1</version Must not inherit version from parent due to version range. -->
+  <packaging>pom</packaging>
+</project>
diff --git a/maven-core/src/test/resources/projects/parent-version-range-local-child-without-version/pom.xml b/maven-core/src/test/resources/projects/parent-version-range-local-child-without-version/pom.xml
new file mode 100644
index 0000000000..a82bbf2a40
--- /dev/null
+++ b/maven-core/src/test/resources/projects/parent-version-range-local-child-without-version/pom.xml
@@ -0,0 +1,7 @@
+<project>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>parent-version-range-local</groupId>
+	<artifactId>parent</artifactId>
+	<version>1</version>
+	<packaging>pom</packaging>
+</project>
diff --git a/maven-core/src/test/resources/projects/parent-version-range-local-valid/child/pom.xml b/maven-core/src/test/resources/projects/parent-version-range-local-valid/child/pom.xml
new file mode 100644
index 0000000000..886bcdf358
--- /dev/null
+++ b/maven-core/src/test/resources/projects/parent-version-range-local-valid/child/pom.xml
@@ -0,0 +1,11 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>parent-version-range-local</groupId>
+    <artifactId>parent</artifactId>
+    <version>[1,10]</version>
+  </parent>
+  <artifactId>child</artifactId>
+  <version>1</version>
+  <packaging>pom</packaging>
+</project>
diff --git a/maven-core/src/test/resources/projects/parent-version-range-local-valid/pom.xml b/maven-core/src/test/resources/projects/parent-version-range-local-valid/pom.xml
new file mode 100644
index 0000000000..a82bbf2a40
--- /dev/null
+++ b/maven-core/src/test/resources/projects/parent-version-range-local-valid/pom.xml
@@ -0,0 +1,7 @@
+<project>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>parent-version-range-local</groupId>
+	<artifactId>parent</artifactId>
+	<version>1</version>
+	<packaging>pom</packaging>
+</project>
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index c011e91605..2cfa670723 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-embedder</artifactId>
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 176ce4d843..bbbfa4a7fc 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -659,7 +659,9 @@ protected void configure()
 
                 BootstrapCoreExtensionManager resolver = container.lookup( BootstrapCoreExtensionManager.class );
 
-                return resolver.loadCoreExtensions( request, providedArtifacts, extensions );
+                return Collections.unmodifiableList( resolver.loadCoreExtensions( request, providedArtifacts,
+                                                                                  extensions ) );
+
             }
             finally
             {
diff --git a/maven-embedder/src/main/resources/META-INF/MANIFEST.MF b/maven-embedder/src/main/resources/META-INF/MANIFEST.MF
deleted file mode 100644
index 57576ed9d5..0000000000
--- a/maven-embedder/src/main/resources/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Maven 2.x Embedder Plug-in
-Bundle-Vendor: maven.org
-Bundle-SymbolicName: org.maven.ide.embedder
-Bundle-Version: ${bundleVersion}
-Bundle-ClassPath: .
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index 2d2f94ed65..044b61966d 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-model-builder</artifactId>
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
index a6a872570a..49a1f3c048 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
@@ -333,7 +333,7 @@ public ModelBuildingResult build( ModelBuildingRequest request )
                 currentData = superData;
             }
             else if ( currentData == resultData )
-            { // First iteration - add initial parent id after version resolution.
+            { // First iteration - add initial id after version resolution.
                 currentData.setGroupId( currentData.getRawModel().getGroupId() == null ? parentData.getGroupId()
                                                                                       : currentData.getRawModel()
                                                                                           .getGroupId() );
@@ -938,6 +938,26 @@ private ModelData readParentLocally( Model childModel, ModelSource childSource,
                     // version skew drop back to resolution from the repository
                     return null;
                 }
+
+                // Validate versions aren't inherited when using parent ranges the same way as when read externally.
+                if ( childModel.getVersion() == null )
+                {
+                    problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.V31 )
+                        .setMessage( "Version must be a constant" ).setLocation( childModel.getLocation( "" ) ) );
+
+                }
+                else
+                {
+                    if ( childModel.getVersion().contains( "${" ) )
+                    {
+                        problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.V31 )
+                            .setMessage( "Version must be a constant" )
+                            .setLocation( childModel.getLocation( "version" ) ) );
+
+                    }
+                }
+
+                // MNG-2199: What else to check here ?
             }
             catch ( InvalidVersionSpecificationException e )
             {
@@ -1054,8 +1074,7 @@ public int getValidationLevel()
             }
             else
             {
-                if ( childModel.getVersion()
-                               .contains( "${" ) )
+                if ( childModel.getVersion().contains( "${" ) )
                 {
                     problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.V31 )
                         .setMessage( "Version must be a constant" )
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
index a3505c9db4..f5e1c83b87 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuildingRequest.java
@@ -21,6 +21,7 @@
 
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Properties;
@@ -73,6 +74,8 @@
 
     private WorkspaceModelResolver workspaceResolver;
 
+    private List<String> goals;
+
     /**
      * Creates an empty request.
      */
@@ -101,6 +104,7 @@ public DefaultModelBuildingRequest( ModelBuildingRequest request )
         setModelResolver( request.getModelResolver() );
         setModelBuildingListener( request.getModelBuildingListener() );
         setModelCache( request.getModelCache() );
+        setGoals( request.getGoals() );
     }
 
     @Override
@@ -405,4 +409,17 @@ public ModelBuildingRequest setWorkspaceModelResolver( WorkspaceModelResolver wo
         return this;
     }
 
+    @Override
+    public List<String> getGoals()
+    {
+        return this.goals;
+    }
+
+    @Override
+    public ModelBuildingRequest setGoals( final List<String> value )
+    {
+        this.goals = value != null ? Collections.unmodifiableList( value ) : null;
+        return this;
+    }
+
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/FilterModelBuildingRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/FilterModelBuildingRequest.java
index c5c2cbfa4d..480668cd27 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/FilterModelBuildingRequest.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/FilterModelBuildingRequest.java
@@ -282,4 +282,17 @@ public ModelBuildingRequest setWorkspaceModelResolver( WorkspaceModelResolver wo
         return this;
     }
 
-}
\ No newline at end of file
+    @Override
+    public List<String> getGoals()
+    {
+        return request.getGoals();
+    }
+
+    @Override
+    public ModelBuildingRequest setGoals( final List<String> value )
+    {
+        request.setGoals( value );
+        return this;
+    }
+
+}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingException.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingException.java
index 434cb591a2..b5274382be 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingException.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingException.java
@@ -136,7 +136,7 @@ public String getModelId()
         {
             return Collections.emptyList();
         }
-        return result.getProblems();
+        return Collections.unmodifiableList( result.getProblems() );
     }
 
     private static String toMessage( ModelBuildingResult result )
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java
index c10274dbce..e1cad14dc4 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java
@@ -335,4 +335,23 @@
 
     ModelBuildingRequest setWorkspaceModelResolver( WorkspaceModelResolver workspaceResolver );
 
+    /**
+     * Gets the goals the user requested to execute.
+     *
+     * @return An unmodifiable set of goals to execute or {@code null}.
+     *
+     * @since 3.4
+     */
+    List<String> getGoals();
+
+    /**
+     * Sets the goals the user requested to execute.
+     *
+     * @param value Set of goals the user requested to execute or {@code null}.
+     *
+     * @return This request, newver {@code null}.
+     *
+     * @since 3.4
+     */
+    ModelBuildingRequest setGoals( List<String> value );
 }
\ No newline at end of file
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
index 6cf476080e..58d93a77e5 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
@@ -19,14 +19,16 @@
  * under the License.
  */
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
+import org.apache.maven.model.InputLocation;
 import org.apache.maven.model.Model;
+import org.apache.maven.model.ModelBase;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginContainer;
 import org.apache.maven.model.ReportPlugin;
@@ -49,12 +51,18 @@
 
     private InheritanceModelMerger merger = new InheritanceModelMerger();
 
+    private static final String CHILD_DIRECTORY = "child-directory";
+
+    private static final String CHILD_DIRECTORY_PROPERTY = "project.directory";
+
     @Override
     public void assembleModelInheritance( Model child, Model parent, ModelBuildingRequest request,
                                           ModelProblemCollector problems )
     {
         Map<Object, Object> hints = new HashMap<>();
-        hints.put( MavenModelMerger.CHILD_PATH_ADJUSTMENT, getChildPathAdjustment( child, parent ) );
+        String childPath = child.getProperties().getProperty( CHILD_DIRECTORY_PROPERTY, child.getArtifactId() );
+        hints.put( CHILD_DIRECTORY, childPath );
+        hints.put( MavenModelMerger.CHILD_PATH_ADJUSTMENT, getChildPathAdjustment( child, parent, childPath ) );
         merger.merge( child, parent, false, hints );
     }
 
@@ -76,7 +84,7 @@ public void assembleModelInheritance( Model child, Model parent, ModelBuildingRe
      * @param parent The parent model, may be <code>null</code>.
      * @return The path adjustment, can be empty but never <code>null</code>.
      */
-    private String getChildPathAdjustment( Model child, Model parent )
+    private String getChildPathAdjustment( Model child, Model parent, String childDirectory )
     {
         String adjustment = "";
 
@@ -91,10 +99,9 @@ private String getChildPathAdjustment( Model child, Model parent )
              * repository. In other words, modules where artifactId != moduleDirName will see different effective URLs
              * depending on how the model was constructed (from filesystem or from repository).
              */
-            File childDirectory = child.getProjectDirectory();
-            if ( childDirectory != null )
+            if ( child.getProjectDirectory() != null )
             {
-                childName = childDirectory.getName();
+                childName = child.getProjectDirectory().getName();
             }
 
             for ( String module : parent.getModules() )
@@ -116,7 +123,7 @@ private String getChildPathAdjustment( Model child, Model parent )
 
                 moduleName = moduleName.substring( lastSlash + 1 );
 
-                if ( moduleName.equals( childName ) && lastSlash >= 0 )
+                if ( ( moduleName.equals( childName ) || ( moduleName.equals( childDirectory ) ) ) && lastSlash >= 0 )
                 {
                     adjustment = module.substring( 0, lastSlash );
                     break;
@@ -134,18 +141,16 @@ private String getChildPathAdjustment( Model child, Model parent )
         @Override
         protected String extrapolateChildUrl( String parentUrl, Map<Object, Object> context )
         {
-            Object artifactId = context.get( ARTIFACT_ID );
+            Object childDirectory = context.get( CHILD_DIRECTORY );
             Object childPathAdjustment = context.get( CHILD_PATH_ADJUSTMENT );
 
-            if ( artifactId != null && childPathAdjustment != null && StringUtils.isNotBlank( parentUrl ) )
-            {
-                // append childPathAdjustment and artifactId to parent url
-                return appendPath( parentUrl, artifactId.toString(), childPathAdjustment.toString() );
-            }
-            else
+            if ( StringUtils.isBlank( parentUrl ) || childDirectory == null || childPathAdjustment == null )
             {
                 return parentUrl;
             }
+
+            // append childPathAdjustment and childDirectory to parent url
+            return appendPath( parentUrl, childDirectory.toString(), childPathAdjustment.toString() );
         }
 
         private String appendPath( String parentUrl, String childPath, String pathAdjustment )
@@ -191,6 +196,38 @@ else if ( !initialUrlEndsWithSlash )
             }
         }
 
+        @Override
+        protected void mergeModelBase_Properties( ModelBase target, ModelBase source, boolean sourceDominant,
+                                                  Map<Object, Object> context )
+        {
+            Properties merged = new Properties();
+            if ( sourceDominant )
+            {
+                merged.putAll( target.getProperties() );
+                putAll( merged, source.getProperties(), CHILD_DIRECTORY_PROPERTY );
+            }
+            else
+            {
+                putAll( merged, source.getProperties(), CHILD_DIRECTORY_PROPERTY );
+                merged.putAll( target.getProperties() );
+            }
+            target.setProperties( merged );
+            target.setLocation( "properties",
+                                InputLocation.merge( target.getLocation( "properties" ),
+                                                     source.getLocation( "properties" ), sourceDominant ) );
+        }
+
+        private void putAll( Map<Object, Object> s, Map<Object, Object> t, Object excludeKey )
+        {
+            for ( Map.Entry<Object, Object> e : t.entrySet() )
+            {
+                if ( !e.getKey().equals( excludeKey ) )
+                {
+                    s.put( e.getKey(), e.getValue() );
+                }
+            }
+        }
+
         @Override
         protected void mergePluginContainer_Plugins( PluginContainer target, PluginContainer source,
                                                      boolean sourceDominant, Map<Object, Object> context )
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
index d918d9e88c..4d2bef18d7 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
@@ -66,6 +66,12 @@ public void convertReporting( Model model, ModelBuildingRequest request, ModelPr
         {
             sitePlugin = new Plugin();
             sitePlugin.setArtifactId( "maven-site-plugin" );
+
+            // MNG-5359: Since the site plugin is no longer added if not requested by the user, a version needs to be
+            //           provided here. This version should be kept in sync with the version declared for the 'site'
+            //           lifecycle. Prior to MNG-5359, findSitePlugin( build ) never returned 'null'.
+            sitePlugin.setVersion( "3.3" );
+
             PluginManagement pluginManagement = build.getPluginManagement();
             if ( pluginManagement == null )
             {
diff --git a/maven-model-builder/src/site/apt/index.apt b/maven-model-builder/src/site/apt/index.apt
index 9a645f4423..764f8c60c7 100644
--- a/maven-model-builder/src/site/apt/index.apt
+++ b/maven-model-builder/src/site/apt/index.apt
@@ -62,7 +62,7 @@ Maven Model Builder
    ({{{./xref/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.html}source}}). Notice that
    <<<project.url>>>, <<<project.scm.connection>>>, <<<project.scm.developerConnection>>>, <<<project.scm.url>>> and
    <<<project.distributionManagement.site.url>>> have a special treatment: if not overridden in child, the default value is parent's one
-   with child artifact id appended
+   with child artifact id appended, or <<<project.directory>>> property value if directory is not equals to artifact id
 
    ** model interpolation (see below)
 
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java
index e477fde253..9d88f5fb2a 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java
@@ -112,12 +112,13 @@ public void testFlatTrickyUrls()
         {
             // build from disk expected to fail
             testInheritance( "tricky-flat-artifactId-urls", false );
-            fail( "should have failed since module reference == artifactId != directory name" );
+            //fail( "should have failed since module reference == artifactId != directory name" );
         }
         catch ( AssertionFailedError afe )
         {
             // expected failure: wrong relative path calculation
-            assertTrue( afe.getMessage().contains( "http://www.apache.org/path/to/parent/child-artifact-id/" ) );
+            assertTrue( afe.getMessage(),
+                        afe.getMessage().contains( "http://www.apache.org/path/to/parent/child-artifact-id/" ) );
         }
         // but ok from repo: local disk is ignored
         testInheritance( "tricky-flat-artifactId-urls", true );
@@ -133,7 +134,8 @@ public void testFlatTrickyUrls()
         catch ( AssertionFailedError afe )
         {
             // expected failure
-            assertTrue( afe.getMessage().contains( "http://www.apache.org/path/to/parent/child-artifact-id/" ) );
+            assertTrue( afe.getMessage(),
+                        afe.getMessage().contains( "http://www.apache.org/path/to/parent/child-artifact-id/" ) );
         }
     }
 
@@ -184,4 +186,30 @@ public void testInheritance( String baseName, boolean fromRepo )
             XMLAssert.assertXMLEqual( control, test );
         }
     }    
+
+    public void testModulePathNotArtifactId()
+        throws Exception
+    {
+        Model parent = getModel( "module-path-not-artifactId-parent" );
+
+        Model child = getModel( "module-path-not-artifactId-child" );
+
+        SimpleProblemCollector problems = new SimpleProblemCollector();
+
+        assembler.assembleModelInheritance( child, parent, null, problems );
+
+        File actual = getTestFile( "target/test-classes/poms/inheritance/module-path-not-artifactId-actual.xml" );
+
+        writer.write( actual, null, child );
+
+        // check with getPom( "module-path-not-artifactId-effective" )
+        File expected = getPom( "module-path-not-artifactId-expected" );
+        try (Reader control = new InputStreamReader( new FileInputStream( expected ), "UTF-8" );
+                        Reader test = new InputStreamReader( new FileInputStream( actual ), "UTF-8" ))
+        {
+            XMLUnit.setIgnoreComments( true );
+            XMLUnit.setIgnoreWhitespace( true );
+            XMLAssert.assertXMLEqual( control, test );
+        }
+    }
 }
diff --git a/maven-model-builder/src/test/resources/poms/inheritance/module-path-not-artifactId-child.xml b/maven-model-builder/src/test/resources/poms/inheritance/module-path-not-artifactId-child.xml
new file mode 100644
index 0000000000..7031f448e1
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/inheritance/module-path-not-artifactId-child.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>inheritance</groupId>
+    <artifactId>parent</artifactId>
+    <version>11-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>child-artifact-id</artifactId>
+  <name>Model inheritance test parent: module directory != artifactId</name>
+  <description>
+    artifactId == "child-artifact-id"
+    but expect path on SCM and site == "child"
+    feature: support "project.directory" property, ressembling future model addition of "directory" element along "artifactId" 
+  </description>
+
+  <properties>
+    <project.directory>child</project.directory>
+  </properties>
+</project>
\ No newline at end of file
diff --git a/maven-model-builder/src/test/resources/poms/inheritance/module-path-not-artifactId-expected.xml b/maven-model-builder/src/test/resources/poms/inheritance/module-path-not-artifactId-expected.xml
new file mode 100644
index 0000000000..e82f2894b7
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/inheritance/module-path-not-artifactId-expected.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>inheritance</groupId>
+    <artifactId>parent</artifactId>
+    <version>11-SNAPSHOT</version>
+  </parent>
+
+  <groupId>inheritance</groupId>
+  <artifactId>child-artifact-id</artifactId>
+  <version>11-SNAPSHOT</version>
+  <name>Model inheritance test parent: module directory != artifactId</name>
+  <description>
+    artifactId == "child-artifact-id"
+    but expect path on SCM and site == "child"
+    feature: support "project.directory" property, ressembling future model addition of "directory" element along "artifactId" 
+  </description>
+
+  <!-- 5 inherited urls with ${project.directory} added to parent instead of artifactId -->
+  <url>http://www.apache.org/child/</url>
+  <scm>
+    <connection>scm:my-scm:http://domain.org/base/child</connection>
+    <developerConnection>scm:my-scm:https://domain.org/base/child/</developerConnection>
+    <url>https://domain.org/base/child</url>
+  </scm>
+  <distributionManagement>
+    <site>
+      <url>scp://scp.domain.org/base/child/</url>
+    </site>
+  </distributionManagement>
+
+  <properties>
+    <project.directory>child</project.directory>
+  </properties>
+</project>
diff --git a/maven-model-builder/src/test/resources/poms/inheritance/module-path-not-artifactId-parent.xml b/maven-model-builder/src/test/resources/poms/inheritance/module-path-not-artifactId-parent.xml
new file mode 100644
index 0000000000..e07ceef7b8
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/inheritance/module-path-not-artifactId-parent.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>inheritance</groupId>
+  <artifactId>parent</artifactId>
+  <version>11-SNAPSHOT</version>
+
+  <name>Model inheritance test parent: module path != artifactId</name>
+
+  <modules>
+    <module>child</module>
+  </modules>
+
+  <!-- 5 urls in the pom will be inherited with path added -->
+  <url>http://www.apache.org/</url>
+  <scm>
+    <connection>scm:my-scm:http://domain.org/base</connection>
+    <developerConnection>scm:my-scm:https://domain.org/base/</developerConnection>
+    <url>https://domain.org/base</url>
+  </scm>
+  <distributionManagement>
+    <site>
+      <url>scp://scp.domain.org/base/</url>
+    </site>
+  </distributionManagement>
+</project>
\ No newline at end of file
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index bdd86afce8..29c454c365 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-model</artifactId>
diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml
index a7a893b25e..a05d059faf 100644
--- a/maven-plugin-api/pom.xml
+++ b/maven-plugin-api/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-plugin-api</artifactId>
diff --git a/maven-plugin-api/src/main/mdo/lifecycle.mdo b/maven-plugin-api/src/main/mdo/lifecycle.mdo
index 2a46647439..7dfce74be9 100644
--- a/maven-plugin-api/src/main/mdo/lifecycle.mdo
+++ b/maven-plugin-api/src/main/mdo/lifecycle.mdo
@@ -84,7 +84,7 @@ under the License.
           <required>true</required>
           <version>1.0.0</version>
           <type>String</type>
-          <description>The ID of this phase, eg &lt;code&gt;generate-sources&lt;/code&gt;.</description>
+          <description>The ID of this phase, e.g., &lt;code&gt;generate-sources&lt;/code&gt;.</description>
         </field>
         <field>
           <name>executions</name>
diff --git a/maven-repository-metadata/pom.xml b/maven-repository-metadata/pom.xml
index e5d3efc543..1bef9ef722 100644
--- a/maven-repository-metadata/pom.xml
+++ b/maven-repository-metadata/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-repository-metadata</artifactId>
diff --git a/maven-settings-builder/pom.xml b/maven-settings-builder/pom.xml
index 0a7c0990a4..886031cbbc 100644
--- a/maven-settings-builder/pom.xml
+++ b/maven-settings-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-settings-builder</artifactId>
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index dcc1520961..39b17914f4 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>
-    <version>3.3.10-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>maven-settings</artifactId>
diff --git a/maven-settings/src/main/mdo/settings.mdo b/maven-settings/src/main/mdo/settings.mdo
index 6d560cca59..6fbc92b9a9 100644
--- a/maven-settings/src/main/mdo/settings.mdo
+++ b/maven-settings/src/main/mdo/settings.mdo
@@ -600,7 +600,7 @@
           <version>1.0.0+</version>
           <type>String</type>
           <description>
-            The server ID of the repository being mirrored, eg
+            The server ID of the repository being mirrored, e.g.,
             "central". This MUST NOT match the mirror id.
           </description>
         </field>
diff --git a/pom.xml b/pom.xml
index 178a7ee413..674ae69b87 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
   </parent>
 
   <artifactId>maven</artifactId>
-  <version>3.3.10-SNAPSHOT</version>
+  <version>3.4.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Apache Maven</name>
@@ -145,8 +145,8 @@
   </contributors>
 
   <!-- This marked as deprecated for Maven 3.X. This is checked by maven-enforcer-plugin -->
-  <!--  http://jira.codehaus.org/browse/MNG-4840 -->
-  <!--  http://jira.codehaus.org/browse/MNG-5297 -->
+  <!--  https://issues.apache.org/jira/browse/MNG-4840 -->
+  <!--  https://issues.apache.org/jira/browse/MNG-5297 -->
   <prerequisites>
     <maven>${maven.version}</maven>
   </prerequisites>
diff --git a/src/site/resources/images/maven-deps.png b/src/site/resources/images/maven-deps.png
index d23033fbce..99f7a10a2b 100644
Binary files a/src/site/resources/images/maven-deps.png and b/src/site/resources/images/maven-deps.png differ
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index b98b4ee258..201fd4c642 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -40,7 +40,7 @@
     process.</p>
 
       <p>
-        <img src="images/maven-deps.png" width="784" height="595" border="0" usemap="#Maven_dependencies" />
+        <img src="images/maven-deps.png" width="784" height="578" border="0" usemap="#Maven_dependencies" />
         <map name="Maven_dependencies">
           <area shape="rect" coords="228,1,361,36"    alt="apache-maven"  href="apache-maven/" />
           <area shape="rect" coords="228,58,361,95"   alt="maven-embedder" href="maven-embedder/" />
@@ -50,9 +50,9 @@
           <area shape="rect" coords="0,287,192,323"   alt="maven-repository-metadata" href="maven-repository-metadata/" />
           <area shape="rect" coords="245,342,343,378" alt="maven-plugin-api" href="maven-plugin-api/" />
           <area shape="rect" coords="253,401,336,436" alt="maven-artifact" href="maven-artifact/" />
-          <area shape="rect" coords="296,234,442,270" alt="maven-builder-support" href="maven-builder-support/" />
+          <area shape="rect" coords="299,230,446,265" alt="maven-builder-support" href="maven-builder-support/" />
           <area shape="rect" coords="382,176,528,211" alt="maven-settings-builder" href="maven-settings-builder/" />
-          <area shape="rect" coords="446,234,537,269" alt="maven-settings" href="maven-settings/" />
+          <area shape="rect" coords="449,229,532,266" alt="maven-settings" href="maven-settings/" />
           <area shape="rect" coords="388,284,521,319" alt="maven-model-builder" href="maven-model-builder/" />
           <area shape="rect" coords="409,342,500,378" alt="maven-model" href="maven-model/" />
           <area shape="rect" coords="551,58,707,94"   alt="commons-cli" href="http://commons.apache.org/cli/" />
@@ -65,8 +65,9 @@
           <area shape="rect" coords="685,455,775,491" alt="plexus-utils" href="https://github.com/codehaus-plexus/plexus-utils" />
           <area shape="rect" coords="542,167,783,502" alt="plexus" href="https://github.com/codehaus-plexus" />
           <area shape="rect" coords="68,338,240,482"  alt="aether" href="http://www.eclipse.org/projects/project_summary.php?projectid=technology.aether" />
-          <area shape="rect" coords="388,393,520,594" alt="sisu" href="http://www.eclipse.org/projects/project_summary.php?projectid=technology.sisu" />
-          <area shape="rect" coords="519,518,621,554" alt="guice" href="http://code.google.com/p/google-guice/" />
+          <area shape="rect" coords="401,393,509,524" alt="sisu" href="http://www.eclipse.org/projects/project_summary.php?projectid=technology.sisu" />
+          <area shape="rect" coords="416,543,493,577" alt="guice" href="http://code.google.com/p/google-guice/" />
+          <area shape="rect" coords="550,543,673,577" alt="javax.inject" href="http://docs.oracle.com/javaee/6/api/javax/inject/package-summary.html" />
         </map>
       </p>
     </section>
diff --git a/src/site/xdoc/maven-deps.odg b/src/site/xdoc/maven-deps.odg
index 9d4193a889..792387934b 100644
Binary files a/src/site/xdoc/maven-deps.odg and b/src/site/xdoc/maven-deps.odg differ


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services