Hi Benjamin,

This is a test class, so what difference do you see between a constant and e
file located just around this class ?
If I use a system property I need to configure it my test config of
Eclipse...
This code is not definitive, but I looking for a better solution (for the
code, but for the development too).
With this code I support my configuration and a default configuration.

What do you think ?

Philippe

-----Original Message-----
From: Benjamin Bentmann [mailto:[email protected]] 
Sent: vendredi 16 janvier 2009 19:55
To: [email protected]
Subject: [mojo-dev] Re: [mojo-scm] [8700]
trunk/mojo/fitnesse-maven-plugin/src/test/resources: Run all the integration
test at each build.

pkernevez wrote:

> Revision
>     8700 <http://fisheye.codehaus.org/changelog/mojo/?cs=8700>
> Author
>     pkernevez
> Date
>     2009-01-16 12:37:30 -0600 (Fri, 16 Jan 2009)
> 
> 
>       Log Message
> 
> Run all the integration test at each build.
> MFITNESSE-29
<http://jira.codehaus.org/secure/ViewIssue.jspa?key=MFITNESSE-29>
> 
> [...]
> 
> ---
trunk/mojo/fitnesse-maven-plugin/src/test/java/org/codehaus/mojo/fitnesse/in
tegration/MavenItMinimalistTest.java                            (rev 0)
> +++
trunk/mojo/fitnesse-maven-plugin/src/test/java/org/codehaus/mojo/fitnesse/in
tegration/MavenItMinimalistTest.java    2009-01-16 18:37:30 UTC (rev 8700)
> @@ -0,0 +1,205 @@
> +package org.codehaus.mojo.fitnesse.integration;
> +
> +import java.io.File;
> +import java.io.IOException;
> +
> +import org.apache.commons.logging.LogFactory;
> +import org.apache.maven.it.AbstractMavenIntegrationTestCase;
> +import org.apache.maven.it.VerificationException;
> +import org.apache.maven.it.Verifier;
> +import org.apache.maven.it.util.ResourceExtractor;
> +import org.codehaus.mojo.fitnesse.FileUtil;
> +
> +public class MavenItMinimalistTest
> +    extends AbstractMavenIntegrationTestCase
> +{
> +
> +    private static final String SETTINGS_LOCATION =
"C:\\dev\\apps\\maven\\.m2\\settings.xml";
> +
> +    private static final String ROOT =
"target/test-classes/integration/";
> +
> + [...]
> +        File tPhilippeKernevezConfig = new File( SETTINGS_LOCATION );
> +        if ( tPhilippeKernevezConfig.exists() )
> +        {
> +            verifier = new Verifier( testDir.getAbsolutePath(),
SETTINGS_LOCATION );
> +        }
> +        else
> +        {
> +            // Use default maven location settings file
> +            verifier = new Verifier( testDir.getAbsolutePath() );
> +        }

Instead of hard coding developer specific paths, why not just use a 
well-known settings from the project's test resources or use a system 
property that can be set to control the settings locations to use?


Benjamin

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to