diff --git a/maven-core-integration-tests/src/test/resources/it0065/plugin/pom.xml b/maven-core-integration-tests/src/test/resources/it0065/plugin/pom.xml
new file mode 100644
index 0000000000..ad6b0e2e34
--- /dev/null
+++ b/maven-core-integration-tests/src/test/resources/it0065/plugin/pom.xml
@@ -0,0 +1,34 @@
+
+ 4.0.0
+
+ org.apache.maven.it
+ maven-core-it0065
+ 1.0
+
+ maven-it0065-plugin
+ maven-plugin
+ 1.0-SNAPSHOT
+
+
+ org.apache.maven
+ maven-plugin-api
+ 2.0-beta-1
+ jar
+ compile
+
+
+ junit
+ junit
+ 3.8.1
+ jar
+ test
+
+
+
+
+ central
+ Test Repository
+ file:/tmp/testRepo
+
+
+
diff --git a/maven-core-integration-tests/src/test/resources/it0065/plugin/src/main/java/org/apache/maven/plugin/coreit/TestBasedirMojo.java b/maven-core-integration-tests/src/test/resources/it0065/plugin/src/main/java/org/apache/maven/plugin/coreit/TestBasedirMojo.java
new file mode 100644
index 0000000000..df031c708a
--- /dev/null
+++ b/maven-core-integration-tests/src/test/resources/it0065/plugin/src/main/java/org/apache/maven/plugin/coreit/TestBasedirMojo.java
@@ -0,0 +1,76 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * Copyright 2001-2004 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.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * @goal test-basedir
+ * @phase compile
+ */
+public class TestBasedirMojo
+ extends AbstractMojo
+{
+ private static final int DELETE_RETRY_SLEEP_MILLIS = 10;
+
+ /**
+ * @parameter expression="${basedir}/target/child-basedir"
+ * @required
+ */
+ private String childBasedir;
+
+ /**
+ * @parameter expression="${project.parent.basedir}/parent-basedir"
+ * @required
+ */
+ private String parentBasedir;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ write( new File( childBasedir ) );
+
+ write( new File( parentBasedir ) );
+ }
+
+ private void write( File f )
+ throws MojoExecutionException
+ {
+ if ( !f.getParentFile().exists() )
+ {
+ f.getParentFile().mkdirs();
+ }
+
+ try
+ {
+ FileWriter w = new FileWriter( f );
+
+ w.write( f.getPath() );
+
+ w.close();
+ }
+ catch ( IOException e )
+ {
+ throw new MojoExecutionException( "Error writing verification file.", e );
+ }
+ }
+}
diff --git a/maven-core-integration-tests/src/test/resources/it0065/pom.xml b/maven-core-integration-tests/src/test/resources/it0065/pom.xml
new file mode 100644
index 0000000000..a0e7f75898
--- /dev/null
+++ b/maven-core-integration-tests/src/test/resources/it0065/pom.xml
@@ -0,0 +1,22 @@
+
+ 4.0.0
+ org.apache.maven.it
+ maven-core-it0065
+ Test that the basedir of the parent is set correctly.
+ pom
+ 1.0
+
+
+ junit
+ junit
+ 3.8.1
+ jar
+ test
+
+
+
+
+ plugin
+ subproject
+
+
diff --git a/maven-core-integration-tests/src/test/resources/it0065/subproject/pom.xml b/maven-core-integration-tests/src/test/resources/it0065/subproject/pom.xml
new file mode 100644
index 0000000000..5678f2f109
--- /dev/null
+++ b/maven-core-integration-tests/src/test/resources/it0065/subproject/pom.xml
@@ -0,0 +1,28 @@
+
+ 4.0.0
+
+ org.apache.maven.it
+ maven-core-it0065
+ 1.0
+
+ maven-core-it0065-subproject
+ jar
+ 1.0
+
+
+
+
+ org.apache.maven.it
+ maven-it0065-plugin
+ 1.0-SNAPSHOT
+
+
+
+ test-basedir
+
+
+
+
+
+
+
diff --git a/maven-core-integration-tests/src/test/resources/it0065/subproject/src/main/java/org/apache/maven/it0001/Person.java b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/main/java/org/apache/maven/it0001/Person.java
new file mode 100644
index 0000000000..613e499ae0
--- /dev/null
+++ b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/main/java/org/apache/maven/it0001/Person.java
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+public class Person
+{
+ private String name;
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
diff --git a/maven-core-integration-tests/src/test/resources/it0065/subproject/src/main/resources/it0001.properties b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/main/resources/it0001.properties
new file mode 100644
index 0000000000..f54f8ab106
--- /dev/null
+++ b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/main/resources/it0001.properties
@@ -0,0 +1 @@
+name = jason
diff --git a/maven-core-integration-tests/src/test/resources/it0065/subproject/src/test/java/org/apache/maven/it0001/PersonTest.java b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/test/java/org/apache/maven/it0001/PersonTest.java
new file mode 100644
index 0000000000..80014fa03b
--- /dev/null
+++ b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/test/java/org/apache/maven/it0001/PersonTest.java
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+import junit.framework.TestCase;
+
+public class PersonTest
+ extends TestCase
+{
+ public void testPerson()
+ {
+ Person person = new Person();
+
+ person.setName( "foo" );
+
+ assertEquals( "foo", person.getName() );
+ }
+}
diff --git a/maven-core-integration-tests/src/test/resources/it0065/subproject/src/test/java/org/apache/maven/it0001/PersonThreeTest.java b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/test/java/org/apache/maven/it0001/PersonThreeTest.java
new file mode 100644
index 0000000000..f1b23a1f41
--- /dev/null
+++ b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/test/java/org/apache/maven/it0001/PersonThreeTest.java
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+import junit.framework.TestCase;
+
+public class PersonThreeTest
+ extends TestCase
+{
+ public void testPerson()
+ {
+ Person person = new Person();
+
+ person.setName( "foo" );
+
+ assertEquals( "foo", person.getName() );
+ }
+}
diff --git a/maven-core-integration-tests/src/test/resources/it0065/subproject/src/test/java/org/apache/maven/it0001/PersonTwoTest.java b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
new file mode 100644
index 0000000000..ccec93c557
--- /dev/null
+++ b/maven-core-integration-tests/src/test/resources/it0065/subproject/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+import junit.framework.TestCase;
+
+public class PersonTwoTest
+ extends TestCase
+{
+ public void testPerson()
+ {
+ Person person = new Person();
+
+ person.setName( "foo" );
+
+ assertEquals( "foo", person.getName() );
+ }
+}