You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ev...@apache.org on 2005/09/22 18:04:21 UTC

svn commit: r290972 - /maven/components/trunk/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java

Author: evenisse
Date: Thu Sep 22 09:04:16 2005
New Revision: 290972

URL: http://svn.apache.org/viewcvs?rev=290972&view=rev
Log:
Add debug messages

Modified:
    maven/components/trunk/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java

Modified: maven/components/trunk/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java?rev=290972&r1=290971&r2=290972&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java (original)
+++ maven/components/trunk/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java Thu Sep 22 09:04:16 2005
@@ -207,33 +207,49 @@
         // ----------------------------------------------------------------------
 
         System.setProperty( "basedir", basedir );
+
         System.setProperty( "localRepository", localRepository.getBasedir() );
 
         // Add all system properties configured by the user
         if ( systemProperties != null )
         {
             Enumeration propertyKeys = systemProperties.propertyNames();
+
             while ( propertyKeys.hasMoreElements() )
             {
                 String key = (String) propertyKeys.nextElement();
+
                 System.setProperty( key, systemProperties.getProperty( key ) );
+
                 getLog().debug( "Setting system property [" + key + "]=[" + systemProperties.getProperty( key ) + "]" );
             }
         }
 
+        getLog().debug( "Test Classpath :" );
+
+        getLog.debug( testClassesDirectory.getPath() );
 
         surefireBooter.addClassPathUrl( testClassesDirectory.getPath() );
 
+        getLog.debug( classesDirectory.getPath() );
+
         surefireBooter.addClassPathUrl( classesDirectory.getPath() );
 
         for ( Iterator i = classpathElements.iterator(); i.hasNext(); )
         {
-            surefireBooter.addClassPathUrl( (String) i.next() );
+            String classpathElement = (String) i.next();
+
+            getLog().debug( classpathElement );
+
+            surefireBooter.addClassPathUrl( classpathElement );
         }
 
         for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
         {
             Artifact artifact = (Artifact) i.next();
+
+            getLog().debug( artifact.getFile().getAbsolutePath() );
+
             surefireBooter.addClassPathUrl( artifact.getFile().getAbsolutePath() );
         }
 
@@ -245,6 +261,7 @@
 
 
         boolean success;
+
         try
         {
             success = surefireBooter.run();
@@ -273,6 +290,7 @@
     protected String[] split( String str, String separator, int max )
     {
         StringTokenizer tok;
+
         if ( separator == null )
         {
             // Null separator means we're using StringTokenizer's default
@@ -285,15 +303,20 @@
         }
 
         int listSize = tok.countTokens();
+
         if ( max > 0 && listSize > max )
         {
             listSize = max;
         }
 
         String[] list = new String[listSize];
+
         int i = 0;
+
         int lastTokenBegin;
+
         int lastTokenEnd = 0;
+
         while ( tok.hasMoreTokens() )
         {
             if ( max > 0 && i == listSize - 1 )
@@ -302,18 +325,24 @@
                 // tokens left over in our input, the last list
                 // element gets all remaining text.
                 String endToken = tok.nextToken();
+
                 lastTokenBegin = str.indexOf( endToken, lastTokenEnd );
+
                 list[i] = str.substring( lastTokenBegin );
+
                 break;
             }
             else
             {
                 list[i] = tok.nextToken();
+
                 lastTokenBegin = str.indexOf( list[i], lastTokenEnd );
+
                 lastTokenEnd = lastTokenBegin + list[i].length();
             }
             i++;
         }
+
         return list;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org