Author: rfscholte
Date: Sat Feb 11 17:33:01 2012
New Revision: 1243109
URL: http://svn.apache.org/viewvc?rev=1243109&view=rev
Log:
Fix MRELEASE-618: pomFileName and arguments not honored
Added:
maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/
maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/my-pom.xml
maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/verify.groovy
Modified:
maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRunGoalsPhase.java
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunCompleteGoalsPhaseTest.java
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPerformGoalsPhaseTest.java
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPrepareGoalsPhaseTest.java
maven/release/trunk/maven-release-plugin/pom.xml
Modified:
maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRunGoalsPhase.java
URL:
http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRunGoalsPhase.java?rev=1243109&r1=1243108&r2=1243109&view=diff
==============================================================================
---
maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRunGoalsPhase.java
(original)
+++
maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRunGoalsPhase.java
Sat Feb 11 17:33:01 2012
@@ -81,7 +81,7 @@ public abstract class AbstractRunGoalsPh
mavenExecutor.executeGoals( determineWorkingDirectory(
workingDirectory,
releaseDescriptor.getScmRelativePathProjectDirectory() ),
goals, releaseEnvironment,
releaseDescriptor.isInteractive(),
- additionalArguments, result );
+ additionalArguments,
releaseDescriptor.getPomFileName(), result );
}
}
catch ( MavenExecutorException e )
Modified:
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunCompleteGoalsPhaseTest.java
URL:
http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunCompleteGoalsPhaseTest.java?rev=1243109&r1=1243108&r2=1243109&view=diff
==============================================================================
---
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunCompleteGoalsPhaseTest.java
(original)
+++
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunCompleteGoalsPhaseTest.java
Sat Feb 11 17:33:01 2012
@@ -70,7 +70,7 @@ public class RunCompleteGoalsPhaseTest
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsEqual( testFile ),
new IsEqual( "clean integration-test" ),
- new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsAnything()};
+ new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with(
constraints );
@@ -93,7 +93,7 @@ public class RunCompleteGoalsPhaseTest
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsEqual( testFile ),
new IsEqual( "clean integration-test" ),
- new IsAnything(), new IsEqual( Boolean.TRUE ), new IsAnything(),
new IsAnything()};
+ new IsAnything(), new IsEqual( Boolean.TRUE ), new IsAnything(),
new IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with(
constraints );
phase.setMavenExecutor(ReleaseEnvironment.DEFAULT_MAVEN_EXECUTOR_ID,
(MavenExecutor) mock.proxy() );
@@ -115,7 +115,7 @@ public class RunCompleteGoalsPhaseTest
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsEqual( testFile ),
new IsEqual( "clean integration-test" ),
- new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsAnything()};
+ new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with(
constraints ).will(
new ThrowStub( new MavenExecutorException( "...", new Exception()
) ) );
@@ -143,7 +143,7 @@ public class RunCompleteGoalsPhaseTest
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsEqual( testFile ),
new IsEqual( "clean integration-test" ),
- new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsAnything()};
+ new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with(
constraints ).will(
new ThrowStub( new MavenExecutorException( "...", new Exception()
) ) );
Modified:
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPerformGoalsPhaseTest.java
URL:
http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPerformGoalsPhaseTest.java?rev=1243109&r1=1243108&r2=1243109&view=diff
==============================================================================
---
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPerformGoalsPhaseTest.java
(original)
+++
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPerformGoalsPhaseTest.java
Sat Feb 11 17:33:01 2012
@@ -12,6 +12,7 @@ import org.jmock.Mock;
import org.jmock.core.Constraint;
import org.jmock.core.constraint.IsAnything;
import org.jmock.core.constraint.IsEqual;
+import org.jmock.core.constraint.IsNull;
import org.jmock.core.matcher.InvokeOnceMatcher;
import org.jmock.core.stub.ThrowStub;
@@ -52,6 +53,7 @@ public class RunPerformGoalsPhaseTest
new IsAnything(),
new IsEqual( Boolean.TRUE ),
new IsEqual( "-DperformRelease=true -f pom.xml" ),
+ new IsNull(),
new IsAnything()
};
Modified:
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPrepareGoalsPhaseTest.java
URL:
http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPrepareGoalsPhaseTest.java?rev=1243109&r1=1243108&r2=1243109&view=diff
==============================================================================
---
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPrepareGoalsPhaseTest.java
(original)
+++
maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RunPrepareGoalsPhaseTest.java
Sat Feb 11 17:33:01 2012
@@ -70,7 +70,7 @@ public class RunPrepareGoalsPhaseTest
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsEqual( testFile ),
new IsEqual( "clean integration-test" ),
- new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsAnything()};
+ new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with(
constraints );
@@ -93,7 +93,7 @@ public class RunPrepareGoalsPhaseTest
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsEqual( testFile ),
new IsEqual( "clean integration-test" ),
- new IsAnything(), new IsEqual( Boolean.TRUE ), new IsAnything(),
new IsAnything()};
+ new IsAnything(), new IsEqual( Boolean.TRUE ), new IsAnything(),
new IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with(
constraints );
phase.setMavenExecutor(ReleaseEnvironment.DEFAULT_MAVEN_EXECUTOR_ID,
(MavenExecutor) mock.proxy() );
@@ -116,7 +116,7 @@ public class RunPrepareGoalsPhaseTest
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsEqual( testFile ),
new IsEqual( "clean integration-test" ),
- new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsAnything()};
+ new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with(
constraints ).will(
new ThrowStub( new MavenExecutorException( "...", new Exception()
) ) );
@@ -144,7 +144,7 @@ public class RunPrepareGoalsPhaseTest
Mock mock = new Mock( MavenExecutor.class );
Constraint[] constraints = new Constraint[]{new IsEqual( testFile ),
new IsEqual( "clean integration-test" ),
- new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsAnything()};
+ new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new
IsNull(), new IsAnything()};
mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with(
constraints ).will(
new ThrowStub( new MavenExecutorException( "...", new Exception()
) ) );
Modified: maven/release/trunk/maven-release-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/pom.xml?rev=1243109&r1=1243108&r2=1243109&view=diff
==============================================================================
--- maven/release/trunk/maven-release-plugin/pom.xml (original)
+++ maven/release/trunk/maven-release-plugin/pom.xml Sat Feb 11 17:33:01 2012
@@ -197,7 +197,7 @@
<setupInclude>setup/maven-scm-provider-*/pom.xml</setupInclude>
</setupIncludes>
<pomIncludes>
- <pomInclude>projects/prepare/*/pom.xml</pomInclude>
+ <pomInclude>projects/prepare/*/*pom.xml</pomInclude>
<pomInclude>projects/prepare/flat-multi-module/parent-project/pom.xml</pomInclude>
</pomIncludes>
<goals>
Added:
maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/my-pom.xml
URL:
http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/my-pom.xml?rev=1243109&view=auto
==============================================================================
---
maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/my-pom.xml
(added)
+++
maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/my-pom.xml
Sat Feb 11 17:33:01 2012
@@ -0,0 +1,51 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugin.release.its</groupId>
+ <artifactId>mrelease-618</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <scm>
+ <connection>scm:dummy|nul</connection>
+ <developerConnection>scm:dummy|nul</developerConnection>
+ </scm>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ <pomFileName>my-pom.xml</pomFileName>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.release</groupId>
+ <artifactId>maven-scm-provider-dummy</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added:
maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/verify.groovy
URL:
http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/verify.groovy?rev=1243109&view=auto
==============================================================================
---
maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/verify.groovy
(added)
+++
maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-618/verify.groovy
Sat Feb 11 17:33:01 2012
@@ -0,0 +1,24 @@
+
+/*
+ * 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.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+assert buildLog.exists()
+
+assert 1 == buildLog.getText().count('[DEBUG] Specified POM file is not named
'pom.xml'. Using the '-f' command-line option to accommodate non-standard
filename...')