maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r797974 - in /maven/release/trunk/maven-release-manager: ./ src/test/java/org/apache/maven/shared/release/phase/ src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/
Date Sun, 26 Jul 2009 19:11:41 GMT
Author: olamy
Date: Sun Jul 26 19:11:41 2009
New Revision: 797974

URL: http://svn.apache.org/viewvc?rev=797974&view=rev
Log:
[MRELEASE-460]Please upgrade to JDOM 1.1; current JDOM 1.0 contains a bug in parsing comments
starting with hyphen
Submitted by Andrew Lynch

Added:
    maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/
    maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/expected-pom.xml
  (with props)
    maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/pom.xml
  (with props)
Modified:
    maven/release/trunk/maven-release-manager/pom.xml
    maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java

Modified: maven/release/trunk/maven-release-manager/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/pom.xml?rev=797974&r1=797973&r2=797974&view=diff
==============================================================================
--- maven/release/trunk/maven-release-manager/pom.xml (original)
+++ maven/release/trunk/maven-release-manager/pom.xml Sun Jul 26 19:11:41 2009
@@ -139,9 +139,9 @@
     </dependency>
 
     <dependency>
-      <groupId>jdom</groupId>
+      <groupId>org.jdom</groupId>
       <artifactId>jdom</artifactId>
-      <version>1.0</version>
+      <version>1.1</version>
     </dependency>
     <dependency>
       <groupId>jaxen</groupId>

Modified: maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java?rev=797974&r1=797973&r2=797974&view=diff
==============================================================================
--- maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java
(original)
+++ maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java
Sun Jul 26 19:11:41 2009
@@ -80,6 +80,25 @@
         assertEquals( "Check the transformed POM", expected, actual );
     }
 
+    public void testRewriteWithDashedComments()
+        throws Exception
+    {
+        List reactorProjects = createReactorProjects("basic-pom-with-dashes-in-comment");
+        ReleaseDescriptor config = createDescriptorFromBasicPom( reactorProjects );
+        config.mapReleaseVersion( "groupId:artifactId", NEXT_VERSION );
+
+        String expected = readTestProjectFile( "basic-pom-with-dashes-in-comment/pom.xml"
);
+
+        phase.simulate( config, new DefaultReleaseEnvironment(), reactorProjects );
+
+        String actual = readTestProjectFile( "basic-pom-with-dashes-in-comment/pom.xml" );
+        assertEquals( "Check the original POM is untouched", expected, actual );
+
+        expected = readTestProjectFile( "basic-pom-with-dashes-in-comment/expected-pom.xml"
);
+        actual = readTestProjectFile( "basic-pom-with-dashes-in-comment/pom.xml.tag" );
+        assertEquals( "Check the transformed POM", expected, actual );
+    }
+
     public void testClean()
         throws Exception
     {

Added: maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/expected-pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/expected-pom.xml?rev=797974&view=auto
==============================================================================
--- maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/expected-pom.xml
(added)
+++ maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/expected-pom.xml
Sun Jul 26 19:11:41 2009
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2005-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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.0</version>
+
+  <prerequisites>
+    <maven>2.0.4</maven>
+  </prerequisites>
+
+  <!---
+  a multi-line
+  comment which will fail when parsed with JDOM 1.0
+  -->
+
+  <scm>
+    <connection>scm:svn:file://localhost/tmp/scm-repo/tags/release-label</connection>
+  </scm>
+</project>
\ No newline at end of file

Propchange: maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/pom.xml?rev=797974&view=auto
==============================================================================
--- maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/pom.xml
(added)
+++ maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/pom.xml
Sun Jul 26 19:11:41 2009
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2005-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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <prerequisites>
+    <maven>2.0.4</maven>
+  </prerequisites>
+
+  <!---
+  a multi-line
+  comment which will fail when parsed with JDOM 1.0
+  -->
+
+  <scm>
+    <connection>scm:svn:file://localhost/tmp/scm-repo/trunk</connection>
+  </scm>
+</project>
\ No newline at end of file

Propchange: maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/release/trunk/maven-release-manager/src/test/resources/projects/rewrite-for-release/basic-pom-with-dashes-in-comment/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message