From 1d3617409442bf00f09199d4a5a2f91a6b5c6a5a Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Fri, 13 Oct 2006 20:59:29 +0000 Subject: [PATCH] o the invoker plugin is now working with the generated IT setup git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@463825 13f79535-47bb-0310-9956-ffa450edef68 --- mavenexecute.pl | 53 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/mavenexecute.pl b/mavenexecute.pl index a288a44ea5..20f25f3de2 100644 --- a/mavenexecute.pl +++ b/mavenexecute.pl @@ -8,6 +8,8 @@ undef $/; $readme = ; close( FILE ); +$/ = "\n"; + @descriptions = $readme =~ m/(it\d+\: .*?)(?=\nit\d+\:|$)/gsx; for $desc (@descriptions) { ($name, $value) = ($desc =~ m/^(it\d+)\: (.*)$/s); @@ -34,9 +36,10 @@ while (defined($filename = readdir(DIR))) { } $itBaseDirectory = "$newITs/$filename"; + $itPOM = "$itBaseDirectory/pom.xml"; $itTestCaseDirectory = "$itBaseDirectory/src/test/java/org/apache/maven/it"; $testFile = "$itTestCaseDirectory/MavenIntegrationTest_$filename" . ".java"; - $testProjectDirectory = "$itBaseDirectory/src/test-project"; + $testProjectDirectory = "$itBaseDirectory/src/test-projects"; system( "mkdir -p $itTestCaseDirectory" ); system( "cp -r $dirname/$filename $testProjectDirectory" ); @@ -46,13 +49,57 @@ while (defined($filename = readdir(DIR))) { system( "rm $testProjectDirectory/goals.txt > /dev/null 2>&1" ); system( "rm $testProjectDirectory/expected-results.txt > /dev/null 2>&1" ); system( "rm $testProjectDirectory/log.txt > /dev/null 2>&1" ); + + open( P, "> $itPOM" ) or die; + + print P "\n"; + print P " 4.0.0\n"; + print P " org.apache.maven.it\n"; + print P " maven-core-it-$filename\n"; + print P " 1.0-SNAPSHOT\n"; + +$build = < + + org.apache.maven + maven-core-it-verifier + 2.1-SNAPSHOT + + + + + + maven-invoker-plugin + + true + src/test-projects + + **/pom.xml + + + + + integration-test + integration-test + + run + + + + + + +EOF + + print P "$build"; + print P "\n"; + close P; - print $testFile . "\n"; open( T, "> $testFile") or die; print $filename . "\n"; print T "package org.apache.maven.it;\n"; print T "import java.io.File;\n"; - print T "public class MavenIntegrationTest${filename} /*extends AbstractMavenIntegrationTest*/ {\n"; + print T "public class MavenIntegrationTest_${filename} /*extends AbstractMavenIntegrationTest*/ {\n"; print T "/** $comment{$filename} */\n"; print T "public void test_$filename() throws Exception {\n"; print T "String rootdir = System.getProperty(\"rootdir\");\n";