Author: brett
Date: Wed Apr 26 23:37:25 2006
New Revision: 397439

URL: http://svn.apache.org/viewcvs?rev=397439&view=rev
Log:
[MRELEASE-98] minor fixes for comparisons

Modified:
    
maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
    
maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/expected-basic-pom-with-schema.xml

Modified: 
maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java?rev=397439&r1=397438&r2=397439&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
 (original)
+++ 
maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
 Wed Apr 26 23:37:25 2006
@@ -367,12 +367,17 @@
             // TODO: the XMLOutputter and Writer need to have their encodings 
aligned
             writer = new FileWriter( pomFile );
 
-            writer.write( intro );
+            if ( intro != null )
+            {
+                writer.write( intro );
+            }
 
-            XMLOutputter outp = new XMLOutputter();
-            outp.output( document.getRootElement(), writer );
+            new XMLOutputter().output( document.getRootElement(), writer );
 
-            writer.write( outtro );
+            if ( outtro != null )
+            {
+                writer.write( outtro );
+            }
         }
         catch ( IOException e )
         {

Modified: 
maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/expected-basic-pom-with-schema.xml
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/expected-basic-pom-with-schema.xml?rev=397439&r1=397438&r2=397439&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/expected-basic-pom-with-schema.xml
 (original)
+++ 
maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/expected-basic-pom-with-schema.xml
 Wed Apr 26 23:37:25 2006
@@ -16,8 +16,7 @@
   ~ 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";>
+<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>
   <groupId>groupId</groupId>
   <artifactId>artifactId</artifactId>


Reply via email to