You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/05/23 15:37:35 UTC
svn commit: r177983 -
/maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it
/maven/components/trunk/maven-core-it/it0013
/maven/components/trunk/maven-core-it/it0015
/maven/components/trunk/maven-core-it/it0020
Author: brett
Date: Mon May 23 06:37:34 2005
New Revision: 177983
URL: http://svn.apache.org/viewcvs?rev=177983&view=rev
Log:
move system property specification to system.properties in itests
Added:
maven/components/trunk/maven-core-it/it0013/system.properties (with props)
maven/components/trunk/maven-core-it/it0015/system.properties (with props)
maven/components/trunk/maven-core-it/it0020/system.properties (with props)
Modified:
maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java
maven/components/trunk/maven-core-it/it0013/goals.txt
maven/components/trunk/maven-core-it/it0015/goals.txt
maven/components/trunk/maven-core-it/it0020/goals.txt
Modified: maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java?rev=177983&r1=177982&r2=177983&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java (original)
+++ maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java Mon May 23 06:37:34 2005
@@ -26,6 +26,7 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.Properties;
import java.util.StringTokenizer;
/**
@@ -122,6 +123,28 @@
}
}
+ private static Properties loadProperties( File propertiesFile )
+ throws VerificationException
+ {
+ Properties properties = new Properties();
+
+ FileInputStream fis = null;
+ try
+ {
+ if ( propertiesFile.exists() )
+ {
+ fis = new FileInputStream( propertiesFile );
+ properties.load( fis );
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new VerificationException( "Error reading properties file", e );
+ }
+
+ return properties;
+ }
+
private static List loadFile( String basedir, String filename )
throws VerificationException
{
@@ -399,7 +422,7 @@
//
// ----------------------------------------------------------------------
- public void executeGoals( String filename )
+ public void executeGoals( Properties properties, String filename )
throws VerificationException
{
String mavenHome = System.getProperty( "maven.home" );
@@ -439,6 +462,12 @@
cli.createArgument().setValue( "-e" );
+ for ( Iterator i = properties.keySet().iterator(); i.hasNext(); )
+ {
+ String key = (String) i.next();
+ cli.createArgument().setLine( "-D" + key + "=" + properties.getProperty( key ) );
+ }
+
for ( Iterator i = allGoals.iterator(); i.hasNext(); )
{
cli.createArgument().setValue( (String) i.next() );
@@ -450,7 +479,7 @@
StreamConsumer err = new WriterStreamConsumer( logWriter );
- System.out.println( Commandline.toString( cli.getCommandline() ) );
+ System.out.println( "Command: " + Commandline.toString( cli.getCommandline() ) );
ret = CommandLineUtils.executeCommandLine( cli, out, err );
@@ -533,7 +562,9 @@
{
verifier.executeHook( "prebuild-hook.txt" );
- verifier.executeGoals( "goals.txt" );
+ Properties properties = verifier.loadProperties( new File( basedir, "system.properties" ) );
+
+ verifier.executeGoals( properties, "goals.txt" );
verifier.executeHook( "postbuild-hook.txt" );
Modified: maven/components/trunk/maven-core-it/it0013/goals.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0013/goals.txt?rev=177983&r1=177982&r2=177983&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/it0013/goals.txt (original)
+++ maven/components/trunk/maven-core-it/it0013/goals.txt Mon May 23 06:37:34 2005
@@ -1,3 +1,2 @@
--DupdateReleaseInfo=true
install
it0013:it0013
Added: maven/components/trunk/maven-core-it/it0013/system.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0013/system.properties?rev=177983&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0013/system.properties (added)
+++ maven/components/trunk/maven-core-it/it0013/system.properties Mon May 23 06:37:34 2005
@@ -0,0 +1,2 @@
+updateReleaseInfo=true
+
Propchange: maven/components/trunk/maven-core-it/it0013/system.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0013/system.properties
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/components/trunk/maven-core-it/it0015/goals.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0015/goals.txt?rev=177983&r1=177982&r2=177983&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/it0015/goals.txt (original)
+++ maven/components/trunk/maven-core-it/it0015/goals.txt Mon May 23 06:37:34 2005
@@ -1,3 +1,2 @@
--DupdateReleaseInfo=true
install
it0015:it0015
Added: maven/components/trunk/maven-core-it/it0015/system.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0015/system.properties?rev=177983&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0015/system.properties (added)
+++ maven/components/trunk/maven-core-it/it0015/system.properties Mon May 23 06:37:34 2005
@@ -0,0 +1,2 @@
+updateReleaseInfo=true
+
Propchange: maven/components/trunk/maven-core-it/it0015/system.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0015/system.properties
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/components/trunk/maven-core-it/it0020/goals.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0020/goals.txt?rev=177983&r1=177982&r2=177983&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/it0020/goals.txt (original)
+++ maven/components/trunk/maven-core-it/it0020/goals.txt Mon May 23 06:37:34 2005
@@ -1,3 +1,2 @@
--DupdateReleaseInfo=true
install
it0020:it0020
Added: maven/components/trunk/maven-core-it/it0020/system.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0020/system.properties?rev=177983&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0020/system.properties (added)
+++ maven/components/trunk/maven-core-it/it0020/system.properties Mon May 23 06:37:34 2005
@@ -0,0 +1 @@
+updateReleaseInfo=true
Propchange: maven/components/trunk/maven-core-it/it0020/system.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0020/system.properties
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org