You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by st...@apache.org on 2011/05/24 10:20:31 UTC
svn commit: r1126920 - in /maven/sandbox/trunk/plexus-utils-commons-bridge:
./ plexus-utils-commons-bridge/ plexus-utils-commons-bridge/src/
plexus-utils-commons-bridge/src/main/
plexus-utils-commons-bridge/src/main/java/ plexus-utils-commons-bridge/sr...
Author: stephenc
Date: Tue May 24 08:20:30 2011
New Revision: 1126920
URL: http://svn.apache.org/viewvc?rev=1126920&view=rev
Log:
getting started with IOUtil
Added:
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/ (with props)
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/pom.xml
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/IOUtil.java
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/test/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/test/java/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/ (with props)
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/pom.xml
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/main/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/main/java/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/
maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java
maven/sandbox/trunk/plexus-utils-commons-bridge/pom.xml
Modified:
maven/sandbox/trunk/plexus-utils-commons-bridge/ (props changed)
Propchange: maven/sandbox/trunk/plexus-utils-commons-bridge/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue May 24 08:20:30 2011
@@ -0,0 +1,10 @@
+target
+.classpath
+.project
+.settings
+*.iml
+*.iws
+*.ipr
+.git
+.gitignore
+.idea
Propchange: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue May 24 08:20:30 2011
@@ -0,0 +1,10 @@
+target
+.classpath
+.project
+.settings
+*.iml
+*.iws
+*.ipr
+.git
+.gitignore
+.idea
Added: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/pom.xml?rev=1126920&view=auto
==============================================================================
--- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/pom.xml (added)
+++ maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/pom.xml Tue May 24 08:20:30 2011
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>plexus-utils-commons-bridge-parent</artifactId>
+ <groupId>org.apache.maven.sandbox</groupId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>plexus-utils-commons-bridge</artifactId>
+
+ <name>Plexus Utils to Apache Commons bridge</name>
+ <description>A bridge/shim that implements Plexus Utils using Apache Commons</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.sandbox</groupId>
+ <artifactId>plexus-utils-tck</artifactId>
+ <version>${project.parent.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <includeTypes>test-jar</includeTypes>
+ <excludeTransitive>true</excludeTransitive>
+ <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+
+</project>
Added: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/IOUtil.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/IOUtil.java?rev=1126920&view=auto
==============================================================================
--- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/IOUtil.java (added)
+++ maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-commons-bridge/src/main/java/org/codehaus/plexus/util/IOUtil.java Tue May 24 08:20:30 2011
@@ -0,0 +1,175 @@
+package org.codehaus.plexus.util;
+
+public final class IOUtil
+{
+ private static final int DEFAULT_BUFFER_SIZE = 4096;
+
+ private IOUtil()
+ {
+ throw new IllegalAccessError( "Utility class" );
+ }
+
+ public static void copy( java.io.InputStream input, java.io.OutputStream output )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.io.InputStream input, java.io.OutputStream output, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.io.Reader input, java.io.Writer output )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.io.Reader input, java.io.Writer output, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.io.InputStream input, java.io.Writer output )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.io.InputStream input, java.io.Writer output, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.io.InputStream input, java.io.Writer output, java.lang.String encoding )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.io.InputStream input, java.io.Writer output, java.lang.String encoding,
+ int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( java.io.InputStream input )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( java.io.InputStream input, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( java.io.InputStream input, java.lang.String encoding )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( java.io.InputStream input, java.lang.String encoding, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static byte[] toByteArray( java.io.InputStream input )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static byte[] toByteArray( java.io.InputStream input, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.io.Reader input, java.io.OutputStream output )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.io.Reader input, java.io.OutputStream output, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( java.io.Reader input )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( java.io.Reader input, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static byte[] toByteArray( java.io.Reader input )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static byte[] toByteArray( java.io.Reader input, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.lang.String input, java.io.OutputStream output )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.lang.String input, java.io.OutputStream output, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( java.lang.String input, java.io.Writer output )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ /**
+ * @deprecated
+ */
+ public static void bufferedCopy( java.io.InputStream input, java.io.OutputStream output )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static byte[] toByteArray( java.lang.String input )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static byte[] toByteArray( java.lang.String input, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( byte[] input, java.io.Writer output )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( byte[] input, java.io.Writer output, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( byte[] input, java.io.Writer output, java.lang.String encoding )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( byte[] input, java.io.Writer output, java.lang.String encoding, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( byte[] input )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( byte[] input, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( byte[] input, java.lang.String encoding )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static java.lang.String toString( byte[] input, java.lang.String encoding, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( byte[] input, java.io.OutputStream output )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void copy( byte[] input, java.io.OutputStream output, int bufferSize )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static boolean contentEquals( java.io.InputStream input1, java.io.InputStream input2 )
+ throws java.io.IOException
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void close( java.io.InputStream inputStream )
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void close( java.io.OutputStream outputStream )
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void close( java.io.Reader reader )
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+
+ public static void close( java.io.Writer writer )
+ { throw new UnsupportedOperationException( "Not implemented yet" ); }
+}
\ No newline at end of file
Propchange: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue May 24 08:20:30 2011
@@ -0,0 +1,10 @@
+target
+.classpath
+.project
+.settings
+*.iml
+*.iws
+*.ipr
+.git
+.gitignore
+.idea
Added: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/pom.xml?rev=1126920&view=auto
==============================================================================
--- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/pom.xml (added)
+++ maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/pom.xml Tue May 24 08:20:30 2011
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>plexus-utils-commons-bridge-parent</artifactId>
+ <groupId>org.apache.maven.sandbox</groupId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>plexus-utils-tck</artifactId>
+
+ <name>Plexus Utils Test Compatibility Kit</name>
+ <description>A set of test cases that verify compatibility with the Plexus Utils API</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>2.0.7</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+
+</project>
Added: maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java?rev=1126920&view=auto
==============================================================================
--- maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java (added)
+++ maven/sandbox/trunk/plexus-utils-commons-bridge/plexus-utils-tck/src/test/java/org/codehaus/plexus/util/IOUtilTest.java Tue May 24 08:20:30 2011
@@ -0,0 +1,24 @@
+package org.codehaus.plexus.util;
+
+
+import org.junit.Test;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Modifier;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class IOUtilTest
+{
+
+ @Test
+ public void isUtilityClass()
+ throws Exception
+ {
+ for ( Constructor c : IOUtil.class.getConstructors() )
+ {
+ assertThat( Modifier.isPrivate( c.getModifiers() ), is( true ) );
+ }
+ }
+}
Added: maven/sandbox/trunk/plexus-utils-commons-bridge/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plexus-utils-commons-bridge/pom.xml?rev=1126920&view=auto
==============================================================================
--- maven/sandbox/trunk/plexus-utils-commons-bridge/pom.xml (added)
+++ maven/sandbox/trunk/plexus-utils-commons-bridge/pom.xml Tue May 24 08:20:30 2011
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-parent</artifactId>
+ <version>18</version>
+ <relativePath></relativePath>
+ </parent>
+
+ <groupId>org.apache.maven.sandbox</groupId>
+ <artifactId>plexus-utils-commons-bridge-parent</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Plexus Utils to Apache Commons bridge Parent</name>
+ <description>A bridge/shim that implements Plexus Utils using Apache Commons</description>
+
+ <modules>
+ <module>plexus-utils-tck</module>
+ <module>plexus-utils-commons-bridge</module>
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>2.0.7</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.8.1</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+
+</project>