You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2006/04/03 08:56:09 UTC

svn commit: r390966 - in /maven/archetype/trunk/maven-archetype-creator: ./ src/main/archetype/ src/main/java/org/apache/maven/archetype/ src/test/java/org/apache/maven/archetype/

Author: brett
Date: Sun Apr  2 23:56:06 2006
New Revision: 390966

URL: http://svn.apache.org/viewcvs?rev=390966&view=rev
Log:
reformat and update licenses

Modified:
    maven/archetype/trunk/maven-archetype-creator/pom.xml
    maven/archetype/trunk/maven-archetype-creator/src/main/archetype/archetype.properties
    maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreationException.java
    maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreator.java
    maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/Copier.java
    maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/DefaultArchetypeCreator.java
    maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FileUtils.java
    maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FilteringCopier.java
    maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/StandardCopier.java
    maven/archetype/trunk/maven-archetype-creator/src/test/java/org/apache/maven/archetype/DefaultArchetypeCreatorTest.java

Modified: maven/archetype/trunk/maven-archetype-creator/pom.xml
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/pom.xml?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/pom.xml (original)
+++ maven/archetype/trunk/maven-archetype-creator/pom.xml Sun Apr  2 23:56:06 2006
@@ -1,8 +1,24 @@
+<!--
+  ~ Copyright 2004-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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/maven-v4_0_0.xsd">
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
     <groupId>org.apache.maven.archetype</groupId>
-    <artifactId>maven-archetype</artifactId>    
+    <artifactId>maven-archetype</artifactId>
     <version>1.0-alpha-4-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>

Modified: maven/archetype/trunk/maven-archetype-creator/src/main/archetype/archetype.properties
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/src/main/archetype/archetype.properties?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/src/main/archetype/archetype.properties (original)
+++ maven/archetype/trunk/maven-archetype-creator/src/main/archetype/archetype.properties Sun Apr  2 23:56:06 2006
@@ -1 +1,17 @@
+#
+# Copyright 2004-2006 The Apache Software Foundation.
+#
+# Licensed 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.
+#
+
 package=org.apache.maven.archetype

Modified: maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreationException.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreationException.java?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreationException.java (original)
+++ maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreationException.java Sun Apr  2 23:56:06 2006
@@ -1,5 +1,21 @@
 package org.apache.maven.archetype;
 
+/*
+ * Copyright 2004-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
 /**
  * @author Jason van Zyl
  * @version $Revision:$

Modified: maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreator.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreator.java?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreator.java (original)
+++ maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/ArchetypeCreator.java Sun Apr  2 23:56:06 2006
@@ -1,5 +1,21 @@
 package org.apache.maven.archetype;
 
+/*
+ * Copyright 2004-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.project.MavenProject;
 
@@ -14,9 +30,11 @@
 {
     static String ROLE = ArchetypeCreator.class.getName();
 
-    File createArchetype( File basedir, ArtifactRepository localRepository, File targetDirectory, Properties properties )
+    File createArchetype( File basedir, ArtifactRepository localRepository, File targetDirectory,
+                          Properties properties )
         throws ArchetypeCreationException;
 
-    File createArchetype( MavenProject project, ArtifactRepository localRepository, File targetDirectory, Properties properties )
+    File createArchetype( MavenProject project, ArtifactRepository localRepository, File targetDirectory,
+                          Properties properties )
         throws ArchetypeCreationException;
 }

Modified: maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/Copier.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/Copier.java?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/Copier.java (original)
+++ maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/Copier.java Sun Apr  2 23:56:06 2006
@@ -1,5 +1,21 @@
 package org.apache.maven.archetype;
 
+/*
+ * Copyright 2004-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
 import java.io.File;
 import java.io.IOException;
 

Modified: maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/DefaultArchetypeCreator.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/DefaultArchetypeCreator.java?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/DefaultArchetypeCreator.java (original)
+++ maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/DefaultArchetypeCreator.java Sun Apr  2 23:56:06 2006
@@ -1,5 +1,23 @@
 package org.apache.maven.archetype;
 
+/*
+ * Copyright 2004-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import org.apache.maven.archetype.model.ArchetypeModel;
+import org.apache.maven.archetype.model.io.xpp3.ArchetypeXpp3Writer;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Resource;
@@ -8,8 +26,6 @@
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
-import org.apache.maven.archetype.model.io.xpp3.ArchetypeXpp3Writer;
-import org.apache.maven.archetype.model.ArchetypeModel;
 import org.codehaus.plexus.archiver.Archiver;
 
 import java.io.File;
@@ -58,7 +74,8 @@
         archetypeModelWriter = new ArchetypeXpp3Writer();
     }
 
-    public File createArchetype( File basedir, ArtifactRepository localRepository, File targetDirectory, Properties properties )
+    public File createArchetype( File basedir, ArtifactRepository localRepository, File targetDirectory,
+                                 Properties properties )
         throws ArchetypeCreationException
     {
         File pom = new File( basedir, "pom.xml" );
@@ -83,7 +100,8 @@
         return new File( path ).getCanonicalPath().substring( basedir.getCanonicalPath().length() + 1 );
     }
 
-    public File createArchetype( MavenProject project, ArtifactRepository localRepository, File targetDirectory, Properties properties )
+    public File createArchetype( MavenProject project, ArtifactRepository localRepository, File targetDirectory,
+                                 Properties properties )
         throws ArchetypeCreationException
     {
         if ( !targetDirectory.exists() )
@@ -265,9 +283,10 @@
 
             // Use the model/project values to copy the sources
             filterCopy( new File( basedir, sourceDirectory ), new File( filterDir, sourceDirectory ), properties );
-            
+
             // Use the model/project values to copy the test sources
-            filterCopy( new File( basedir, testSourceDirectory ), new File( filterDir, testSourceDirectory ), properties );
+            filterCopy( new File( basedir, testSourceDirectory ), new File( filterDir, testSourceDirectory ),
+                        properties );
 
             // Now we need to remove the portion of the path that corresonds to package that was used in the
             // archetype master so that when a user generates from it they can specify their own package path

Modified: maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FileUtils.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FileUtils.java?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FileUtils.java (original)
+++ maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FileUtils.java Sun Apr  2 23:56:06 2006
@@ -1,5 +1,21 @@
 package org.apache.maven.archetype;
 
+/*
+ * Copyright 2004-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
 import org.codehaus.plexus.util.DirectoryScanner;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
@@ -159,8 +175,7 @@
     public static String basename( String filename, String suffix )
     {
         int i = filename.lastIndexOf( File.separator ) + 1;
-        int lastDot = ( ( suffix != null ) && ( suffix.length() > 0 ) )
-            ? filename.lastIndexOf( suffix ) : -1;
+        int lastDot = ( ( suffix != null ) && ( suffix.length() > 0 ) ) ? filename.lastIndexOf( suffix ) : -1;
 
         if ( lastDot >= 0 )
         {
@@ -428,7 +443,6 @@
     private static boolean isValidFile( String file, String[] extensions )
     {
 
-
         String extension = extension( file );
         if ( extension == null )
         {
@@ -441,7 +455,9 @@
         for ( int i = 0; i < extensions.length; ++i )
         {
             if ( extensions[i].equals( extension ) )
+            {
                 return true;
+            }
         }
 
         return false;
@@ -689,23 +705,17 @@
      * @throws IOException                   if <code>source</code> does not exist, the file in
      *                                       <code>destinationDirectory</code> cannot be written to, or an IO error occurs during copying.
      */
-    public static void copyFileToDirectory( final String source,
-                                            final String destinationDirectory )
+    public static void copyFileToDirectory( final String source, final String destinationDirectory )
         throws IOException
     {
-        copyFileToDirectory( new File( source ),
-                             new File( destinationDirectory ),
-                             standardCopier );
+        copyFileToDirectory( new File( source ), new File( destinationDirectory ), standardCopier );
     }
 
-    public static void copyFileToDirectory( final String source,
-                                            final String destinationDirectory,
+    public static void copyFileToDirectory( final String source, final String destinationDirectory,
                                             final Copier copier )
         throws IOException
     {
-        copyFileToDirectory( new File( source ),
-                             new File( destinationDirectory ),
-                             copier );
+        copyFileToDirectory( new File( source ), new File( destinationDirectory ), copier );
     }
 
     /**
@@ -721,17 +731,14 @@
      *                                       <code>destinationDirectory</code> cannot be written to, or an IO error occurs during copying.
      */
 
-    public static void copyFileToDirectory( final File source,
-                                            final File destinationDirectory )
+    public static void copyFileToDirectory( final File source, final File destinationDirectory )
         throws IOException
     {
         copyFileToDirectory( source, destinationDirectory, standardCopier );
     }
 
 
-    public static void copyFileToDirectory( final File source,
-                                            final File destinationDirectory,
-                                            final Copier copier )
+    public static void copyFileToDirectory( final File source, final File destinationDirectory, final Copier copier )
         throws IOException
     {
         if ( destinationDirectory.exists() && !destinationDirectory.isDirectory() )
@@ -775,8 +782,7 @@
         }
 
         //does destinations directory exist ?
-        if ( destination.getParentFile() != null &&
-            !destination.getParentFile().exists() )
+        if ( destination.getParentFile() != null && !destination.getParentFile().exists() )
         {
             destination.getParentFile().mkdirs();
         }
@@ -784,8 +790,7 @@
         //make sure we can write to destination
         if ( destination.exists() && !destination.canWrite() )
         {
-            final String message = "Unable to open file " +
-                destination + " for writing.";
+            final String message = "Unable to open file " + destination + " for writing.";
             throw new IOException( message );
         }
 
@@ -823,8 +828,7 @@
         throws IOException
     {
         //does destination directory exist ?
-        if ( destination.getParentFile() != null &&
-            !destination.getParentFile().exists() )
+        if ( destination.getParentFile() != null && !destination.getParentFile().exists() )
         {
             destination.getParentFile().mkdirs();
         }
@@ -832,8 +836,7 @@
         //make sure we can write to destination
         if ( destination.exists() && !destination.canWrite() )
         {
-            final String message = "Unable to open file " +
-                destination + " for writing.";
+            final String message = "Unable to open file " + destination + " for writing.";
             throw new IOException( message );
         }
 
@@ -878,9 +881,10 @@
         {
             int index = normalized.indexOf( "//" );
             if ( index < 0 )
+            {
                 break;
-            normalized = normalized.substring( 0, index ) +
-                normalized.substring( index + 1 );
+            }
+            normalized = normalized.substring( 0, index ) + normalized.substring( index + 1 );
         }
 
         // Resolve occurrences of "/./" in the normalized path
@@ -888,9 +892,10 @@
         {
             int index = normalized.indexOf( "/./" );
             if ( index < 0 )
+            {
                 break;
-            normalized = normalized.substring( 0, index ) +
-                normalized.substring( index + 2 );
+            }
+            normalized = normalized.substring( 0, index ) + normalized.substring( index + 2 );
         }
 
         // Resolve occurrences of "/../" in the normalized path
@@ -898,12 +903,15 @@
         {
             int index = normalized.indexOf( "/../" );
             if ( index < 0 )
+            {
                 break;
+            }
             if ( index == 0 )
+            {
                 return null;  // Trying to go outside our context
+            }
             int index2 = normalized.lastIndexOf( '/', index - 1 );
-            normalized = normalized.substring( 0, index2 ) +
-                normalized.substring( index + 3 );
+            normalized = normalized.substring( 0, index2 ) + normalized.substring( index + 3 );
         }
 
         // Return the normalized path that we have completed
@@ -1005,8 +1013,7 @@
 
         for ( int i = start; i < chars.length; i++ )
         {
-            final boolean doubleSeparator =
-                File.separatorChar == chars[i] && File.separatorChar == chars[i - 1];
+            final boolean doubleSeparator = File.separatorChar == chars[i] && File.separatorChar == chars[i - 1];
 
             if ( !doubleSeparator )
             {
@@ -1058,8 +1065,7 @@
         {
             if ( !file.delete() )
             {
-                final String message =
-                    "File " + file + " unable to be deleted.";
+                final String message = "File " + file + " unable to be deleted.";
                 throw new IOException( message );
             }
         }
@@ -1154,8 +1160,8 @@
         {
             if ( file.isFile() )
             {
-                final String message = "File " + file + " exists and is " +
-                    "not a directory. Unable to create directory.";
+                final String message =
+                    "File " + file + " exists and is " + "not a directory. Unable to create directory.";
                 throw new IOException( message );
             }
         }
@@ -1192,8 +1198,7 @@
         cleanDirectory( directory );
         if ( !directory.delete() )
         {
-            final String message =
-                "Directory " + directory + " unable to be deleted.";
+            final String message = "Directory " + directory + " unable to be deleted.";
             throw new IOException( message );
         }
     }
@@ -1394,13 +1399,15 @@
         copyDirectory( sourceDirectory, destinationDirectory, "**", null );
     }
 
-    public static void copyDirectory( File sourceDirectory, File destinationDirectory, String includes, String excludes )
+    public static void copyDirectory( File sourceDirectory, File destinationDirectory, String includes,
+                                      String excludes )
         throws IOException
     {
         copyDirectory( sourceDirectory, destinationDirectory, includes, excludes, standardCopier );
     }
 
-    public static void copyDirectory( File sourceDirectory, File destinationDirectory, String includes, String excludes, Copier copier )
+    public static void copyDirectory( File sourceDirectory, File destinationDirectory, String includes, String excludes,
+                                      Copier copier )
         throws IOException
     {
         if ( ! sourceDirectory.exists() )
@@ -1464,13 +1471,14 @@
             {
                 destination = destination.getParentFile();
 
-                FileUtils.copyFileToDirectory( file, destination, copier  );
+                FileUtils.copyFileToDirectory( file, destination, copier );
             }
             else if ( file.isDirectory() )
             {
                 if ( !destination.exists() && !destination.mkdirs() )
                 {
-                    throw new IOException( "Could not create destination directory '" + destination.getAbsolutePath() + "'." );
+                    throw new IOException(
+                        "Could not create destination directory '" + destination.getAbsolutePath() + "'." );
                 }
 
                 copyDirectoryStructure( file, destination, copier );
@@ -1497,19 +1505,18 @@
      *                     process.  Note that <code>to</code> may have been deleted
      *                     already when this happens.
      */
-    public static void rename( File from, File to ) throws IOException
+    public static void rename( File from, File to )
+        throws IOException
     {
         if ( to.exists() && !to.delete() )
         {
-            throw new IOException( "Failed to delete " + to
-                + " while trying to rename " + from );
+            throw new IOException( "Failed to delete " + to + " while trying to rename " + from );
         }
 
         File parent = to.getParentFile();
         if ( parent != null && !parent.exists() && !parent.mkdirs() )
         {
-            throw new IOException( "Failed to create directory " + parent
-                + " while trying to rename " + from );
+            throw new IOException( "Failed to create directory " + parent + " while trying to rename " + from );
         }
 
         if ( !from.renameTo( to ) )
@@ -1517,8 +1524,7 @@
             copyFile( from, to );
             if ( !from.delete() )
             {
-                throw new IOException( "Failed to delete " + from
-                    + " while trying to rename it." );
+                throw new IOException( "Failed to delete " + from + " while trying to rename it." );
             }
         }
     }
@@ -1554,15 +1560,12 @@
             parent = parentDir.getPath();
         }
         DecimalFormat fmt = new DecimalFormat( "#####" );
-        Random rand = new Random( System.currentTimeMillis()
-            + Runtime.getRuntime().freeMemory() );
+        Random rand = new Random( System.currentTimeMillis() + Runtime.getRuntime().freeMemory() );
         synchronized ( rand )
         {
             do
             {
-                result = new File( parent,
-                                   prefix + fmt.format( Math.abs( rand.nextInt() ) )
-                                       + suffix );
+                result = new File( parent, prefix + fmt.format( Math.abs( rand.nextInt() ) ) + suffix );
             }
             while ( result.exists() );
         }

Modified: maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FilteringCopier.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FilteringCopier.java?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FilteringCopier.java (original)
+++ maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/FilteringCopier.java Sun Apr  2 23:56:06 2006
@@ -1,5 +1,21 @@
 package org.apache.maven.archetype;
 
+/*
+ * Copyright 2004-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
 import org.apache.oro.text.regex.Pattern;
 import org.apache.oro.text.regex.PatternCompiler;
 import org.apache.oro.text.regex.PatternMatcher;
@@ -27,8 +43,11 @@
     private String replace;
 
     PatternMatcher matcher = new Perl5Matcher();
+
     Pattern pattern = null;
+
     PatternCompiler compiler = new Perl5Compiler();
+
     String regularExpression, input, sub, result;
 
     public FilteringCopier( String find, String replace )
@@ -64,7 +83,9 @@
             pattern = compiler.compile( find );
 
             // Perform substitution and print result.
-            result = Util.substitute( matcher, pattern, new Perl5Substitution( replace, Perl5Substitution.INTERPOLATE_ALL ), s, Util.SUBSTITUTE_ALL );
+            result = Util.substitute( matcher, pattern,
+                                      new Perl5Substitution( replace, Perl5Substitution.INTERPOLATE_ALL ), s,
+                                      Util.SUBSTITUTE_ALL );
 
             FileUtils.fileWrite( destination.getAbsolutePath(), result );
 
@@ -81,7 +102,8 @@
         }
     }
 
-    public static String streamToString( InputStream in ) throws IOException
+    public static String streamToString( InputStream in )
+        throws IOException
     {
         StringBuffer text = new StringBuffer();
         try

Modified: maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/StandardCopier.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/StandardCopier.java?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/StandardCopier.java (original)
+++ maven/archetype/trunk/maven-archetype-creator/src/main/java/org/apache/maven/archetype/StandardCopier.java Sun Apr  2 23:56:06 2006
@@ -1,14 +1,27 @@
+package org.apache.maven.archetype;
+
 /*
- * Copyright (c) 2006 Your Corporation. All Rights Reserved.
+ * Copyright 2004-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
  */
-package org.apache.maven.archetype;
 
 import org.codehaus.plexus.util.IOUtil;
 
 import java.io.File;
-import java.io.IOException;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.IOException;
 
 /**
  * @author Jason van Zyl

Modified: maven/archetype/trunk/maven-archetype-creator/src/test/java/org/apache/maven/archetype/DefaultArchetypeCreatorTest.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-creator/src/test/java/org/apache/maven/archetype/DefaultArchetypeCreatorTest.java?rev=390966&r1=390965&r2=390966&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-creator/src/test/java/org/apache/maven/archetype/DefaultArchetypeCreatorTest.java (original)
+++ maven/archetype/trunk/maven-archetype-creator/src/test/java/org/apache/maven/archetype/DefaultArchetypeCreatorTest.java Sun Apr  2 23:56:06 2006
@@ -1,8 +1,21 @@
 package org.apache.maven.archetype;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+/*
+ * Copyright 2004-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
 import org.codehaus.plexus.PlexusTestCase;
 
 import java.io.File;
@@ -15,6 +28,6 @@
     {
         ArchetypeCreator creator = (ArchetypeCreator) lookup( ArchetypeCreator.ROLE );
 
-        File pom = new File( getBasedir(), "pom.xml" );        
+        File pom = new File( getBasedir(), "pom.xml" );
     }
 }