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:55:09 UTC

svn commit: r390965 - in /maven/archetype/trunk/maven-archetype-core: ./ src/main/java/org/apache/maven/archetype/ src/main/java/org/apache/maven/archetype/descriptor/ src/main/resources/META-INF/plexus/ src/test/java/org/apache/maven/archetype/ src/te...

Author: brett
Date: Sun Apr  2 23:55:06 2006
New Revision: 390965

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

Modified:
    maven/archetype/trunk/maven-archetype-core/pom.xml
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/Archetype.java
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeDescriptorException.java
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeNotFoundException.java
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeTemplateProcessingException.java
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptor.java
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilder.java
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorGenerator.java
    maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/TemplateDescriptor.java
    maven/archetype/trunk/maven-archetype-core/src/main/resources/META-INF/plexus/components.xml
    maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/ArchetypeTest.java
    maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilderTest.java
    maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetype-quickstart-1.0-alpha-1-SNAPSHOT.pom
    maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetypes-1.0-alpha-1-SNAPSHOT.pom
    maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/index.xml
    maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/navigation.xml

Modified: maven/archetype/trunk/maven-archetype-core/pom.xml
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/pom.xml?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/pom.xml (original)
+++ maven/archetype/trunk/maven-archetype-core/pom.xml Sun Apr  2 23:55:06 2006
@@ -1,3 +1,19 @@
+<!--
+  ~ 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>
   <parent>
     <groupId>org.apache.maven.archetype</groupId>

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/Archetype.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/Archetype.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/Archetype.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/Archetype.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeDescriptorException.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeDescriptorException.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeDescriptorException.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeDescriptorException.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeNotFoundException.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeNotFoundException.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeNotFoundException.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeNotFoundException.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeTemplateProcessingException.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeTemplateProcessingException.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeTemplateProcessingException.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/ArchetypeTemplateProcessingException.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.
@@ -16,9 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
 import org.apache.maven.archetype.descriptor.ArchetypeDescriptor;
 import org.apache.maven.archetype.descriptor.ArchetypeDescriptorBuilder;
 import org.apache.maven.archetype.descriptor.TemplateDescriptor;
@@ -44,11 +41,14 @@
 import org.codehaus.plexus.velocity.VelocityComponent;
 
 import java.io.File;
+import java.io.FileOutputStream;
 import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.Writer;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -582,63 +582,73 @@
     //
     // ----------------------------------------------------------------------
 
-    protected void processSources( String outputDirectory, Context context, ArchetypeDescriptor descriptor, String packageName )
+    protected void processSources( String outputDirectory, Context context, ArchetypeDescriptor descriptor,
+                                   String packageName )
         throws ArchetypeTemplateProcessingException
     {
         for ( Iterator i = descriptor.getSources().iterator(); i.hasNext(); )
         {
             String template = (String) i.next();
-            
-            processTemplate( outputDirectory, context, template, descriptor.getSourceDescriptor(template), true, packageName );
+
+            processTemplate( outputDirectory, context, template, descriptor.getSourceDescriptor( template ), true,
+                             packageName );
         }
     }
-    
-    protected void processTestSources( String outputDirectory, Context context, ArchetypeDescriptor descriptor, String packageName )
+
+    protected void processTestSources( String outputDirectory, Context context, ArchetypeDescriptor descriptor,
+                                       String packageName )
         throws ArchetypeTemplateProcessingException
     {
         for ( Iterator i = descriptor.getTestSources().iterator(); i.hasNext(); )
         {
             String template = (String) i.next();
-            
-            processTemplate( outputDirectory, context, template, descriptor.getTestSourceDescriptor(template), true, packageName );
+
+            processTemplate( outputDirectory, context, template, descriptor.getTestSourceDescriptor( template ), true,
+                             packageName );
         }
     }
 
-    protected void processResources( String outputDirectory, Context context, ArchetypeDescriptor descriptor, String packageName )
+    protected void processResources( String outputDirectory, Context context, ArchetypeDescriptor descriptor,
+                                     String packageName )
         throws ArchetypeTemplateProcessingException
     {
         for ( Iterator i = descriptor.getResources().iterator(); i.hasNext(); )
         {
             String template = (String) i.next();
-            
-            processTemplate( outputDirectory, context, template, descriptor.getResourceDescriptor(template), false, packageName );
+
+            processTemplate( outputDirectory, context, template, descriptor.getResourceDescriptor( template ), false,
+                             packageName );
         }
     }
-    
-    protected void processTestResources( String outputDirectory, Context context, ArchetypeDescriptor descriptor, String packageName )
+
+    protected void processTestResources( String outputDirectory, Context context, ArchetypeDescriptor descriptor,
+                                         String packageName )
         throws ArchetypeTemplateProcessingException
     {
         for ( Iterator i = descriptor.getTestResources().iterator(); i.hasNext(); )
         {
             String template = (String) i.next();
-            
-            processTemplate( outputDirectory, context, template, descriptor.getTestResourceDescriptor(template), false, packageName );
+
+            processTemplate( outputDirectory, context, template, descriptor.getTestResourceDescriptor( template ),
+                             false, packageName );
         }
     }
-    
-    protected void processSiteResources( String outputDirectory, Context context, ArchetypeDescriptor descriptor, String packageName )
+
+    protected void processSiteResources( String outputDirectory, Context context, ArchetypeDescriptor descriptor,
+                                         String packageName )
         throws ArchetypeTemplateProcessingException
     {
         for ( Iterator i = descriptor.getSiteResources().iterator(); i.hasNext(); )
         {
             String template = (String) i.next();
-            
-            processTemplate( outputDirectory, context, template, descriptor.getSiteResourceDescriptor(template), false, packageName );
+
+            processTemplate( outputDirectory, context, template, descriptor.getSiteResourceDescriptor( template ),
+                             false, packageName );
         }
     }
 
-    protected void processTemplate( String outputDirectory, Context context, String template, TemplateDescriptor descriptor,
-            boolean packageInFileName, String packageName )
+    protected void processTemplate( String outputDirectory, Context context, String template,
+                                    TemplateDescriptor descriptor, boolean packageInFileName, String packageName )
         throws ArchetypeTemplateProcessingException
     {
         File f;
@@ -672,7 +682,7 @@
             Writer writer = null;
             try
             {
-                writer = new OutputStreamWriter(new FileOutputStream(f), descriptor.getEncoding());
+                writer = new OutputStreamWriter( new FileOutputStream( f ), descriptor.getEncoding() );
 
                 template = ARCHETYPE_RESOURCES + "/" + template;
 
@@ -692,13 +702,13 @@
         else
         {
             InputStream is = getStream( ARCHETYPE_RESOURCES + "/" + template, null );
-            
+
             OutputStream fos = null;
-            
+
             try
             {
-                fos = new FileOutputStream(f);
-                
+                fos = new FileOutputStream( f );
+
                 IOUtil.copy( is, fos );
             }
             catch ( Exception e )
@@ -708,7 +718,7 @@
             finally
             {
                 IOUtil.close( fos );
-                
+
                 IOUtil.close( is );
             }
         }

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptor.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptor.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptor.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptor.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype.descriptor;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.
@@ -34,35 +34,35 @@
     private List testResources;
 
     private List siteResources;
-    
+
     /**
      * <code>Map</code> that associates the items in the <code>List</code>
      * <code>sources</code> with their attributes (instances of
      * <code>TemplateDescriptor</code>.
      */
     private Map sourcesDescriptors;
-    
+
     /**
      * <code>Map</code> that associates the items in the <code>List</code>
      * <code>testSources</code> with their attributes (instances of
      * <code>TemplateDescriptor</code>.
      */
     private Map testSourcesDescriptors;
-    
+
     /**
      * <code>Map</code> that associates the items in the <code>List</code>
      * <code>resources</code> with their attributes (instances of
      * <code>TemplateDescriptor</code>.
      */
     private Map resourcesDescriptors;
-    
+
     /**
      * <code>Map</code> that associates the items in the <code>List</code>
      * <code>testResources</code> with their attributes (instances of
      * <code>TemplateDescriptor</code>.
      */
     private Map testResourcesDescriptors;
-    
+
     /**
      * <code>Map</code> that associates the items in the <code>List</code>
      * <code>siteResources</code> with their attributes (instances of
@@ -81,23 +81,23 @@
     public ArchetypeDescriptor()
     {
         sources = new ArrayList();
-        
+
         resources = new ArrayList();
-        
+
         testSources = new ArrayList();
-        
+
         testResources = new ArrayList();
-        
+
         siteResources = new ArrayList();
-        
+
         sourcesDescriptors = new HashMap();
-        
+
         testSourcesDescriptors = new HashMap();
-        
+
         resourcesDescriptors = new HashMap();
-        
+
         testResourcesDescriptors = new HashMap();
-        
+
         siteResourcesDescriptors = new HashMap();
     }
 
@@ -118,7 +118,7 @@
     public void addSource( String source )
     {
         sources.add( source );
-        
+
         putSourceDescriptor( source, new TemplateDescriptor() );
     }
 
@@ -127,25 +127,25 @@
         return sources;
     }
 
-    public void putSourceDescriptor( String source, TemplateDescriptor descriptor ) 
+    public void putSourceDescriptor( String source, TemplateDescriptor descriptor )
     {
         sourcesDescriptors.put( source, descriptor );
     }
-    
+
     public TemplateDescriptor getSourceDescriptor( String source )
     {
-        return (TemplateDescriptor)sourcesDescriptors.get(source);
+        return (TemplateDescriptor) sourcesDescriptors.get( source );
     }
-    
+
     public Map getSourcesDescriptors()
     {
         return sourcesDescriptors;
     }
-    
+
     public void addTestSource( String testSource )
     {
         testSources.add( testSource );
-        
+
         putTestSourceDescriptor( testSource, new TemplateDescriptor() );
     }
 
@@ -156,23 +156,23 @@
 
     public void putTestSourceDescriptor( String testSource, TemplateDescriptor descriptor )
     {
-        testSourcesDescriptors.put(testSource, descriptor);
+        testSourcesDescriptors.put( testSource, descriptor );
     }
-    
-    public TemplateDescriptor getTestSourceDescriptor(String testSource)
+
+    public TemplateDescriptor getTestSourceDescriptor( String testSource )
     {
-        return (TemplateDescriptor)testSourcesDescriptors.get(testSource);
+        return (TemplateDescriptor) testSourcesDescriptors.get( testSource );
     }
-    
+
     public Map getTestSourcesDescriptors()
     {
         return testSourcesDescriptors;
     }
-    
+
     public void addResource( String resource )
     {
         resources.add( resource );
-        
+
         putResourceDescriptor( resource, new TemplateDescriptor() );
     }
 
@@ -185,16 +185,17 @@
     {
         resourcesDescriptors.put( resource, descriptor );
     }
-    
+
     public TemplateDescriptor getResourceDescriptor( String resource )
     {
-        return ( TemplateDescriptor ) resourcesDescriptors.get( resource );
+        return (TemplateDescriptor) resourcesDescriptors.get( resource );
     }
-    
-    public Map getReourcesDescriptors() {
+
+    public Map getReourcesDescriptors()
+    {
         return resourcesDescriptors;
     }
-    
+
     public void addTestResource( String testResource )
     {
         testResources.add( testResource );
@@ -210,22 +211,22 @@
     {
         testResourcesDescriptors.put( testResource, descriptor );
     }
-    
+
     public TemplateDescriptor getTestResourceDescriptor( String testResource )
     {
-        return ( TemplateDescriptor ) testResourcesDescriptors.get(testResource);
+        return (TemplateDescriptor) testResourcesDescriptors.get( testResource );
     }
-    
+
     public Map getTestReourcesDescriptors()
     {
         return testResourcesDescriptors;
     }
-    
+
     public void addSiteResource( String siteResource )
     {
         siteResources.add( siteResource );
-        
-        putSiteResourceDescriptor(siteResource, new TemplateDescriptor());
+
+        putSiteResourceDescriptor( siteResource, new TemplateDescriptor() );
     }
 
     public List getSiteResources()
@@ -233,21 +234,21 @@
         return siteResources;
     }
 
-    public void putSiteResourceDescriptor(String siteResource, TemplateDescriptor descriptor)
+    public void putSiteResourceDescriptor( String siteResource, TemplateDescriptor descriptor )
     {
         siteResourcesDescriptors.put( siteResource, descriptor );
     }
-    
+
     public TemplateDescriptor getSiteResourceDescriptor( String siteResource )
     {
-        return ( TemplateDescriptor ) siteResourcesDescriptors.get(siteResource);
+        return (TemplateDescriptor) siteResourcesDescriptors.get( siteResource );
     }
-    
+
     public Map getSiteReourcesDescriptors()
     {
         return siteResourcesDescriptors;
     }
-    
+
     public boolean isAllowPartial()
     {
         return allowPartial;

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilder.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilder.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilder.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilder.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype.descriptor;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.
@@ -16,14 +16,14 @@
  * limitations under the License.
  */
 
-import java.nio.charset.IllegalCharsetNameException;
-import java.nio.charset.UnsupportedCharsetException;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.IOException;
 import java.io.Reader;
+import java.nio.charset.IllegalCharsetNameException;
+import java.nio.charset.UnsupportedCharsetException;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -64,7 +64,7 @@
 
             for ( int i = 0; i < sourceList.length; i++ )
             {
-                addSourceToDescriptor(sourceList[i], descriptor);
+                addSourceToDescriptor( sourceList[i], descriptor );
             }
         }
 
@@ -76,7 +76,7 @@
 
             for ( int i = 0; i < resourceList.length; i++ )
             {
-                addResourceToDescriptor(resourceList[i], descriptor);
+                addResourceToDescriptor( resourceList[i], descriptor );
             }
         }
 
@@ -92,7 +92,7 @@
 
             for ( int i = 0; i < testSourceList.length; i++ )
             {
-                addTestSourceToDescriptor(testSourceList[i], descriptor);
+                addTestSourceToDescriptor( testSourceList[i], descriptor );
             }
         }
 
@@ -104,7 +104,7 @@
 
             for ( int i = 0; i < testResourceList.length; i++ )
             {
-                addTestResourceToDescriptor(testResourceList[i], descriptor);
+                addTestResourceToDescriptor( testResourceList[i], descriptor );
             }
         }
 
@@ -120,20 +120,20 @@
 
             for ( int i = 0; i < siteResourceList.length; i++ )
             {
-                addSiteResourceToDescriptor(siteResourceList[i], descriptor);
+                addSiteResourceToDescriptor( siteResourceList[i], descriptor );
             }
         }
 
         return descriptor;
     }
-    
+
     /**
      * Adds the source element <code>source</code> to the list of sources in the
      * <code>descriptor</code> and sets its <code>TemplateDescriptor</code> to
      * <i>filtered</i> and with the encoding specified in the <code>encoding</code>
      * attribute or the Java virtual machine's default if it is not defined.
      *
-     * @param source a <code>&lt;source&gt;</code> element from the <code>&lt;sources&gt;</code>
+     * @param source     a <code>&lt;source&gt;</code> element from the <code>&lt;sources&gt;</code>
      * @param descriptor the <code>ArchetypeDescriptor</code> to add the source template to.
      * @throws XmlPullParserException if the encoding specified is not valid or supported.
      */
@@ -141,12 +141,12 @@
         throws XmlPullParserException
     {
         descriptor.addSource( source.getValue() );
-        
+
         TemplateDescriptor sourceDesc = descriptor.getSourceDescriptor( source.getValue() );
-        
+
         sourceDesc.setFiltered( true );
-        
-        if ( source.getAttribute( "encoding" ) != null)
+
+        if ( source.getAttribute( "encoding" ) != null )
         {
             try
             {
@@ -154,17 +154,15 @@
             }
             catch ( IllegalCharsetNameException icne )
             {
-                throw new XmlPullParserException( source.getAttribute( "encoding" )
-                        + " is not a valid encoding." );
+                throw new XmlPullParserException( source.getAttribute( "encoding" ) + " is not a valid encoding." );
             }
             catch ( UnsupportedCharsetException uce )
             {
-                throw new XmlPullParserException(source.getAttribute( "encoding" )
-                        + " is not a supported encoding." );
+                throw new XmlPullParserException( source.getAttribute( "encoding" ) + " is not a supported encoding." );
             }
         }
     }
-    
+
     /**
      * Adds the resource element <code>resource</code> to the list of resources in the
      * <code>descriptor</code> and sets its <code>TemplateDescriptor</code> to
@@ -176,57 +174,57 @@
      * <code>.properties</code>) its encoding will be set to <code>iso-8859-1</code>
      * even if some other encoding is specified in the attribute.
      *
-     * @param resource a <code>&lt;resource&gt;</code> element from the <code>&lt;resources&gt;</code>
+     * @param resource   a <code>&lt;resource&gt;</code> element from the <code>&lt;resources&gt;</code>
      * @param descriptor the <code>ArchetypeDescriptor</code> to add the resource template to.
      * @throws XmlPullParserException if the encoding specified is not valid or supported or if the
-     *     value of the attribute <code>filtered</code> is no valid.
+     *                                value of the attribute <code>filtered</code> is no valid.
      */
     private static void addResourceToDescriptor( Xpp3Dom resource, ArchetypeDescriptor descriptor )
         throws XmlPullParserException
     {
         descriptor.addResource( resource.getValue() );
-        
-        if ( resource.getAttribute("filtered") != null)
+
+        if ( resource.getAttribute( "filtered" ) != null )
         {
             TemplateDescriptor resourceDesc = descriptor.getResourceDescriptor( resource.getValue() );
-            
+
             try
             {
                 resourceDesc.setFiltered( getValueFilteredAttribute( resource.getAttribute( "filtered" ) ) );
             }
-            catch ( IllegalArgumentException iae ) {
+            catch ( IllegalArgumentException iae )
+            {
                 throw new XmlPullParserException( iae.getMessage() );
             }
         }
-        
-        if ( resource.getAttribute( "encoding" ) != null)
+
+        if ( resource.getAttribute( "encoding" ) != null )
         {
             TemplateDescriptor resourceDesc = descriptor.getResourceDescriptor( resource.getValue() );
-            
+
             try
             {
                 resourceDesc.setEncoding( resource.getAttribute( "encoding" ) );
             }
             catch ( IllegalCharsetNameException icne )
             {
-                throw new XmlPullParserException( resource.getAttribute( "encoding" )
-                        + " is not a valid encoding." );
+                throw new XmlPullParserException( resource.getAttribute( "encoding" ) + " is not a valid encoding." );
             }
             catch ( UnsupportedCharsetException uce )
             {
-                throw new XmlPullParserException( resource.getAttribute( "encoding" )
-                        + " is not a supported encoding." );
+                throw new XmlPullParserException(
+                    resource.getAttribute( "encoding" ) + " is not a supported encoding." );
             }
         }
-        
-        if ( resource.getValue().endsWith(".properties") )
+
+        if ( resource.getValue().endsWith( ".properties" ) )
         {
             TemplateDescriptor resourceDesc = descriptor.getResourceDescriptor( resource.getValue() );
-            
+
             resourceDesc.setEncoding( "iso-8859-1" );
         }
     }
-    
+
     /**
      * Adds the test-source element <code>source</code> to the list of sources in the
      * <code>descriptor</code> and sets its <code>TemplateDescriptor</code> to
@@ -237,23 +235,30 @@
      * @param descriptor the <code>ArchetypeDescriptor</code> to add the test-source template to.
      * @throws XmlPullParserException if the encoding specified is not valid or supported.
      */
-    private static void addTestSourceToDescriptor( Xpp3Dom testSource, ArchetypeDescriptor descriptor ) throws XmlPullParserException {
+    private static void addTestSourceToDescriptor( Xpp3Dom testSource, ArchetypeDescriptor descriptor )
+        throws XmlPullParserException
+    {
         descriptor.addTestSource( testSource.getValue() );
-        TemplateDescriptor testSourceDesc = descriptor.getTestSourceDescriptor(testSource.getValue());
-        testSourceDesc.setFiltered(true);
-        if ( testSource.getAttribute("encoding") != null) {
-            try {
-                testSourceDesc.setEncoding(testSource.getAttribute("encoding"));
-            } catch(IllegalCharsetNameException icne) {
-                throw new XmlPullParserException(testSource.getAttribute("encoding")
-                        + " is not a valid encoding.");
-            } catch(UnsupportedCharsetException uce) {
-                throw new XmlPullParserException(testSource.getAttribute("encoding")
-                        + " is not a supported encoding.");
+        TemplateDescriptor testSourceDesc = descriptor.getTestSourceDescriptor( testSource.getValue() );
+        testSourceDesc.setFiltered( true );
+        if ( testSource.getAttribute( "encoding" ) != null )
+        {
+            try
+            {
+                testSourceDesc.setEncoding( testSource.getAttribute( "encoding" ) );
+            }
+            catch ( IllegalCharsetNameException icne )
+            {
+                throw new XmlPullParserException( testSource.getAttribute( "encoding" ) + " is not a valid encoding." );
+            }
+            catch ( UnsupportedCharsetException uce )
+            {
+                throw new XmlPullParserException(
+                    testSource.getAttribute( "encoding" ) + " is not a supported encoding." );
             }
         }
     }
-    
+
     /**
      * Adds the test-resource element <code>resource</code> to the list of test-resources in the
      * <code>descriptor</code> and sets its <code>TemplateDescriptor</code> to
@@ -266,58 +271,58 @@
      * even if some other encoding is specified in the attribute.
      *
      * @param testResource a <code>&lt;resource&gt;</code> element from the <code>&lt;testResources&gt;</code>
-     * @param descriptor the <code>ArchetypeDescriptor</code> to add the test-resource template to.
+     * @param descriptor   the <code>ArchetypeDescriptor</code> to add the test-resource template to.
      * @throws XmlPullParserException if the encoding specified is not valid or supported or if the
-     *     value of the attribute <code>filtered</code> is no valid.
+     *                                value of the attribute <code>filtered</code> is no valid.
      */
     private static void addTestResourceToDescriptor( Xpp3Dom testResource, ArchetypeDescriptor descriptor )
         throws XmlPullParserException
     {
         descriptor.addTestResource( testResource.getValue() );
-        
-        if ( testResource.getAttribute("filtered") != null) 
+
+        if ( testResource.getAttribute( "filtered" ) != null )
         {
-            TemplateDescriptor testResourceDesc = descriptor.getTestResourceDescriptor(testResource.getValue());
-            
+            TemplateDescriptor testResourceDesc = descriptor.getTestResourceDescriptor( testResource.getValue() );
+
             try
             {
-                testResourceDesc.setFiltered(getValueFilteredAttribute(testResource.getAttribute("filtered")));
-            } 
-            catch (IllegalArgumentException iae)
+                testResourceDesc.setFiltered( getValueFilteredAttribute( testResource.getAttribute( "filtered" ) ) );
+            }
+            catch ( IllegalArgumentException iae )
             {
-                throw new XmlPullParserException(iae.getMessage());
+                throw new XmlPullParserException( iae.getMessage() );
             }
         }
-        
-        if ( testResource.getAttribute("encoding") != null)
+
+        if ( testResource.getAttribute( "encoding" ) != null )
         {
-            TemplateDescriptor testResourceDesc = descriptor.getTestResourceDescriptor(testResource.getValue());
-            
+            TemplateDescriptor testResourceDesc = descriptor.getTestResourceDescriptor( testResource.getValue() );
+
             try
             {
-                testResourceDesc.setEncoding(testResource.getAttribute("encoding"));
-                
+                testResourceDesc.setEncoding( testResource.getAttribute( "encoding" ) );
+
             }
-            catch(IllegalCharsetNameException icne) 
+            catch ( IllegalCharsetNameException icne )
             {
-                throw new XmlPullParserException(testResource.getAttribute("encoding")
-                        + " is not a valid encoding.");
+                throw new XmlPullParserException(
+                    testResource.getAttribute( "encoding" ) + " is not a valid encoding." );
             }
-            catch(UnsupportedCharsetException uce)
+            catch ( UnsupportedCharsetException uce )
             {
-                throw new XmlPullParserException(testResource.getAttribute("encoding")
-                        + " is not a supported encoding.");
+                throw new XmlPullParserException(
+                    testResource.getAttribute( "encoding" ) + " is not a supported encoding." );
             }
         }
-        
-        if ( testResource.getValue().endsWith(".properties") ) 
+
+        if ( testResource.getValue().endsWith( ".properties" ) )
         {
-            TemplateDescriptor testResourceDesc = descriptor.getTestResourceDescriptor(testResource.getValue());
-            
-            testResourceDesc.setEncoding("iso-8859-1");
+            TemplateDescriptor testResourceDesc = descriptor.getTestResourceDescriptor( testResource.getValue() );
+
+            testResourceDesc.setEncoding( "iso-8859-1" );
         }
     }
-    
+
     /**
      * Adds the site-resource element <code>resource</code> to the list of site-resources in the
      * <code>descriptor</code> and sets its <code>TemplateDescriptor</code> to
@@ -330,71 +335,71 @@
      * even if some other encoding is specified in the attribute.
      *
      * @param siteResource a <code>&lt;resource&gt;</code> element from the <code>&lt;siteResources&gt;</code>
-     * @param descriptor the <code>ArchetypeDescriptor</code> to add the site-resource template to.
+     * @param descriptor   the <code>ArchetypeDescriptor</code> to add the site-resource template to.
      * @throws XmlPullParserException if the encoding specified is not valid or supported or if the
-     *     value of the attribute <code>filtered</code> is no valid.
+     *                                value of the attribute <code>filtered</code> is no valid.
      */
     private static void addSiteResourceToDescriptor( Xpp3Dom siteResource, ArchetypeDescriptor descriptor )
         throws XmlPullParserException
     {
         descriptor.addSiteResource( siteResource.getValue() );
-        
-        if ( siteResource.getAttribute("filtered") != null ) 
+
+        if ( siteResource.getAttribute( "filtered" ) != null )
         {
-            TemplateDescriptor siteResourceDesc = descriptor.getSiteResourceDescriptor(siteResource.getValue());
-            
+            TemplateDescriptor siteResourceDesc = descriptor.getSiteResourceDescriptor( siteResource.getValue() );
+
             try
             {
-                siteResourceDesc.setFiltered(getValueFilteredAttribute(siteResource.getAttribute("filtered")));
+                siteResourceDesc.setFiltered( getValueFilteredAttribute( siteResource.getAttribute( "filtered" ) ) );
             }
-            catch (IllegalArgumentException iae)
+            catch ( IllegalArgumentException iae )
             {
-                throw new XmlPullParserException(iae.getMessage());
+                throw new XmlPullParserException( iae.getMessage() );
             }
         }
-        if ( siteResource.getAttribute("encoding") != null )
+        if ( siteResource.getAttribute( "encoding" ) != null )
         {
-            TemplateDescriptor siteResourceDesc = descriptor.getSiteResourceDescriptor(siteResource.getValue());
-            
+            TemplateDescriptor siteResourceDesc = descriptor.getSiteResourceDescriptor( siteResource.getValue() );
+
             try
             {
-                siteResourceDesc.setEncoding(siteResource.getAttribute("encoding"));
+                siteResourceDesc.setEncoding( siteResource.getAttribute( "encoding" ) );
             }
-            catch(IllegalCharsetNameException icne)
+            catch ( IllegalCharsetNameException icne )
             {
-                throw new XmlPullParserException(siteResource.getAttribute("encoding")
-                        + " is not a valid encoding.");
+                throw new XmlPullParserException(
+                    siteResource.getAttribute( "encoding" ) + " is not a valid encoding." );
             }
-            catch(UnsupportedCharsetException uce)
+            catch ( UnsupportedCharsetException uce )
             {
-                throw new XmlPullParserException(siteResource.getAttribute("encoding")
-                        + " is not a supported encoding.");
+                throw new XmlPullParserException(
+                    siteResource.getAttribute( "encoding" ) + " is not a supported encoding." );
             }
         }
-        if ( siteResource.getValue().endsWith(".properties") )
+        if ( siteResource.getValue().endsWith( ".properties" ) )
         {
-            TemplateDescriptor siteResourceDesc = descriptor.getSiteResourceDescriptor(siteResource.getValue());
-            
-            siteResourceDesc.setEncoding("iso-8859-1");
+            TemplateDescriptor siteResourceDesc = descriptor.getSiteResourceDescriptor( siteResource.getValue() );
+
+            siteResourceDesc.setEncoding( "iso-8859-1" );
         }
     }
-    
-    private static boolean getValueFilteredAttribute( String str ) 
-        throws IllegalArgumentException 
+
+    private static boolean getValueFilteredAttribute( String str )
+        throws IllegalArgumentException
     {
         boolean ret = false;
-        
+
         if ( str.equals( "true" ) )
         {
             ret = true;
         }
-        else if (str.equals("false"))
+        else if ( str.equals( "false" ) )
         {
             ret = false;
         }
         else
         {
-            throw new IllegalArgumentException(str + " is not an accepted value for the attribute 'filtered'");
+            throw new IllegalArgumentException( str + " is not an accepted value for the attribute 'filtered'" );
         }
         return ret;
     }

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorGenerator.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorGenerator.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorGenerator.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorGenerator.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype.descriptor;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.

Modified: maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/TemplateDescriptor.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/TemplateDescriptor.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/TemplateDescriptor.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/java/org/apache/maven/archetype/descriptor/TemplateDescriptor.java Sun Apr  2 23:55:06 2006
@@ -1,9 +1,7 @@
+package org.apache.maven.archetype.descriptor;
+
 /*
- * TemplateDescriptor.java
- *
- * Created on March 30, 2006, 1:40 PM
- *
- * Copyright 2006 The Apache Software Foundation.
+ * 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.
@@ -18,8 +16,6 @@
  * limitations under the License.
  */
 
-package org.apache.maven.archetype.descriptor;
-
 import java.io.OutputStreamWriter;
 import java.nio.charset.Charset;
 import java.nio.charset.IllegalCharsetNameException;
@@ -29,27 +25,30 @@
  * Contains the attributes of an archetype's template (either a source or resource file).
  * The attributes indicate if the template should be filtered and it's encoding.
  */
-public class TemplateDescriptor 
+public class TemplateDescriptor
 {
-    
+
     /**
-     * Determines if the template should be filtered or not.*/
+     * Determines if the template should be filtered or not.
+     */
     private boolean filtered = true;
-    
+
     /**
-     * Determines the template's encoding. */
+     * Determines the template's encoding.
+     */
     private String encoding;
-    
+
     /**
      * Creates a new instance of <code>TemplateDescriptor<code> that should be filtered
-     * and has the default encoding. */
+     * and has the default encoding.
+     */
     public TemplateDescriptor()
     {
         setFiltered( true );
-        
+
         setEncoding( getDefaultEncoding() );
     }
-    
+
     /**
      * Returns the canonical name of the default character encoding of this Java
      * virtual machine.
@@ -58,18 +57,18 @@
      */
     private static String getDefaultEncoding()
     {
-	String name = System.getProperty( "file.encoding" );
-        
-	if ( name == null )
+        String name = System.getProperty( "file.encoding" );
+
+        if ( name == null )
         {
-	    OutputStreamWriter out = new OutputStreamWriter( System.out );
-            
-	    name = out.getEncoding();
-	}
-        
-	name = Charset.forName(name).name();
-        
-	return name;
+            OutputStreamWriter out = new OutputStreamWriter( System.out );
+
+            name = out.getEncoding();
+        }
+
+        name = Charset.forName( name ).name();
+
+        return name;
     }
 
     /**
@@ -77,7 +76,7 @@
      * <code>false</code> otherwise.
      *
      * @return <code>true</code> if the template should be filtered and
-     *     <code>false</code> otherwise.
+     *         <code>false</code> otherwise.
      */
     public boolean isFiltered()
     {
@@ -85,11 +84,11 @@
     }
 
     /**
-     * Defines whether the template should be filtered (processed by Velocity) 
+     * Defines whether the template should be filtered (processed by Velocity)
      * or not.
      *
      * @param filtered <code>true</code> if it should be processed by Velocity and
-     *    <code>fales</code> otherwise.
+     *                 <code>fales</code> otherwise.
      */
     public void setFiltered( boolean filtered )
     {
@@ -97,7 +96,7 @@
     }
 
     /**
-     * Returns the name of the  encoding of the template file (e.g. 
+     * Returns the name of the  encoding of the template file (e.g.
      * <code>us-ascci</code>, <code>utf-8</code>, <code>iso-8859-1</code>).
      *
      * @return the name of the  encoding of the template file.
@@ -113,14 +112,14 @@
      * @param encoding New value of property encoding.
      * @throws IllegalCharsetNameException if the given charset name is illegal
      * @throws UnsupportedCharsetException if no support for the named encoding
-     *     is available in this instance of the Java virtual machine
+     *                                     is available in this instance of the Java virtual machine
      */
-    public void setEncoding( String encoding ) 
+    public void setEncoding( String encoding )
         throws IllegalCharsetNameException, UnsupportedCharsetException
     {
         Charset.forName( encoding );
-        
+
         this.encoding = encoding;
     }
-    
+
 }

Modified: maven/archetype/trunk/maven-archetype-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/main/resources/META-INF/plexus/components.xml?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/archetype/trunk/maven-archetype-core/src/main/resources/META-INF/plexus/components.xml Sun Apr  2 23:55:06 2006
@@ -1,3 +1,19 @@
+<!--
+  ~ 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.
+  -->
+
 <component-set>
   <components>
     <component>

Modified: maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/ArchetypeTest.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/ArchetypeTest.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/ArchetypeTest.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/ArchetypeTest.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.
@@ -16,13 +16,12 @@
  * limitations under the License.
  */
 
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.util.FileUtils;
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -60,7 +59,8 @@
         // This needs to be encapsulated in a maven test case.
         // ----------------------------------------------------------------------
 
-        ArtifactRepositoryLayout layout = (ArtifactRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE, "legacy" );
+        ArtifactRepositoryLayout layout =
+            (ArtifactRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE, "legacy" );
 
         String mavenRepoLocal = getTestFile( "target/local-repository" ).toURL().toString();
 
@@ -74,12 +74,8 @@
 
         remoteRepositories.add( remoteRepository );
 
-        archetype.createArchetype( "org.apache.maven.archetypes",
-                                   "maven-archetype-quickstart",
-                                   "1.0-alpha-1-SNAPSHOT",
-                                   localRepository,
-                                   remoteRepositories,
-                                   parameters );
+        archetype.createArchetype( "org.apache.maven.archetypes", "maven-archetype-quickstart", "1.0-alpha-1-SNAPSHOT",
+                                   localRepository, remoteRepositories, parameters );
 
         // TODO: validate output
     }

Modified: maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilderTest.java?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilderTest.java (original)
+++ maven/archetype/trunk/maven-archetype-core/src/test/java/org/apache/maven/archetype/descriptor/ArchetypeDescriptorBuilderTest.java Sun Apr  2 23:55:06 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.archetype.descriptor;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * 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.
@@ -16,14 +16,14 @@
  * limitations under the License.
  */
 
-import java.io.IOException;
 import junit.framework.Test;
 import junit.framework.TestCase;
-
-import java.io.StringReader;
 import junit.framework.TestSuite;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
+import java.io.IOException;
+import java.io.StringReader;
+
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id$
@@ -31,17 +31,19 @@
 public class ArchetypeDescriptorBuilderTest
     extends TestCase
 {
-    public ArchetypeDescriptorBuilderTest(String str) {
-        super(str);
+    public ArchetypeDescriptorBuilderTest( String str )
+    {
+        super( str );
     }
-    
-    public static Test suite() { 
-        TestSuite suite= new TestSuite(); 
-        suite.addTest(new ArchetypeDescriptorBuilderTest("testBuilder"));
-        suite.addTest(new ArchetypeDescriptorBuilderTest("testBuild"));
+
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite();
+        suite.addTest( new ArchetypeDescriptorBuilderTest( "testBuilder" ) );
+        suite.addTest( new ArchetypeDescriptorBuilderTest( "testBuild" ) );
         return suite;
     }
-    
+
     public void testBuilder()
         throws Exception
     {
@@ -61,101 +63,89 @@
         assertEquals( 2, descriptor.getSources().size() );
 
         assertEquals( "source0", descriptor.getSources().get( 0 ) );
-        
-        assertNotNull( descriptor.getSourceDescriptor("source0") );
-        
-        assertEquals( true, descriptor.getSourceDescriptor("source0").isFiltered() );
-        
-        assertNotNull( descriptor.getSourceDescriptor("source0").getEncoding() );
+
+        assertNotNull( descriptor.getSourceDescriptor( "source0" ) );
+
+        assertEquals( true, descriptor.getSourceDescriptor( "source0" ).isFiltered() );
+
+        assertNotNull( descriptor.getSourceDescriptor( "source0" ).getEncoding() );
 
         assertEquals( "source1", descriptor.getSources().get( 1 ) );
-        
-        assertNotNull( descriptor.getSourceDescriptor("source1") );
-        
-        assertEquals( true, descriptor.getSourceDescriptor("source1").isFiltered() );
-        
-        assertNotNull( descriptor.getSourceDescriptor("source1").getEncoding() );
+
+        assertNotNull( descriptor.getSourceDescriptor( "source1" ) );
+
+        assertEquals( true, descriptor.getSourceDescriptor( "source1" ).isFiltered() );
+
+        assertNotNull( descriptor.getSourceDescriptor( "source1" ).getEncoding() );
 
         assertEquals( 2, descriptor.getResources().size() );
 
         assertEquals( "resource0", descriptor.getResources().get( 0 ) );
-        
-        assertNotNull( descriptor.getResourceDescriptor("resource0") );
-        
-        assertEquals( true, descriptor.getResourceDescriptor("resource0").isFiltered() );
-        
-        assertNotNull( descriptor.getResourceDescriptor("resource0").getEncoding() );
+
+        assertNotNull( descriptor.getResourceDescriptor( "resource0" ) );
+
+        assertEquals( true, descriptor.getResourceDescriptor( "resource0" ).isFiltered() );
+
+        assertNotNull( descriptor.getResourceDescriptor( "resource0" ).getEncoding() );
 
         assertEquals( "resource1", descriptor.getResources().get( 1 ) );
-        
-        assertNotNull( descriptor.getResourceDescriptor("resource1") );
-        
-        assertEquals( true, descriptor.getResourceDescriptor("resource1").isFiltered() );
-        
-        assertNotNull( descriptor.getResourceDescriptor("resource1").getEncoding() );
+
+        assertNotNull( descriptor.getResourceDescriptor( "resource1" ) );
+
+        assertEquals( true, descriptor.getResourceDescriptor( "resource1" ).isFiltered() );
+
+        assertNotNull( descriptor.getResourceDescriptor( "resource1" ).getEncoding() );
 
         assertEquals( 2, descriptor.getTestSources().size() );
 
         assertEquals( "testSource0", descriptor.getTestSources().get( 0 ) );
-        
-        assertNotNull( descriptor.getTestSourceDescriptor("testSource0") );
-        
-        assertEquals( true, descriptor.getTestSourceDescriptor("testSource0").isFiltered() );
-        
-        assertNotNull( descriptor.getTestSourceDescriptor("testSource0").getEncoding() );
+
+        assertNotNull( descriptor.getTestSourceDescriptor( "testSource0" ) );
+
+        assertEquals( true, descriptor.getTestSourceDescriptor( "testSource0" ).isFiltered() );
+
+        assertNotNull( descriptor.getTestSourceDescriptor( "testSource0" ).getEncoding() );
 
         assertEquals( "testSource1", descriptor.getTestSources().get( 1 ) );
-        
-        assertNotNull( descriptor.getTestSourceDescriptor("testSource1") );
-        
-        assertEquals( true, descriptor.getTestSourceDescriptor("testSource1").isFiltered() );
-        
-        assertNotNull( descriptor.getTestSourceDescriptor("testSource1").getEncoding() );
+
+        assertNotNull( descriptor.getTestSourceDescriptor( "testSource1" ) );
+
+        assertEquals( true, descriptor.getTestSourceDescriptor( "testSource1" ).isFiltered() );
+
+        assertNotNull( descriptor.getTestSourceDescriptor( "testSource1" ).getEncoding() );
 
         assertEquals( 2, descriptor.getTestResources().size() );
 
         assertEquals( "testResource0", descriptor.getTestResources().get( 0 ) );
-        
-        assertNotNull( descriptor.getTestResourceDescriptor("testResource0") );
-        
-        assertEquals( true, descriptor.getTestResourceDescriptor("testResource0").isFiltered() );
-        
-        assertNotNull( descriptor.getTestResourceDescriptor("testResource0").getEncoding() );
+
+        assertNotNull( descriptor.getTestResourceDescriptor( "testResource0" ) );
+
+        assertEquals( true, descriptor.getTestResourceDescriptor( "testResource0" ).isFiltered() );
+
+        assertNotNull( descriptor.getTestResourceDescriptor( "testResource0" ).getEncoding() );
 
         assertEquals( "testResource1", descriptor.getTestResources().get( 1 ) );
-        
-        assertNotNull( descriptor.getTestResourceDescriptor("testResource1") );
-        
-        assertEquals( true, descriptor.getTestResourceDescriptor("testResource1").isFiltered() );
-        
-        assertNotNull( descriptor.getTestResourceDescriptor("testResource1").getEncoding() );
+
+        assertNotNull( descriptor.getTestResourceDescriptor( "testResource1" ) );
+
+        assertEquals( true, descriptor.getTestResourceDescriptor( "testResource1" ).isFiltered() );
+
+        assertNotNull( descriptor.getTestResourceDescriptor( "testResource1" ).getEncoding() );
     }
-    
-    public void testBuild() throws IOException, XmlPullParserException
+
+    public void testBuild()
+        throws IOException, XmlPullParserException
     {
-        String xml = "<archetype>" 
-                + "  <id>standard</id>" 
-                + "  <sources>" 
-                + "    <source encoding=\"utf-8\">source0</source>" 
-                + "    <source encoding=\"utf-8\">source1</source>"
-                + "  </sources>"
-                + "  <resources>"
-                + "    <resource filtered=\"false\">resource0</resource>" 
-                + "    <resource encoding=\"iso-8859-1\">resource1</resource>" 
-                + "  </resources>" 
-                + "  <testSources>" 
-                + "    <source encoding=\"utf-8\">testSource0</source>" 
-                + "    <source encoding=\"utf-8\">testSource1</source>" 
-                + "  </testSources>" 
-                + "  <testResources>" 
-                + "    <resource encoding=\"us-ascii\">testResource0</resource>" 
-                + "    <resource filtered=\"false\">testResource1</resource>" 
-                + "  </testResources>" 
-                + "  <siteResources>"
-                + "    <resource filtered=\"false\">siteResource0</resource>"
-                + "    <resource encoding=\"utf-16\">siteResource1</resource>" 
-                + "  </siteResources>"
-                + "</archetype>";
+        String xml = "<archetype>" + "  <id>standard</id>" + "  <sources>" +
+            "    <source encoding=\"utf-8\">source0</source>" + "    <source encoding=\"utf-8\">source1</source>" +
+            "  </sources>" + "  <resources>" + "    <resource filtered=\"false\">resource0</resource>" +
+            "    <resource encoding=\"iso-8859-1\">resource1</resource>" + "  </resources>" + "  <testSources>" +
+            "    <source encoding=\"utf-8\">testSource0</source>" +
+            "    <source encoding=\"utf-8\">testSource1</source>" + "  </testSources>" + "  <testResources>" +
+            "    <resource encoding=\"us-ascii\">testResource0</resource>" +
+            "    <resource filtered=\"false\">testResource1</resource>" + "  </testResources>" + "  <siteResources>" +
+            "    <resource filtered=\"false\">siteResource0</resource>" +
+            "    <resource encoding=\"utf-16\">siteResource1</resource>" + "  </siteResources>" + "</archetype>";
 
         ArchetypeDescriptorBuilder builder = new ArchetypeDescriptorBuilder();
 
@@ -166,91 +156,91 @@
         assertEquals( 2, descriptor.getSources().size() );
 
         assertEquals( "source0", descriptor.getSources().get( 0 ) );
-        
-        assertNotNull( descriptor.getSourceDescriptor("source0") );
-        
-        assertEquals( true, descriptor.getSourceDescriptor("source0").isFiltered() );
-        
-        assertEquals( "utf-8", descriptor.getSourceDescriptor("source0").getEncoding() );
+
+        assertNotNull( descriptor.getSourceDescriptor( "source0" ) );
+
+        assertEquals( true, descriptor.getSourceDescriptor( "source0" ).isFiltered() );
+
+        assertEquals( "utf-8", descriptor.getSourceDescriptor( "source0" ).getEncoding() );
 
         assertEquals( "source1", descriptor.getSources().get( 1 ) );
-        
-        assertNotNull( descriptor.getSourceDescriptor("source1") );
-        
-        assertEquals( true, descriptor.getSourceDescriptor("source1").isFiltered() );
-        
-        assertEquals( "utf-8", descriptor.getSourceDescriptor("source1").getEncoding() );
+
+        assertNotNull( descriptor.getSourceDescriptor( "source1" ) );
+
+        assertEquals( true, descriptor.getSourceDescriptor( "source1" ).isFiltered() );
+
+        assertEquals( "utf-8", descriptor.getSourceDescriptor( "source1" ).getEncoding() );
 
         assertEquals( 2, descriptor.getResources().size() );
 
         assertEquals( "resource0", descriptor.getResources().get( 0 ) );
-        
-        assertNotNull( descriptor.getResourceDescriptor("resource0") );
-        
-        assertEquals( false, descriptor.getResourceDescriptor("resource0").isFiltered() );
-        
-        assertNotNull( descriptor.getResourceDescriptor("resource0").getEncoding() );
+
+        assertNotNull( descriptor.getResourceDescriptor( "resource0" ) );
+
+        assertEquals( false, descriptor.getResourceDescriptor( "resource0" ).isFiltered() );
+
+        assertNotNull( descriptor.getResourceDescriptor( "resource0" ).getEncoding() );
 
         assertEquals( "resource1", descriptor.getResources().get( 1 ) );
-        
-        assertNotNull( descriptor.getResourceDescriptor("resource1") );
-        
-        assertEquals( true, descriptor.getResourceDescriptor("resource1").isFiltered() );
-        
-        assertEquals( "iso-8859-1", descriptor.getResourceDescriptor("resource1").getEncoding() );
+
+        assertNotNull( descriptor.getResourceDescriptor( "resource1" ) );
+
+        assertEquals( true, descriptor.getResourceDescriptor( "resource1" ).isFiltered() );
+
+        assertEquals( "iso-8859-1", descriptor.getResourceDescriptor( "resource1" ).getEncoding() );
 
         assertEquals( 2, descriptor.getTestSources().size() );
 
         assertEquals( "testSource0", descriptor.getTestSources().get( 0 ) );
-        
-        assertNotNull( descriptor.getTestSourceDescriptor("testSource0") );
-        
-        assertEquals( true, descriptor.getTestSourceDescriptor("testSource0").isFiltered() );
-        
-        assertEquals( "utf-8", descriptor.getTestSourceDescriptor("testSource0").getEncoding() );
+
+        assertNotNull( descriptor.getTestSourceDescriptor( "testSource0" ) );
+
+        assertEquals( true, descriptor.getTestSourceDescriptor( "testSource0" ).isFiltered() );
+
+        assertEquals( "utf-8", descriptor.getTestSourceDescriptor( "testSource0" ).getEncoding() );
 
         assertEquals( "testSource1", descriptor.getTestSources().get( 1 ) );
-        
-        assertNotNull( descriptor.getTestSourceDescriptor("testSource1") );
-        
-        assertEquals( true, descriptor.getTestSourceDescriptor("testSource1").isFiltered() );
-        
-        assertEquals( "utf-8", descriptor.getTestSourceDescriptor("testSource1").getEncoding() );
+
+        assertNotNull( descriptor.getTestSourceDescriptor( "testSource1" ) );
+
+        assertEquals( true, descriptor.getTestSourceDescriptor( "testSource1" ).isFiltered() );
+
+        assertEquals( "utf-8", descriptor.getTestSourceDescriptor( "testSource1" ).getEncoding() );
 
         assertEquals( 2, descriptor.getTestResources().size() );
 
         assertEquals( "testResource0", descriptor.getTestResources().get( 0 ) );
-        
-        assertNotNull(descriptor.getTestResourceDescriptor("testResource0"));
-        
-        assertEquals( true, descriptor.getTestResourceDescriptor("testResource0").isFiltered() );
-        
-        assertEquals( "us-ascii", descriptor.getTestResourceDescriptor("testResource0").getEncoding() );
+
+        assertNotNull( descriptor.getTestResourceDescriptor( "testResource0" ) );
+
+        assertEquals( true, descriptor.getTestResourceDescriptor( "testResource0" ).isFiltered() );
+
+        assertEquals( "us-ascii", descriptor.getTestResourceDescriptor( "testResource0" ).getEncoding() );
 
         assertEquals( "testResource1", descriptor.getTestResources().get( 1 ) );
-        
-        assertNotNull(descriptor.getTestResourceDescriptor("testResource1"));
-        
-        assertEquals( false, descriptor.getTestResourceDescriptor("testResource1").isFiltered() );
-        
-        assertNotNull(descriptor.getTestResourceDescriptor("testResource1").getEncoding() );
-        
+
+        assertNotNull( descriptor.getTestResourceDescriptor( "testResource1" ) );
+
+        assertEquals( false, descriptor.getTestResourceDescriptor( "testResource1" ).isFiltered() );
+
+        assertNotNull( descriptor.getTestResourceDescriptor( "testResource1" ).getEncoding() );
+
         assertEquals( 2, descriptor.getSiteResources().size() );
 
         assertEquals( "siteResource0", descriptor.getSiteResources().get( 0 ) );
-        
-        assertNotNull(descriptor.getSiteResourceDescriptor("siteResource0"));
-        
-        assertEquals( false, descriptor.getSiteResourceDescriptor("siteResource0").isFiltered() );
-        
-        assertNotNull( descriptor.getSiteResourceDescriptor("siteResource0").getEncoding() );
+
+        assertNotNull( descriptor.getSiteResourceDescriptor( "siteResource0" ) );
+
+        assertEquals( false, descriptor.getSiteResourceDescriptor( "siteResource0" ).isFiltered() );
+
+        assertNotNull( descriptor.getSiteResourceDescriptor( "siteResource0" ).getEncoding() );
 
         assertEquals( "siteResource1", descriptor.getSiteResources().get( 1 ) );
-        
-        assertNotNull(descriptor.getSiteResourceDescriptor("siteResource1"));
-        
-        assertEquals( true, descriptor.getSiteResourceDescriptor("siteResource1").isFiltered() );
-        
-        assertEquals( "utf-16", descriptor.getSiteResourceDescriptor("siteResource1").getEncoding());
+
+        assertNotNull( descriptor.getSiteResourceDescriptor( "siteResource1" ) );
+
+        assertEquals( true, descriptor.getSiteResourceDescriptor( "siteResource1" ).isFiltered() );
+
+        assertEquals( "utf-16", descriptor.getSiteResourceDescriptor( "siteResource1" ).getEncoding() );
     }
 }

Modified: maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetype-quickstart-1.0-alpha-1-SNAPSHOT.pom
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetype-quickstart-1.0-alpha-1-SNAPSHOT.pom?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetype-quickstart-1.0-alpha-1-SNAPSHOT.pom (original)
+++ maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetype-quickstart-1.0-alpha-1-SNAPSHOT.pom Sun Apr  2 23:55:06 2006
@@ -1,3 +1,19 @@
+<!--
+  ~ 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>
   <parent>
     <artifactId>maven-archetypes</artifactId>

Modified: maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetypes-1.0-alpha-1-SNAPSHOT.pom
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetypes-1.0-alpha-1-SNAPSHOT.pom?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetypes-1.0-alpha-1-SNAPSHOT.pom (original)
+++ maven/archetype/trunk/maven-archetype-core/src/test/repository/org.apache.maven.archetypes/poms/maven-archetypes-1.0-alpha-1-SNAPSHOT.pom Sun Apr  2 23:55:06 2006
@@ -1,3 +1,19 @@
+<!--
+  ~ 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.
+  -->
+
 <model>
   <parent>
     <artifactId>maven-archetype</artifactId>

Modified: maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/index.xml?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/index.xml (original)
+++ maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/index.xml Sun Apr  2 23:55:06 2006
@@ -1,5 +1,21 @@
 <?xml version="1.0"?>
 
+<!--
+  ~ 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.
+  -->
+
 <document>
   <properties>
     <title>Maven</title>
@@ -13,15 +29,19 @@
         artifacts produced by Maven are a result of consulting a well defined
         model for your project. Builds, documentation, source metrics, and source
         cross-references are all controlled by your POM. Look here to see the
-        full list of Maven's <a href="features.html"><b>features</b></a>.
+        full list of Maven's
+        <a href="features.html">
+          <b>features</b>
+        </a>
+        .
       </p>
-      
+
       <source>
-      public class Foo
-      {
-      }
+        public class Foo
+        {
+        }
       </source>
-      
+
     </section>
   </body>
 </document>

Modified: maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/navigation.xml
URL: http://svn.apache.org/viewcvs/maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/navigation.xml?rev=390965&r1=390964&r2=390965&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/navigation.xml (original)
+++ maven/archetype/trunk/maven-archetype-core/src/test/resources/xdocs/navigation.xml Sun Apr  2 23:55:06 2006
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ 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 name="Maven">
 
   <title>Maven</title>
@@ -7,7 +23,7 @@
     <links>
       <item name="Plexus" href="http://plexus.codehaus.org"/>
     </links>
-    
+
     <menu name="Quick Links">
       <item name="Model" href="/maven.html"/>
     </menu>