maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r612343 [1/2] - in /maven/plugins/trunk/maven-shade-plugin: ./ src/main/java/org/apache/maven/plugins/shade/ src/main/java/org/apache/maven/plugins/shade/mojo/ src/main/java/org/apache/maven/plugins/shade/pom/ src/main/java/org/apache/maven...
Date Wed, 16 Jan 2008 03:36:18 GMT
Author: vsiveton
Date: Tue Jan 15 19:35:30 2008
New Revision: 612343

URL: http://svn.apache.org/viewvc?rev=612343&view=rev
Log:
o improved readingness of POM
o added license header
o added <issueManagement/>

Modified:
    maven/plugins/trunk/maven-shade-plugin/pom.xml
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadeConfiguration.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/Shader.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadingResult.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ArtifactSet.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/PackageRelocation.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/PomWriter.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/Relocator.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformer.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/AppendingTransformer.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ComponentsXmlResourceTransformer.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/DontIncludeResourceTransformer.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/IncludeResourceTransformer.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ResourceTransformer.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/XmlAppendingTransformer.java
    maven/plugins/trunk/maven-shade-plugin/src/test/java/org/apache/maven/plugins/shade/DefaultShaderTest.java
    maven/plugins/trunk/maven-shade-plugin/src/test/java/org/apache/maven/plugins/shade/mojo/ShadeMojoTest.java

Modified: maven/plugins/trunk/maven-shade-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/pom.xml?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/pom.xml Tue Jan 15 19:35:30 2008
@@ -1,35 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+  <modelVersion>4.0.0</modelVersion>
+
   <parent>
      <artifactId>maven-plugins</artifactId>
      <groupId>org.apache.maven.plugins</groupId>
      <version>8</version>
-  </parent>
-  <artifactId>maven-shade-plugin</artifactId>
-  <packaging>maven-plugin</packaging>
+  </parent>
+
+  <artifactId>maven-shade-plugin</artifactId>
   <version>1.0-beta-1-SNAPSHOT</version>
-  <name>maven-shade-plugin</name>
-  <licenses>
-    <license>
-      <name>Apache License 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
-  <developers>
-    <developer>
-      <id>jvanzyl</id>
-      <name>Jason van Zyl</name>
-      <timezone>-8</timezone>
-    </developer>
-    <developer>
-      <id>mauro</id>
-      <name>Mauro Talevi</name>
-      <timezone>0</timezone>
-    </developer>
-  </developers>
+  <packaging>maven-plugin</packaging>
+  <name>maven-shade-plugin</name>
+
+  <issueManagement>
+    <system>jira</system>
+    <url>http://jira.codehaus.org/browse/MSHADE</url>
+  </issueManagement>
 
-  <dependencies>
+  <dependencies>
+    <!-- Maven -->
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-model</artifactId>
+      <version>2.0.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.0.6</version>
+    </dependency>
+
+    <!-- Plexus -->
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.4.1</version>
+    </dependency>
+
+    <!-- Others -->
     <dependency>
       <groupId>asm</groupId>
       <artifactId>asm-all</artifactId>
@@ -39,34 +71,16 @@
       <groupId>jdom</groupId>
       <artifactId>jdom</artifactId>
       <version>1.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>1.4.1</version>
-    </dependency> 
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <version>2.0.6</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-model</artifactId>
-      <version>2.0.6</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-project</artifactId>
-      <version>2.0.6</version>
-    </dependency>
+    </dependency>
+
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>3.8.1</version>
       <scope>test</scope>
     </dependency>
-  </dependencies>
+  </dependencies>
+
   <build>
    <plugins>
       <plugin>

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/DefaultShader.java Tue Jan 15 19:35:30 2008
@@ -1,20 +1,24 @@
+package org.apache.maven.plugins.shade;
+
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package org.apache.maven.plugins.shade;
-
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -73,7 +77,7 @@
                 if ( !entry.isDirectory() )
                 {
                     int idx = mappedName.lastIndexOf('/');
-                    if ( idx != -1 ) 
+                    if ( idx != -1 )
                     {
                         //make sure dirs are created
                         String dir = mappedName.substring(0, idx);
@@ -82,7 +86,7 @@
                             addDirectory( resources, jos, dir );
                         }
                     }
-                    
+
                     if ( name.endsWith( ".class" ) )
                     {
                         addRemappedClass( remapper, jos, jar, name, is );
@@ -104,7 +108,7 @@
 
                 IOUtil.close( is );
             }
-            
+
             jarFile.close();
         }
 
@@ -139,21 +143,21 @@
         entry.setCompressedSize(0);
         entry.setCrc(0);
         jos.putNextEntry( entry );
-        
+
         resources.add( name );
     }
 
     private void addRemappedClass( RelocatorRemapper remapper, JarOutputStream jos, File jar, String name, InputStream is )
         throws IOException
     {
-        if ( !remapper.hasRelocators() ) 
+        if ( !remapper.hasRelocators() )
         {
             jos.putNextEntry( new JarEntry( name ) );
 
             IOUtil.copy( is, jos );
             return;
         }
-        
+
         ClassReader cr = new ClassReader( is );
 
         ClassWriter cw = new ClassWriter( cr, 0 );
@@ -164,7 +168,7 @@
 
         byte[] renamedClass = cw.toByteArray();
 
-        // Need to take the .class off for remapping evaluation                        
+        // Need to take the .class off for remapping evaluation
         String mappedName = remapper.map( name.substring( 0, name.indexOf( '.' ) ) );
 
         try
@@ -220,8 +224,8 @@
         {
             this.relocators = relocators;
         }
-        
-        public boolean hasRelocators() 
+
+        public boolean hasRelocators()
         {
             return !relocators.isEmpty();
         }

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadeConfiguration.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadeConfiguration.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadeConfiguration.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadeConfiguration.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,8 +18,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
-package org.apache.maven.plugins.shade;
 
 /** @author Jason van Zyl */
 public interface ShadeConfiguration

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/Shader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/Shader.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/Shader.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/Shader.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,8 +18,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
-package org.apache.maven.plugins.shade;
 
 import java.io.File;
 import java.io.IOException;

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadingResult.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadingResult.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadingResult.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/ShadingResult.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,8 +18,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
-package org.apache.maven.plugins.shade;
 
 /** @author Jason van Zyl */
 public class ShadingResult

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ArtifactSet.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ArtifactSet.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ArtifactSet.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ArtifactSet.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.mojo;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,8 +18,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-  
-package org.apache.maven.plugins.shade.mojo;
 
 import java.util.Set;
 

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/PackageRelocation.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/PackageRelocation.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/PackageRelocation.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/PackageRelocation.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.mojo;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,12 +18,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.maven.plugins.shade.mojo;
 
 import java.util.List;
 
-/** 
- * @author Jason van Zyl 
+/**
+ * @author Jason van Zyl
  * @author Mauro Talevi
  */
 public class PackageRelocation

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.mojo;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,7 +18,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.maven.plugins.shade.mojo;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -52,7 +53,7 @@
 
 /**
  * Mojo that performs shading delegating to the Shader component.
- * 
+ *
  * @author Jason van Zyl
  * @author Mauro Talevi
  * @goal shade
@@ -76,7 +77,7 @@
 
     /**
      * Remote repositories which will be searched for source attachments.
-     * 
+     *
      * @parameter expression="${project.remoteArtifactRepositories}"
      * @required
      * @readonly
@@ -85,16 +86,16 @@
 
     /**
      * Local maven repository.
-     * 
+     *
      * @parameter expression="${localRepository}"
      * @required
      * @readonly
      */
     protected ArtifactRepository localRepository;
-    
+
     /**
      * Artifact factory, needed to download source jars for inclusion in classpath.
-     * 
+     *
      * @component role="org.apache.maven.artifact.factory.ArtifactFactory"
      * @required
      * @readonly
@@ -103,13 +104,13 @@
 
     /**
      * Artifact resolver, needed to download source jars for inclusion in classpath.
-     * 
+     *
      * @component role="org.apache.maven.artifact.resolver.ArtifactResolver"
      * @required
      * @readonly
      */
     protected ArtifactResolver artifactResolver;
-    
+
     /**
      * Artifacts to include/exclude from the final artifact.
      *
@@ -140,7 +141,7 @@
      * @parameter expression="${finalName}"
      */
     private String finalName;
-    
+
     /**
      * The name of the shaded artifactId. So you may want to use a different artifactId and keep
      * the standard version. If the original artifactId was "foo" then the final artifact would
@@ -149,7 +150,7 @@
      *
      * @parameter expression="${shadedArtifactId}" default-value="${project.artifactId}"
      */
-    private String shadedArtifactId;        
+    private String shadedArtifactId;
 
     /**
      * If specified, this will include only artifacts which have groupIds which
@@ -180,7 +181,7 @@
      * @parameter expression="${keepDependenciesWithProvidedScope}" default-value="false"
      */
     private boolean keepDependenciesWithProvidedScope;
-    
+
     /**
      * When true, transitive deps of removed dependencies are promoted to direct dependencies.
      * This should allow the drop in replacement of the removed deps with the new shaded
@@ -189,7 +190,7 @@
      * @parameter expression="${promoteTransitiveDependencies}" default-value="false"
      */
     private boolean promoteTransitiveDependencies;
-    
+
 
     /**
      * The name of the classifier used in case the shaded artifact is attached.
@@ -197,15 +198,15 @@
      * @parameter expression="${shadedClassifierName}" default-value="shaded"
      */
     private String shadedClassifierName;
-    
+
     /**
      * When true, it will attempt to create a sources jar as well
-     * 
+     *
      * @parameter expression="${createSourcesJar}" default-value="false"
      */
     private boolean createSourcesJar;
 
-    
+
     /** @throws MojoExecutionException  */
     public void execute()
         throws MojoExecutionException
@@ -217,7 +218,7 @@
         for ( Iterator it = project.getArtifacts().iterator(); it.hasNext(); )
         {
             Artifact artifact = (Artifact) it.next();
-   
+
             if ( excludeArtifact( artifact ) )
             {
                 getLog().info( "Excluding " + artifact.getId() + " from the shaded jar." );
@@ -230,11 +231,11 @@
             artifacts.add( artifact.getFile() );
 
             artifactIds.add( getId( artifact ) );
-            
+
             if ( createSourcesJar )
             {
                 File file = resolveArtifactSources( artifact );
-                if ( file != null ) 
+                if ( file != null )
                 {
                     sourceArtifacts.add( file );
                 }
@@ -242,11 +243,11 @@
         }
 
         artifacts.add( project.getArtifact().getFile() );
-        
-        if ( createSourcesJar ) 
+
+        if ( createSourcesJar )
         {
             File file = shadedSourcesArtifactFile();
-            if ( file.exists() ) 
+            if ( file.exists() )
             {
                 artifacts.add( file );
             }
@@ -263,10 +264,10 @@
             List resourceTransformers = getResourceTrasformers();
 
             shader.shade( artifacts, outputJar, relocators, resourceTransformers );
-            
+
             if (createSourcesJar)
             {
-                shader.shade( sourceArtifacts, sourcesJar, relocators, resourceTransformers );                
+                shader.shade( sourceArtifacts, sourcesJar, relocators, resourceTransformers );
             }
 
             if ( shadedArtifactAttached )
@@ -285,13 +286,13 @@
                 getLog().info( "Replacing original artifact with shaded artifact." );
                 File file = shadedArtifactFile();
                 replaceFile( file, outputJar );
-                
-                if ( createSourcesJar ) 
+
+                if ( createSourcesJar )
                 {
                     file = shadedSourcesArtifactFile();
-                    
+
                     replaceFile( file, sourcesJar );
-                    
+
                     projectHelper.attachArtifact( project, "jar",
                                                   "sources", file );
                 }
@@ -311,22 +312,22 @@
     private void replaceFile(File oldFile, File newFile) throws MojoExecutionException
     {
         getLog().info("Replacing " + oldFile + " with " + newFile);
-        
+
         File origFile = new File( outputDirectory, "original-" + oldFile.getName() );
         if ( oldFile.exists() && !oldFile.renameTo( origFile ) )
         {
             //try a gc to see if an unclosed stream needs garbage collecting
             System.gc();
             System.gc();
-        
+
             if ( !oldFile.renameTo( origFile ) )
             {
                 // Still didn't work.   We'll do a copy
-                try 
+                try
                 {
                     FileOutputStream fout = new FileOutputStream( origFile );
                     FileInputStream fin = new FileInputStream( oldFile );
-                    try 
+                    try
                     {
                         IOUtil.copy(fin, fout);
                     }
@@ -336,7 +337,7 @@
                         IOUtil.close( fout );
                     }
                 }
-                catch (IOException ex) 
+                catch (IOException ex)
                 {
                     //kind of ignorable here.   We're just trying to save the original
                     getLog().warn(ex);
@@ -347,15 +348,15 @@
         {
             //try a gc to see if an unclosed stream needs garbage collecting
             System.gc();
-            System.gc();            
+            System.gc();
             if ( !newFile.renameTo( oldFile ) )
             {
                 // Still didn't work.   We'll do a copy
-                try 
+                try
                 {
                     FileOutputStream fout = new FileOutputStream( oldFile );
                     FileInputStream fin = new FileInputStream( newFile );
-                    try 
+                    try
                     {
                         IOUtil.copy(fin, fout);
                     }
@@ -365,7 +366,7 @@
                         IOUtil.close( fout );
                     }
                 }
-                catch (IOException ex) 
+                catch (IOException ex)
                 {
                     throw new MojoExecutionException( "Could not replace original artifact with shaded artifact!" );
                 }
@@ -374,7 +375,7 @@
     }
 
     private File resolveArtifactSources(Artifact artifact) {
-        
+
         Artifact resolvedArtifact =
             artifactFactory.createArtifactWithClassifier( artifact.getGroupId(),
                                                           artifact.getArtifactId(),
@@ -394,8 +395,8 @@
         {
             getLog().warn( "Could not get sources for " + artifact );
         }
-        
-        if ( resolvedArtifact.isResolved() ) 
+
+        if ( resolvedArtifact.isResolved() )
         {
             return resolvedArtifact.getFile();
         }
@@ -432,7 +433,7 @@
         {
             return artifactSet.getExcludes();
         }
-        
+
         return Collections.EMPTY_SET;
     }
 
@@ -493,9 +494,9 @@
     private File shadedArtifactFile()
     {
         Artifact artifact = project.getArtifact();
-        
+
         String shadedName;
-        
+
         if ( finalName != null )
         {
             shadedName = finalName + "." + artifact.getArtifactHandler().getExtension();
@@ -504,15 +505,15 @@
         {
             shadedName = shadedArtifactId + "-" + artifact.getVersion() + "." + artifact.getArtifactHandler().getExtension();
         }
-        
+
         return new File( outputDirectory, shadedName );
     }
     private File shadedSourcesArtifactFile()
     {
         Artifact artifact = project.getArtifact();
-        
+
         String shadedName;
-        
+
         if ( finalName != null )
         {
             shadedName = finalName + "-sources." + artifact.getArtifactHandler().getExtension();
@@ -521,7 +522,7 @@
         {
             shadedName = shadedArtifactId + "-" + artifact.getVersion() + "-sources." + artifact.getArtifactHandler().getExtension();
         }
-        
+
         return new File( outputDirectory, shadedName );
     }
 
@@ -547,9 +548,9 @@
         List dependencies = new ArrayList();
 
         boolean modified = false;
-        
+
         List origDeps = getProject().getDependencies();
-        if ( promoteTransitiveDependencies ) 
+        if ( promoteTransitiveDependencies )
         {
             origDeps = new ArrayList();
             for ( Iterator it = project.getArtifacts().iterator(); it.hasNext(); )
@@ -568,20 +569,20 @@
                 dep.setScope( artifact.getScope() );
                 dep.setType( artifact.getType() );
                 dep.setVersion( artifact.getVersion() );
-                
+
                 // How to do these?
                 //dep.setSystemPath( .... );
                 //dep.setExclusions( exclusions );
                 origDeps.add( dep );
             }
         }
-        
+
         for ( Iterator i = origDeps.iterator(); i.hasNext(); )
         {
             Dependency d = (Dependency) i.next();
 
             dependencies.add( d );
-            
+
             String id = d.getGroupId() + ":" + d.getArtifactId();
 
             if ( artifactsToRemove.contains( id ) )
@@ -605,7 +606,7 @@
             model.setDependencies( dependencies );
 
             File f = new File( outputDirectory, "dependency-reduced-pom.xml" );
-            if (f.exists()) 
+            if (f.exists())
             {
                 f.delete();
             }

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,7 @@
+package org.apache.maven.plugins.shade.pom;
+
+//package org.apache.maven.model.io.jdom;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,14 +21,6 @@
  * under the License.
  */
 
-/*
- * $Id: MavenJDOMWriter.java 3974 2007-04-23 23:55:40Z jvanzyl $
- */
-
-package org.apache.maven.plugins.shade.pom;
-
-//package org.apache.maven.model.io.jdom;
-
   //---------------------------------/
  //- Imported classes and packages -/
 //---------------------------------/
@@ -91,7 +87,7 @@
 
 /**
  * Class MavenJDOMWriter.
- * 
+ *
  * @version $Revision: 3974 $ $Date: 2007-04-23 19:55:40 -0400 (Mon, 23 Apr 2007) $
  */
 public class MavenJDOMWriter {
@@ -128,7 +124,7 @@
 
     /**
      * Method findAndReplaceProperties
-     * 
+     *
      * @param counter
      * @param props
      * @param name
@@ -156,11 +152,11 @@
             }
         }
         return element;
-    } //-- Element findAndReplaceProperties(Counter, Element, String, Map) 
+    } //-- Element findAndReplaceProperties(Counter, Element, String, Map)
 
     /**
      * Method findAndReplaceSimpleElement
-     * 
+     *
      * @param counter
      * @param defaultValue
      * @param text
@@ -182,11 +178,11 @@
             element.setText(text);
         }
         return element;
-    } //-- Element findAndReplaceSimpleElement(Counter, Element, String, String, String) 
+    } //-- Element findAndReplaceSimpleElement(Counter, Element, String, String, String)
 
     /**
      * Method findAndReplaceSimpleLists
-     * 
+     *
      * @param counter
      * @param childName
      * @param parentName
@@ -223,11 +219,11 @@
             }
         }
         return element;
-    } //-- Element findAndReplaceSimpleLists(Counter, Element, java.util.Collection, String, String) 
+    } //-- Element findAndReplaceSimpleLists(Counter, Element, java.util.Collection, String, String)
 
     /**
      * Method findAndReplaceXpp3DOM
-     * 
+     *
      * @param counter
      * @param dom
      * @param name
@@ -241,11 +237,11 @@
             replaceXpp3DOM(element, dom, new Counter(counter.getDepth() + 1));
         }
         return element;
-    } //-- Element findAndReplaceXpp3DOM(Counter, Element, String, Xpp3Dom) 
+    } //-- Element findAndReplaceXpp3DOM(Counter, Element, String, Xpp3Dom)
 
     /**
      * Method insertAtPreferredLocation
-     * 
+     *
      * @param parent
      * @param counter
      * @param child
@@ -285,11 +281,11 @@
         }
         parent.addContent(contentIndex, child);
         parent.addContent(contentIndex, lastText);
-    } //-- void insertAtPreferredLocation(Element, Element, Counter) 
+    } //-- void insertAtPreferredLocation(Element, Element, Counter)
 
     /**
      * Method iterateContributor
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -325,11 +321,11 @@
                 }
             }
         }
-    } //-- void iterateContributor(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateContributor(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateDependency
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -365,11 +361,11 @@
                 }
             }
         }
-    } //-- void iterateDependency(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateDependency(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateDeveloper
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -405,11 +401,11 @@
                 }
             }
         }
-    } //-- void iterateDeveloper(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateDeveloper(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateExclusion
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -445,11 +441,11 @@
                 }
             }
         }
-    } //-- void iterateExclusion(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateExclusion(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateExtension
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -485,11 +481,11 @@
                 }
             }
         }
-    } //-- void iterateExtension(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateExtension(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateLicense
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -525,11 +521,11 @@
                 }
             }
         }
-    } //-- void iterateLicense(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateLicense(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateMailingList
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -565,11 +561,11 @@
                 }
             }
         }
-    } //-- void iterateMailingList(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateMailingList(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateNotifier
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -605,11 +601,11 @@
                 }
             }
         }
-    } //-- void iterateNotifier(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateNotifier(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iteratePlugin
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -645,11 +641,11 @@
                 }
             }
         }
-    } //-- void iteratePlugin(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iteratePlugin(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iteratePluginExecution
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -685,11 +681,11 @@
                 }
             }
         }
-    } //-- void iteratePluginExecution(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iteratePluginExecution(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateProfile
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -725,11 +721,11 @@
                 }
             }
         }
-    } //-- void iterateProfile(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateProfile(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateReportPlugin
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -765,11 +761,11 @@
                 }
             }
         }
-    } //-- void iterateReportPlugin(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateReportPlugin(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateReportSet
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -805,11 +801,11 @@
                 }
             }
         }
-    } //-- void iterateReportSet(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateReportSet(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateRepository
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -845,11 +841,11 @@
                 }
             }
         }
-    } //-- void iterateRepository(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateRepository(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method iterateResource
-     * 
+     *
      * @param counter
      * @param childTag
      * @param parentTag
@@ -885,11 +881,11 @@
                 }
             }
         }
-    } //-- void iterateResource(Counter, Element, java.util.Collection, java.lang.String, java.lang.String) 
+    } //-- void iterateResource(Counter, Element, java.util.Collection, java.lang.String, java.lang.String)
 
     /**
      * Method replaceXpp3DOM
-     * 
+     *
      * @param parent
      * @param counter
      * @param parentDom
@@ -934,11 +930,11 @@
         } else if (parentDom.getValue() != null) {
             parent.setText(parentDom.getValue());
         }
-    } //-- void replaceXpp3DOM(Element, Xpp3Dom, Counter) 
+    } //-- void replaceXpp3DOM(Element, Xpp3Dom, Counter)
 
     /**
      * Method updateActivation
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -963,7 +959,7 @@
 
     /**
      * Method updateActivationCustom
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -979,12 +975,12 @@
             findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
             findAndReplaceSimpleElement(innerCount, root,  "type", value.getType(), null);
         }
-    } //-- void updateActivationCustom(ActivationCustom, String, Counter, Element) 
+    } //-- void updateActivationCustom(ActivationCustom, String, Counter, Element)
       */
 
     /**
      * Method updateActivationFile
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -999,11 +995,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "missing", value.getMissing(), null);
             findAndReplaceSimpleElement(innerCount, root,  "exists", value.getExists(), null);
         }
-    } //-- void updateActivationFile(ActivationFile, String, Counter, Element) 
+    } //-- void updateActivationFile(ActivationFile, String, Counter, Element)
 
     /**
      * Method updateActivationOS
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1020,11 +1016,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "arch", value.getArch(), null);
             findAndReplaceSimpleElement(innerCount, root,  "version", value.getVersion(), null);
         }
-    } //-- void updateActivationOS(ActivationOS, String, Counter, Element) 
+    } //-- void updateActivationOS(ActivationOS, String, Counter, Element)
 
     /**
      * Method updateActivationProperty
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1039,11 +1035,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "name", value.getName(), null);
             findAndReplaceSimpleElement(innerCount, root,  "value", value.getValue(), null);
         }
-    } //-- void updateActivationProperty(ActivationProperty, String, Counter, Element) 
+    } //-- void updateActivationProperty(ActivationProperty, String, Counter, Element)
 
     /**
      * Method updateBuild
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1070,11 +1066,11 @@
             updatePluginManagement( value.getPluginManagement(), "pluginManagement", innerCount, root);
             iteratePlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
         }
-    } //-- void updateBuild(Build, String, Counter, Element) 
+    } //-- void updateBuild(Build, String, Counter, Element)
 
     /**
      * Method updateBuildBase
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1095,11 +1091,11 @@
             updatePluginManagement( value.getPluginManagement(), "pluginManagement", innerCount, root);
             iteratePlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
         }
-    } //-- void updateBuildBase(BuildBase, String, Counter, Element) 
+    } //-- void updateBuildBase(BuildBase, String, Counter, Element)
 
     /**
      * Method updateCiManagement
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1115,11 +1111,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
             iterateNotifier(innerCount, root, value.getNotifiers(),"notifiers","notifier");
         }
-    } //-- void updateCiManagement(CiManagement, String, Counter, Element) 
+    } //-- void updateCiManagement(CiManagement, String, Counter, Element)
 
     /**
      * Method updateConfigurationContainer
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1134,11 +1130,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "inherited", value.getInherited(), null);
             findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
         }
-    } //-- void updateConfigurationContainer(ConfigurationContainer, String, Counter, Element) 
+    } //-- void updateConfigurationContainer(ConfigurationContainer, String, Counter, Element)
 
     /**
      * Method updateContributor
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1156,11 +1152,11 @@
         findAndReplaceSimpleLists(innerCount, root, value.getRoles(), "roles", "role");
         findAndReplaceSimpleElement(innerCount, root,  "timezone", value.getTimezone(), null);
         findAndReplaceProperties(innerCount, root,  "properties", value.getProperties());
-    } //-- void updateContributor(Contributor, String, Counter, Element) 
+    } //-- void updateContributor(Contributor, String, Counter, Element)
 
     /**
      * Method updateDependency
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1179,11 +1175,11 @@
         findAndReplaceSimpleElement(innerCount, root,  "systemPath", value.getSystemPath(), null);
         iterateExclusion(innerCount, root, value.getExclusions(),"exclusions","exclusion");
         findAndReplaceSimpleElement(innerCount, root,  "optional", value.isOptional() == false ? null : String.valueOf( value.isOptional() ), "false");
-    } //-- void updateDependency(Dependency, String, Counter, Element) 
+    } //-- void updateDependency(Dependency, String, Counter, Element)
 
     /**
      * Method updateDependencyManagement
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1197,11 +1193,11 @@
             Counter innerCount = new Counter(counter.getDepth() + 1);
             iterateDependency(innerCount, root, value.getDependencies(),"dependencies","dependency");
         }
-    } //-- void updateDependencyManagement(DependencyManagement, String, Counter, Element) 
+    } //-- void updateDependencyManagement(DependencyManagement, String, Counter, Element)
 
     /**
      * Method updateDeploymentRepository
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1219,11 +1215,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
             findAndReplaceSimpleElement(innerCount, root,  "layout", value.getLayout(), "default");
         }
-    } //-- void updateDeploymentRepository(DeploymentRepository, String, Counter, Element) 
+    } //-- void updateDeploymentRepository(DeploymentRepository, String, Counter, Element)
 
     /**
      * Method updateDeveloper
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1242,11 +1238,11 @@
         findAndReplaceSimpleLists(innerCount, root, value.getRoles(), "roles", "role");
         findAndReplaceSimpleElement(innerCount, root,  "timezone", value.getTimezone(), null);
         findAndReplaceProperties(innerCount, root,  "properties", value.getProperties());
-    } //-- void updateDeveloper(Developer, String, Counter, Element) 
+    } //-- void updateDeveloper(Developer, String, Counter, Element)
 
     /**
      * Method updateDistributionManagement
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1265,11 +1261,11 @@
             updateRelocation( value.getRelocation(), "relocation", innerCount, root);
             findAndReplaceSimpleElement(innerCount, root,  "status", value.getStatus(), null);
         }
-    } //-- void updateDistributionManagement(DistributionManagement, String, Counter, Element) 
+    } //-- void updateDistributionManagement(DistributionManagement, String, Counter, Element)
 
     /**
      * Method updateElement
-     * 
+     *
      * @param counter
      * @param shouldExist
      * @param name
@@ -1300,11 +1296,11 @@
             parent.removeContent(element);
         }
         return element;
-    } //-- Element updateElement(Counter, Element, String, boolean) 
+    } //-- Element updateElement(Counter, Element, String, boolean)
 
     /**
      * Method updateExclusion
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1316,11 +1312,11 @@
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root,  "artifactId", value.getArtifactId(), null);
         findAndReplaceSimpleElement(innerCount, root,  "groupId", value.getGroupId(), null);
-    } //-- void updateExclusion(Exclusion, String, Counter, Element) 
+    } //-- void updateExclusion(Exclusion, String, Counter, Element)
 
     /**
      * Method updateExtension
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1333,11 +1329,11 @@
         findAndReplaceSimpleElement(innerCount, root,  "groupId", value.getGroupId(), null);
         findAndReplaceSimpleElement(innerCount, root,  "artifactId", value.getArtifactId(), null);
         findAndReplaceSimpleElement(innerCount, root,  "version", value.getVersion(), null);
-    } //-- void updateExtension(Extension, String, Counter, Element) 
+    } //-- void updateExtension(Extension, String, Counter, Element)
 
     /**
      * Method updateFileSet
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1353,11 +1349,11 @@
             findAndReplaceSimpleLists(innerCount, root, value.getIncludes(), "includes", "include");
             findAndReplaceSimpleLists(innerCount, root, value.getExcludes(), "excludes", "exclude");
         }
-    } //-- void updateFileSet(FileSet, String, Counter, Element) 
+    } //-- void updateFileSet(FileSet, String, Counter, Element)
 
     /**
      * Method updateIssueManagement
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1372,11 +1368,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "system", value.getSystem(), null);
             findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
         }
-    } //-- void updateIssueManagement(IssueManagement, String, Counter, Element) 
+    } //-- void updateIssueManagement(IssueManagement, String, Counter, Element)
 
     /**
      * Method updateLicense
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1390,11 +1386,11 @@
         findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
         findAndReplaceSimpleElement(innerCount, root,  "distribution", value.getDistribution(), null);
         findAndReplaceSimpleElement(innerCount, root,  "comments", value.getComments(), null);
-    } //-- void updateLicense(License, String, Counter, Element) 
+    } //-- void updateLicense(License, String, Counter, Element)
 
     /**
      * Method updateMailingList
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1410,11 +1406,11 @@
         findAndReplaceSimpleElement(innerCount, root,  "post", value.getPost(), null);
         findAndReplaceSimpleElement(innerCount, root,  "archive", value.getArchive(), null);
         findAndReplaceSimpleLists(innerCount, root, value.getOtherArchives(), "otherArchives", "otherArchive");
-    } //-- void updateMailingList(MailingList, String, Counter, Element) 
+    } //-- void updateMailingList(MailingList, String, Counter, Element)
 
     /**
      * Method updateModel
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1454,11 +1450,11 @@
         updateDependencyManagement( value.getDependencyManagement(), "dependencyManagement", innerCount, root);
         updateDistributionManagement( value.getDistributionManagement(), "distributionManagement", innerCount, root);
         findAndReplaceProperties(innerCount, root,  "properties", value.getProperties());
-    } //-- void updateModel(Model, String, Counter, Element) 
+    } //-- void updateModel(Model, String, Counter, Element)
 
     /**
      * Method updateModelBase
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1480,11 +1476,11 @@
             updateDistributionManagement( value.getDistributionManagement(), "distributionManagement", innerCount, root);
             findAndReplaceProperties(innerCount, root,  "properties", value.getProperties());
         }
-    } //-- void updateModelBase(ModelBase, String, Counter, Element) 
+    } //-- void updateModelBase(ModelBase, String, Counter, Element)
 
     /**
      * Method updateNotifier
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1501,11 +1497,11 @@
         findAndReplaceSimpleElement(innerCount, root,  "sendOnWarning", value.isSendOnWarning() == true ? null : String.valueOf( value.isSendOnWarning() ), "true");
         findAndReplaceSimpleElement(innerCount, root,  "address", value.getAddress(), null);
         findAndReplaceProperties(innerCount, root,  "configuration", value.getConfiguration());
-    } //-- void updateNotifier(Notifier, String, Counter, Element) 
+    } //-- void updateNotifier(Notifier, String, Counter, Element)
 
     /**
      * Method updateOrganization
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1520,11 +1516,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "name", value.getName(), null);
             findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
         }
-    } //-- void updateOrganization(Organization, String, Counter, Element) 
+    } //-- void updateOrganization(Organization, String, Counter, Element)
 
     /**
      * Method updateParent
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1541,11 +1537,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "version", value.getVersion(), null);
             findAndReplaceSimpleElement(innerCount, root,  "relativePath", value.getRelativePath(), "../pom.xml");
         }
-    } //-- void updateParent(Parent, String, Counter, Element) 
+    } //-- void updateParent(Parent, String, Counter, Element)
 
     /**
      * Method updatePatternSet
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1560,11 +1556,11 @@
             findAndReplaceSimpleLists(innerCount, root, value.getIncludes(), "includes", "include");
             findAndReplaceSimpleLists(innerCount, root, value.getExcludes(), "excludes", "exclude");
         }
-    } //-- void updatePatternSet(PatternSet, String, Counter, Element) 
+    } //-- void updatePatternSet(PatternSet, String, Counter, Element)
 
     /**
      * Method updatePlugin
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1583,11 +1579,11 @@
         findAndReplaceXpp3DOM(innerCount, root, "goals", (Xpp3Dom)value.getGoals());
         findAndReplaceSimpleElement(innerCount, root,  "inherited", value.getInherited(), null);
         findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
-    } //-- void updatePlugin(Plugin, String, Counter, Element) 
+    } //-- void updatePlugin(Plugin, String, Counter, Element)
 
     /**
      * Method updatePluginConfiguration
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1602,11 +1598,11 @@
             updatePluginManagement( value.getPluginManagement(), "pluginManagement", innerCount, root);
             iteratePlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
         }
-    } //-- void updatePluginConfiguration(PluginConfiguration, String, Counter, Element) 
+    } //-- void updatePluginConfiguration(PluginConfiguration, String, Counter, Element)
 
     /**
      * Method updatePluginContainer
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1620,11 +1616,11 @@
             Counter innerCount = new Counter(counter.getDepth() + 1);
             iteratePlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
         }
-    } //-- void updatePluginContainer(PluginContainer, String, Counter, Element) 
+    } //-- void updatePluginContainer(PluginContainer, String, Counter, Element)
 
     /**
      * Method updatePluginExecution
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1639,11 +1635,11 @@
         findAndReplaceSimpleLists(innerCount, root, value.getGoals(), "goals", "goal");
         findAndReplaceSimpleElement(innerCount, root,  "inherited", value.getInherited(), null);
         findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
-    } //-- void updatePluginExecution(PluginExecution, String, Counter, Element) 
+    } //-- void updatePluginExecution(PluginExecution, String, Counter, Element)
 
     /**
      * Method updatePluginManagement
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1657,11 +1653,11 @@
             Counter innerCount = new Counter(counter.getDepth() + 1);
             iteratePlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
         }
-    } //-- void updatePluginManagement(PluginManagement, String, Counter, Element) 
+    } //-- void updatePluginManagement(PluginManagement, String, Counter, Element)
 
     /**
      * Method updatePrerequisites
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1675,11 +1671,11 @@
             Counter innerCount = new Counter(counter.getDepth() + 1);
             findAndReplaceSimpleElement(innerCount, root,  "maven", value.getMaven(), "2.0");
         }
-    } //-- void updatePrerequisites(Prerequisites, String, Counter, Element) 
+    } //-- void updatePrerequisites(Prerequisites, String, Counter, Element)
 
     /**
      * Method updateProfile
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1701,11 +1697,11 @@
         updateDependencyManagement( value.getDependencyManagement(), "dependencyManagement", innerCount, root);
         updateDistributionManagement( value.getDistributionManagement(), "distributionManagement", innerCount, root);
         findAndReplaceProperties(innerCount, root,  "properties", value.getProperties());
-    } //-- void updateProfile(Profile, String, Counter, Element) 
+    } //-- void updateProfile(Profile, String, Counter, Element)
 
     /**
      * Method updateRelocation
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1722,11 +1718,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "version", value.getVersion(), null);
             findAndReplaceSimpleElement(innerCount, root,  "message", value.getMessage(), null);
         }
-    } //-- void updateRelocation(Relocation, String, Counter, Element) 
+    } //-- void updateRelocation(Relocation, String, Counter, Element)
 
     /**
      * Method updateReportPlugin
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1742,11 +1738,11 @@
         findAndReplaceSimpleElement(innerCount, root,  "inherited", value.getInherited(), null);
         findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
         iterateReportSet(innerCount, root, value.getReportSets(),"reportSets","reportSet");
-    } //-- void updateReportPlugin(ReportPlugin, String, Counter, Element) 
+    } //-- void updateReportPlugin(ReportPlugin, String, Counter, Element)
 
     /**
      * Method updateReportSet
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1760,11 +1756,11 @@
         findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
         findAndReplaceSimpleElement(innerCount, root,  "inherited", value.getInherited(), null);
         findAndReplaceSimpleLists(innerCount, root, value.getReports(), "reports", "report");
-    } //-- void updateReportSet(ReportSet, String, Counter, Element) 
+    } //-- void updateReportSet(ReportSet, String, Counter, Element)
 
     /**
      * Method updateReporting
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1780,11 +1776,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "outputDirectory", value.getOutputDirectory(), null);
             iterateReportPlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
         }
-    } //-- void updateReporting(Reporting, String, Counter, Element) 
+    } //-- void updateReporting(Reporting, String, Counter, Element)
 
     /**
      * Method updateRepository
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1800,11 +1796,11 @@
         findAndReplaceSimpleElement(innerCount, root,  "name", value.getName(), null);
         findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
         findAndReplaceSimpleElement(innerCount, root,  "layout", value.getLayout(), "default");
-    } //-- void updateRepository(Repository, String, Counter, Element) 
+    } //-- void updateRepository(Repository, String, Counter, Element)
 
     /**
      * Method updateRepositoryBase
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1821,11 +1817,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
             findAndReplaceSimpleElement(innerCount, root,  "layout", value.getLayout(), "default");
         }
-    } //-- void updateRepositoryBase(RepositoryBase, String, Counter, Element) 
+    } //-- void updateRepositoryBase(RepositoryBase, String, Counter, Element)
 
     /**
      * Method updateRepositoryPolicy
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1841,11 +1837,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "updatePolicy", value.getUpdatePolicy(), null);
             findAndReplaceSimpleElement(innerCount, root,  "checksumPolicy", value.getChecksumPolicy(), null);
         }
-    } //-- void updateRepositoryPolicy(RepositoryPolicy, String, Counter, Element) 
+    } //-- void updateRepositoryPolicy(RepositoryPolicy, String, Counter, Element)
 
     /**
      * Method updateResource
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1860,11 +1856,11 @@
         findAndReplaceSimpleElement(innerCount, root,  "directory", value.getDirectory(), null);
         findAndReplaceSimpleLists(innerCount, root, value.getIncludes(), "includes", "include");
         findAndReplaceSimpleLists(innerCount, root, value.getExcludes(), "excludes", "exclude");
-    } //-- void updateResource(Resource, String, Counter, Element) 
+    } //-- void updateResource(Resource, String, Counter, Element)
 
     /**
      * Method updateScm
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1881,11 +1877,11 @@
             findAndReplaceSimpleElement(innerCount, root,  "tag", value.getTag(), "HEAD");
             findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
         }
-    } //-- void updateScm(Scm, String, Counter, Element) 
+    } //-- void updateScm(Scm, String, Counter, Element)
 
     /**
      * Method updateSite
-     * 
+     *
      * @param value
      * @param element
      * @param counter
@@ -1901,12 +1897,12 @@
             findAndReplaceSimpleElement(innerCount, root,  "name", value.getName(), null);
             findAndReplaceSimpleElement(innerCount, root,  "url", value.getUrl(), null);
         }
-    } //-- void updateSite(Site, String, Counter, Element) 
+    } //-- void updateSite(Site, String, Counter, Element)
 
     /**
      * Method write
      * @deprecated
-     * 
+     *
      * @param project
      * @param stream
      * @param document
@@ -1920,11 +1916,11 @@
         .setIndent("    ")
         .setLineSeparator(System.getProperty("line.separator")));
         outputter.output(document, stream);
-    } //-- void write(Model, Document, OutputStream) 
+    } //-- void write(Model, Document, OutputStream)
 
     /**
      * Method write
-     * 
+     *
      * @param project
      * @param writer
      * @param document
@@ -1936,11 +1932,11 @@
         .setEncoding(writer.getEncoding())
         .setLineSeparator(System.getProperty("line.separator"));
         write(project, document, writer, format);
-    } //-- void write(Model, Document, OutputStreamWriter) 
+    } //-- void write(Model, Document, OutputStreamWriter)
 
     /**
      * Method write
-     * 
+     *
      * @param project
      * @param jdomFormat
      * @param writer
@@ -1953,7 +1949,7 @@
         XMLOutputter outputter = new XMLOutputter();
         outputter.setFormat(jdomFormat);
         outputter.output(document, writer);
-    } //-- void write(Model, Document, Writer, Format) 
+    } //-- void write(Model, Document, Writer, Format)
 
 
       //-----------------/
@@ -1962,7 +1958,7 @@
 
     /**
      * Class Counter.
-     * 
+     *
      * @version $Revision: 3974 $ $Date: 2007-04-23 19:55:40 -0400 (Mon, 23 Apr 2007) $
      */
     public class Counter {
@@ -2002,7 +1998,7 @@
         public int getCurrentIndex()
         {
             return currentIndex;
-        } //-- int getCurrentIndex() 
+        } //-- int getCurrentIndex()
 
         /**
          * Method getDepth
@@ -2010,7 +2006,7 @@
         public int getDepth()
         {
             return level;
-        } //-- int getDepth() 
+        } //-- int getDepth()
 
         /**
          * Method increaseCount
@@ -2018,7 +2014,7 @@
         public void increaseCount()
         {
             currentIndex = currentIndex + 1;
-        } //-- void increaseCount() 
+        } //-- void increaseCount()
 
     }
 

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/PomWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/PomWriter.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/PomWriter.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/PomWriter.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.pom;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.maven.plugins.shade.pom;
-
 import java.io.IOException;
 import java.io.Writer;
 
@@ -73,5 +73,5 @@
         Format format = Format.getPrettyFormat().setEncoding( encoding );
 
         writer.write( newModel, doc, w, format );
-    }    
+    }
 }

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/Relocator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/Relocator.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/Relocator.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/Relocator.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.relocation;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,8 +18,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
-package org.apache.maven.plugins.shade.relocation;
 
 /** @author Jason van Zyl */
 public interface Relocator

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/relocation/SimpleRelocator.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.relocation;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,42 +19,40 @@
  * under the License.
  */
 
-package org.apache.maven.plugins.shade.relocation;
-
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-/** 
- * @author Jason van Zyl 
+/**
+ * @author Jason van Zyl
  * @author Mauro Talevi
  */
 public class SimpleRelocator
     implements Relocator
 {
     private String pattern;
-    
+
     private String shadedPattern;
 
     private List excludes;
 
-    public SimpleRelocator(String patt, String shadedPattern, List excludes) 
+    public SimpleRelocator(String patt, String shadedPattern, List excludes)
     {
         this.pattern = patt.replace('.', '/');
 
         if ( shadedPattern != null )
         {
-            this.shadedPattern = shadedPattern.replace('.', '/');            
-        } else 
+            this.shadedPattern = shadedPattern.replace('.', '/');
+        } else
         {
             this.shadedPattern = "hidden/" + this.pattern;
         }
 
-        if (excludes != null) 
+        if (excludes != null)
         {
             this.excludes = new ArrayList();
 
-            for (Iterator i = excludes.iterator(); i.hasNext();) 
+            for (Iterator i = excludes.iterator(); i.hasNext();)
             {
                 String e = (String) i.next();
 
@@ -60,7 +60,7 @@
             }
         }
     }
-    
+
     public boolean canRelocate( String clazz )
     {
         if ( excludes != null )

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformer.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformer.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformer.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.resource;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.maven.plugins.shade.resource;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.HashSet;
@@ -33,7 +33,7 @@
     implements ResourceTransformer
 {
     Set entries = new HashSet();
-    
+
     public boolean canTransformResource( String resource )
     {
         String s = resource.toLowerCase();
@@ -49,7 +49,7 @@
     public void processResource( InputStream is )
         throws IOException
     {
-       
+
     }
 
     public boolean hasTransformedResource()

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.resource;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.maven.plugins.shade.resource;
-
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
@@ -41,26 +41,26 @@
 {
     Set entries = new LinkedHashSet();
     Map organizationEntries = new LinkedHashMap();
-    
+
     String projectName;
-    
-    String preamble1 = 
+
+    String preamble1 =
           "// ------------------------------------------------------------------\n"
         + "// NOTICE file corresponding to the section 4d of The Apache License,\n"
         + "// Version 2.0, in this case for ";
-    
+
     String preamble2 = "\n// ------------------------------------------------------------------\n";
-        
+
     String preamble3 = "This product includes software developed at\n";
-    
+
     //defaults overridable via config in pom
     String organizationName = "The Apache Software Foundation";
     String organizationURL = "http://www.apache.org/";
     String inceptionYear = "2006";
-    
+
     String copyright;
 
-        
+
     public boolean canTransformResource( String resource )
     {
         String s = resource.toLowerCase();
@@ -76,25 +76,25 @@
     public void processResource( InputStream is )
         throws IOException
     {
-        if ( entries.isEmpty() ) 
+        if ( entries.isEmpty() )
         {
             String year = new SimpleDateFormat( "yyyy" ).format( new Date() );
-            if ( !inceptionYear.equals( year ) ) 
+            if ( !inceptionYear.equals( year ) )
             {
                 year = inceptionYear + "-" + year;
             }
-            
-            
+
+
             //add headers
             entries.add( preamble1 + projectName + preamble2 );
             //fake second entry, we'll look for a real one later
             entries.add( projectName + "\nCopyright " + year + " " + organizationName + "\n" );
             entries.add( preamble3 + organizationName + " ("+ organizationURL +").\n" );
         }
-        
-        
+
+
         BufferedReader reader = new BufferedReader(new InputStreamReader(is));
-        
+
         String line = reader.readLine();
         StringBuffer sb = new StringBuffer();
         Set currentOrg = null;
@@ -102,7 +102,7 @@
         while ( line != null )
         {
             String trimedLine = line.trim();
-            
+
             if ( !trimedLine.startsWith( "//" ) )
             {
                 if ( trimedLine.length() > 0 )
@@ -110,7 +110,7 @@
                     if ( trimedLine.startsWith( "- " ) )
                     {
                         //resource-bundle 1.3 mode
-                        if ( lineCount == 1 
+                        if ( lineCount == 1
                             && sb.toString().indexOf( "This product includes/uses software(s) developed by" ) != -1)
                         {
                             currentOrg = (Set) organizationEntries.get( sb.toString().trim() );
@@ -120,13 +120,13 @@
                                 organizationEntries.put( sb.toString().trim(), currentOrg );
                             }
                             sb = new StringBuffer();
-                        } 
+                        }
                         else if ( sb.length() > 0 && currentOrg != null )
                         {
                             currentOrg.add( sb.toString() );
                             sb = new StringBuffer();
                         }
-                        
+
                     }
                     sb.append( line ).append( "\n" );
                     lineCount++;
@@ -134,14 +134,14 @@
                 else
                 {
                     String ent = sb.toString();
-                    if ( ent.startsWith( projectName ) 
-                        && ent.indexOf( "Copyright " ) != -1 ) 
+                    if ( ent.startsWith( projectName )
+                        && ent.indexOf( "Copyright " ) != -1 )
                     {
                         copyright = ent;
                     }
                     if ( currentOrg == null )
                     {
-                        entries.add( ent );                        
+                        entries.add( ent );
                     }
                     else
                     {
@@ -152,7 +152,7 @@
                     currentOrg = null;
                 }
             }
-            
+
             line = reader.readLine();
         }
     }
@@ -166,10 +166,10 @@
         throws IOException
     {
         jos.putNextEntry( new JarEntry( "META-INF/NOTICE" ) );
-        
+
         OutputStreamWriter pow = new OutputStreamWriter( jos );
         PrintWriter writer = new PrintWriter(pow);
-        
+
         int count = 0;
         for ( Iterator itr = entries.iterator() ; itr.hasNext() ; )
         {
@@ -179,8 +179,8 @@
             {
                 continue;
             }
-            
-            if ( count == 2 && copyright != null ) 
+
+            if ( count == 2 && copyright != null )
             {
                 writer.print( copyright );
                 writer.print( '\n' );
@@ -190,7 +190,7 @@
                 writer.print( line );
                 writer.print( '\n' );
             }
-            if (count == 3) 
+            if (count == 3)
             {
                 //do org stuff
                 for (Iterator oit = organizationEntries.entrySet().iterator() ; oit.hasNext();)
@@ -201,15 +201,15 @@
                     Set entrySet = (Set)entry.getValue();
                     for (Iterator eit = entrySet.iterator() ; eit.hasNext() ;)
                     {
-                        writer.print( eit.next().toString() );                        
+                        writer.print( eit.next().toString() );
                     }
                     writer.print( '\n' );
                 }
             }
         }
-        
+
         writer.flush();
-        
+
         entries.clear();
     }
 }

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/AppendingTransformer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/AppendingTransformer.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/AppendingTransformer.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/AppendingTransformer.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.resource;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.maven.plugins.shade.resource;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -33,7 +33,7 @@
 {
     String resource;
     ByteArrayOutputStream data = new ByteArrayOutputStream();
-    
+
     public boolean canTransformResource( String r )
     {
         r = r.toLowerCase();
@@ -51,7 +51,7 @@
     {
         IOUtil.copy(is, data);
         data.write('\n');
-        
+
         is.close();
     }
 
@@ -64,7 +64,7 @@
         throws IOException
     {
         jos.putNextEntry( new JarEntry( resource ) );
-        
+
         IOUtil.copy(new ByteArrayInputStream(data.toByteArray()), jos);
         data.reset();
     }

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ComponentsXmlResourceTransformer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ComponentsXmlResourceTransformer.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ComponentsXmlResourceTransformer.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ComponentsXmlResourceTransformer.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.resource;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.maven.plugins.shade.resource;
-
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.FileReader;
@@ -64,7 +64,7 @@
         File f = File.createTempFile( "maven-shade-plugin", "tmp" );
 
         f.deleteOnExit();
-        
+
         String n = f.getAbsolutePath();
 
         OutputStream os = new FileOutputStream( f );
@@ -89,13 +89,13 @@
         {
             throw new IOException( "Error parsing components.xml in " + is );
         }
-        
+
         // Only try to merge in components if there are some elements in the component-set
         if ( newDom.getChild( "components" ) == null )
         {
             return;
         }
-        
+
         Xpp3Dom[] children = newDom.getChild( "components" ).getChildren( "component" );
 
         for ( int i = 0; i < children.length; i++ )
@@ -122,7 +122,7 @@
         IOUtil.copy( reader, jos );
 
         reader.close();
-        
+
         components.clear();
     }
 

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/DontIncludeResourceTransformer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/DontIncludeResourceTransformer.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/DontIncludeResourceTransformer.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/DontIncludeResourceTransformer.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.resource;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.maven.plugins.shade.resource;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.HashSet;
@@ -33,7 +33,7 @@
     implements ResourceTransformer
 {
     String resource;
-    
+
     public boolean canTransformResource( String r )
     {
         if ( r.endsWith(resource) ) {
@@ -46,7 +46,7 @@
     public void processResource( InputStream is )
         throws IOException
     {
-       
+
     }
 
     public boolean hasTransformedResource()

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/IncludeResourceTransformer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/IncludeResourceTransformer.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/IncludeResourceTransformer.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/IncludeResourceTransformer.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.resource;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.maven.plugins.shade.resource;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -39,7 +39,7 @@
 {
     File file;
     String resource;
-    
+
     public boolean canTransformResource( String r )
     {
         return false;
@@ -48,7 +48,7 @@
     public void processResource( InputStream is )
         throws IOException
     {
-       
+
     }
 
     public boolean hasTransformedResource()
@@ -60,8 +60,8 @@
         throws IOException
     {
         jos.putNextEntry( new JarEntry( resource ) );
-        
-        InputStream in = new FileInputStream( file ); 
+
+        InputStream in = new FileInputStream( file );
         IOUtil.copy( in, jos );
         in.close();
     }

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ResourceTransformer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ResourceTransformer.java?rev=612343&r1=612342&r2=612343&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ResourceTransformer.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ResourceTransformer.java Tue Jan 15 19:35:30 2008
@@ -1,3 +1,5 @@
+package org.apache.maven.plugins.shade.resource;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.maven.plugins.shade.resource;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.jar.JarOutputStream;
@@ -30,7 +30,7 @@
 
     void processResource( InputStream is )
         throws IOException;
-    
+
     boolean hasTransformedResource();
 
     void modifyOutputStream( JarOutputStream os )



Mime
View raw message