You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/12/10 15:12:06 UTC

cvs commit: avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit AbstractMerlinTestCase.java

mcconnell    2003/12/10 06:12:06

  Modified:    merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit
                        AbstractMerlinTestCase.java
  Log:
  ADD traces to the unti test class.
  
  Revision  Changes    Path
  1.18      +47 -1     avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit/AbstractMerlinTestCase.java
  
  Index: AbstractMerlinTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit/AbstractMerlinTestCase.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- AbstractMerlinTestCase.java	8 Dec 2003 15:37:13 -0000	1.17
  +++ AbstractMerlinTestCase.java	10 Dec 2003 14:12:06 -0000	1.18
  @@ -324,20 +324,54 @@
   
       private static String getMavenHome()
       {
  +System.out.println( 
  +  "### ${maven.home} == [" 
  +  + System.getProperty( "maven.home" ) 
  +  + "]" );
  +System.out.println( 
  +  "### ${maven.home.local} == [" 
  +  + System.getProperty( "maven.home.local" ) 
  +  + "]" );
  +System.out.println( 
  +  "### MAVEN_HOME == [" 
  +  + getEnvValue( "MAVEN_HOME" ) 
  +  + "]" );
  +System.out.println( 
  +  "### MAVEN_HOME_LOCAL == [" 
  +  + getEnvValue( "MAVEN_HOME_LOCAL" ) 
  +  + "]" );
  +
           try
           {
               String local = 
                 System.getProperty( 
                   "maven.home.local", 
                   Env.getEnvVariable( "MAVEN_HOME_LOCAL" ) );
  +
  +System.out.println( 
  +  "### local == [" 
  +  + local 
  +  + "]" );
  +
               if( null != local ) return local;
   
               String maven = 
                 System.getProperty( 
                   "maven.home", 
                   Env.getEnvVariable( "MAVEN_HOME" ) );
  +
  +System.out.println( 
  +  "### maven == [" 
  +  + maven 
  +  + "]" );
  +
               if( null != maven ) return maven;
   
  +System.out.println( 
  +  "### fallback == [" 
  +  + System.getProperty( "user.home" ) + File.separator + ".maven" 
  +  + "]" );
  +
               return System.getProperty( "user.home" ) + File.separator + ".maven";
   
           }
  @@ -348,6 +382,18 @@
               final String message = 
                 ExceptionHelper.packException( error, e, true );
               throw new RuntimeException( message );
  +        }
  +    }
  +
  +    private static String getEnvValue( String key )
  +    {
  +        try
  +        {
  +            return Env.getEnvVariable( key );
  +        }
  +        catch( Throwable e )
  +        {
  +            throw new RuntimeException( e.toString() );
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org