maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1378684 - in /maven/shared/trunk/maven-shared-utils/src: main/java/org/apache/maven/shared/utils/ test/java/org/apache/maven/shared/utils/ test/java/org/apache/maven/shared/utils/exceptionutils/ test/resources/expand/
Date Wed, 29 Aug 2012 19:08:11 GMT
Author: struberg
Date: Wed Aug 29 19:08:11 2012
New Revision: 1378684

URL: http://svn.apache.org/viewvc?rev=1378684&view=rev
Log:
MSHARED-236 move Expand and ExceptionUtils from sandbox-pu to proper

Added:
    maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ExceptionUtils.java
      - copied, changed from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java
    maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Expand.java
      - copied, changed from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/Expand.java
    maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExceptionUtilsTest.java
      - copied, changed from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExceptionUtilsTest.java
    maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExpandTest.java
      - copied, changed from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java
    maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/
      - copied from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/exceptionutils/
    maven/shared/trunk/maven-shared-utils/src/test/resources/expand/
      - copied from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/resources/expand/
Modified:
    maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestException.java
    maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestExceptionWithDetail.java

Copied: maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ExceptionUtils.java
(from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java)
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ExceptionUtils.java?p2=maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ExceptionUtils.java&p1=maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java&r1=1378653&r2=1378684&rev=1378684&view=diff
==============================================================================
--- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/ExceptionUtils.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/ExceptionUtils.java
Wed Aug 29 19:08:11 2012
@@ -1,4 +1,4 @@
-package org.codehaus.plexus.util;
+package org.apache.maven.shared.utils;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one

Copied: maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Expand.java
(from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/Expand.java)
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Expand.java?p2=maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Expand.java&p1=maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/Expand.java&r1=1378653&r2=1378684&rev=1378684&view=diff
==============================================================================
--- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/Expand.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/Expand.java
Wed Aug 29 19:08:11 2012
@@ -1,4 +1,4 @@
-package org.codehaus.plexus.util;
+package org.apache.maven.shared.utils;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +19,8 @@ package org.codehaus.plexus.util;
  * under the License.
  */
 
+import org.apache.maven.shared.utils.io.FileUtils;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -226,7 +228,7 @@ public class Expand
     {
         if ( targetFile.isDirectory() )
         {
-            org.apache.commons.io.FileUtils.deleteDirectory( targetFile );
+            FileUtils.deleteDirectory( targetFile );
         }
         else
         {

Copied: maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExceptionUtilsTest.java
(from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExceptionUtilsTest.java)
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExceptionUtilsTest.java?p2=maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExceptionUtilsTest.java&p1=maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExceptionUtilsTest.java&r1=1378653&r2=1378684&rev=1378684&view=diff
==============================================================================
--- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExceptionUtilsTest.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExceptionUtilsTest.java
Wed Aug 29 19:08:11 2012
@@ -1,4 +1,4 @@
-package org.codehaus.plexus.util;
+package org.apache.maven.shared.utils;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,10 +19,8 @@ package org.codehaus.plexus.util;
  * under the License.
  */
 
-import org.apache.maven.tck.FixPlexusBugs;
-import org.codehaus.plexus.util.exceptionutils.TestException;
-import org.codehaus.plexus.util.exceptionutils.TestExceptionWithDetail;
-import org.junit.Rule;
+import org.apache.maven.shared.utils.exceptionutils.TestException;
+import org.apache.maven.shared.utils.exceptionutils.TestExceptionWithDetail;
 import org.junit.Test;
 import org.junit.Assert;
 import org.junit.matchers.JUnitMatchers;
@@ -46,9 +44,6 @@ public class ExceptionUtilsTest extends 
 {
     private static Logger logger = Logger.getLogger(ExceptionUtilsTest.class.getName());
 
-    @Rule
-    public FixPlexusBugs fixPlexusBugs = new FixPlexusBugs();
-
     protected static StackTraceElement[] STACKTRACE_WO_SPECIAL_METHODS =
         {
             new StackTraceElement("org.apache.maven.test.Class1", "method1", null, 101),
@@ -151,7 +146,7 @@ public class ExceptionUtilsTest extends 
         NullPointerException npe = new NullPointerException( "dooh just a random, nullpointer"
);
 
         String fullStackTraceStart = "java.lang.NullPointerException: dooh just a random,
nullpointer\n"
-                     + "\tat org.codehaus.plexus.util.ExceptionUtilsTest.testGetFullStackTrace(ExceptionUtilsTest.java";
+                     + "\tat org.apache.maven.shared.utils.ExceptionUtilsTest.testGetFullStackTrace(ExceptionUtilsTest.java";
 
         String fullStackTrace = ExceptionUtils.getFullStackTrace( npe );
         assertThat( "getFullStackTrace start with"
@@ -232,7 +227,7 @@ public class ExceptionUtilsTest extends 
         assertNotNull( stackTrace );
         assertTrue( "wrong stacktrace: " + stackTrace,
                     stackTrace.startsWith( "java.lang.NullPointerException: dooh just a random,
nullpointer\n" +
-                        "\tat org.codehaus.plexus.util.ExceptionUtilsTest.testGetStackTrace(ExceptionUtilsTest.java"
));
+                        "\tat org.apache.maven.shared.utils.ExceptionUtilsTest.testGetStackTrace(ExceptionUtilsTest.java"
));
 
         SQLException sqlException = new SQLException( npe );
         stackTrace = ExceptionUtils.getStackTrace( sqlException );
@@ -240,7 +235,7 @@ public class ExceptionUtilsTest extends 
         assertTrue( "wrong stacktrace: " + stackTrace,
                     stackTrace.startsWith( "java.sql.SQLException: java.lang.NullPointerException:
"
                       + "dooh just a random, nullpointer\n"
-                      + "\tat org.codehaus.plexus.util.ExceptionUtilsTest.testGetStackTrace(ExceptionUtilsTest.java"
));
+                      + "\tat org.apache.maven.shared.utils.ExceptionUtilsTest.testGetStackTrace(ExceptionUtilsTest.java"
));
 
         // NPE safe test
         try
@@ -268,7 +263,7 @@ public class ExceptionUtilsTest extends 
 
         assertEquals( "java.lang.NullPointerException: " + npe.getMessage(), stackFrames[0]
);
         assertThat( "stackFrames", stackFrames[1]
-                  , JUnitMatchers.containsString( "at org.codehaus.plexus.util.ExceptionUtilsTest."
+                  , JUnitMatchers.containsString( "at org.apache.maven.shared.utils.ExceptionUtilsTest."
                                                   + "testGetStackFrames(ExceptionUtilsTest.java"
) );
 
         // NPE safe test
@@ -458,14 +453,14 @@ public class ExceptionUtilsTest extends 
             assertThat( "stackFrames"
                       , bao.toString()
                       , JUnitMatchers.containsString( "java.lang.NullPointerException: dooh
just a random, nullpointer"
-                                                      + "\n\tat org.codehaus.plexus.util.ExceptionUtilsTest."
+                                                      + "\n\tat org.apache.maven.shared.utils.ExceptionUtilsTest."
                                                       + "testPrintRootCauseStackTrace(ExceptionUtilsTest.java:"
) );
             bao.reset();
             ExceptionUtils.printRootCauseStackTrace( sqlException );
             assertThat( "stackFrames"
                       , bao.toString()
                       , JUnitMatchers.containsString( "java.lang.NullPointerException: dooh
just a random, nullpointer"
-                                                      + "\n\tat org.codehaus.plexus.util.ExceptionUtilsTest."
+                                                      + "\n\tat org.apache.maven.shared.utils.ExceptionUtilsTest."
                                                       + "testPrintRootCauseStackTrace(ExceptionUtilsTest.java:"
) );
 
             // moving back to the original stdout and using the PrintStream directly
@@ -476,7 +471,7 @@ public class ExceptionUtilsTest extends 
             assertThat("stackFrames"
                     , bao.toString()
                     , JUnitMatchers.containsString("java.lang.NullPointerException: dooh
just a random, nullpointer"
-                    + "\n\tat org.codehaus.plexus.util.ExceptionUtilsTest."
+                    + "\n\tat org.apache.maven.shared.utils.ExceptionUtilsTest."
                     + "testPrintRootCauseStackTrace(ExceptionUtilsTest.java:"));
             outStream.close();
 
@@ -487,7 +482,7 @@ public class ExceptionUtilsTest extends 
             assertThat( "stackFrames"
                       , bao.toString()
                       , JUnitMatchers.containsString( "java.lang.NullPointerException: dooh
just a random, nullpointer"
-                                                      + "\n\tat org.codehaus.plexus.util.ExceptionUtilsTest."
+                                                      + "\n\tat org.apache.maven.shared.utils.ExceptionUtilsTest."
                                                       + "testPrintRootCauseStackTrace(ExceptionUtilsTest.java:"
) );
         }
         finally

Copied: maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExpandTest.java
(from r1378653, maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java)
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExpandTest.java?p2=maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExpandTest.java&p1=maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java&r1=1378653&r2=1378684&rev=1378684&view=diff
==============================================================================
--- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/ExpandTest.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/ExpandTest.java
Wed Aug 29 19:08:11 2012
@@ -1,4 +1,4 @@
-package org.codehaus.plexus.util;
+package org.apache.maven.shared.utils;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,7 +19,7 @@ package org.codehaus.plexus.util;
  * under the License.
  */
 
-import org.apache.maven.tck.FixPlexusBugs;
+import org.apache.maven.shared.utils.io.FileUtils;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.Assert;
@@ -53,8 +53,6 @@ public class ExpandTest extends Assert
     private static final String TEST_UNZIPPED_FILE = "expand_test/test_file.txt";
     private static final String TEST_UNZIPPED_CONTENT = "TestContent";
 
-    @Rule
-    public FixPlexusBugs fixPlexusBugs = new FixPlexusBugs();
 
     @Rule
     public TemporaryFolder tempFolder = new TemporaryFolder();

Modified: maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestException.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestException.java?rev=1378684&r1=1378653&r2=1378684&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestException.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestException.java
Wed Aug 29 19:08:11 2012
@@ -1,4 +1,4 @@
-package org.codehaus.plexus.util.exceptionutils;
+package org.apache.maven.shared.utils.exceptionutils;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one

Modified: maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestExceptionWithDetail.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestExceptionWithDetail.java?rev=1378684&r1=1378653&r2=1378684&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestExceptionWithDetail.java
(original)
+++ maven/shared/trunk/maven-shared-utils/src/test/java/org/apache/maven/shared/utils/exceptionutils/TestExceptionWithDetail.java
Wed Aug 29 19:08:11 2012
@@ -1,4 +1,4 @@
-package org.codehaus.plexus.util.exceptionutils;
+package org.apache.maven.shared.utils.exceptionutils;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one



Mime
View raw message