You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2011/11/08 11:56:10 UTC
svn commit: r1199182 -
/maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java
Author: olamy
Date: Tue Nov 8 10:56:10 2011
New Revision: 1199182
URL: http://svn.apache.org/viewvc?rev=1199182&view=rev
Log:
[ARCHETYPE-389] add some various options to improve how Maven is invoked in IntegrationTestMojo
localRepository parameter.
Modified:
maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java
Modified: maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java?rev=1199182&r1=1199181&r2=1199182&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java (original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java Tue Nov 8 10:56:10 2011
@@ -147,6 +147,15 @@ public class IntegrationTestMojo
*/
private String encoding;
+ /**
+ * The local repository to run maven instance.
+ *
+ * @parameter expression="${archetype.test.localRepositoryPath}" default-value="${settings.localRepository}"
+ * @required
+ * @readonly
+ */
+ private File localRepositoryPath;
+
public void execute()
throws MojoExecutionException, MojoFailureException
{
@@ -389,7 +398,7 @@ public class IntegrationTestMojo
getLog().info( "Invoking post-archetype-generation goals: " + goals );
InvocationRequest request = new DefaultInvocationRequest().setBaseDirectory( basedir ).setGoals(
- Arrays.asList( StringUtils.split( goals, "," ) ) );
+ Arrays.asList( StringUtils.split( goals, "," ) ) ).setLocalRepositoryDirectory( localRepositoryPath );
if ( logger != null )
{