ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r600421 - in /ant/ivy/core/trunk: src/java/org/apache/ivy/plugins/parser/m2/ test/java/org/apache/ivy/plugins/parser/m2/
Date Mon, 03 Dec 2007 02:49:42 GMT
Author: xavier
Date: Sun Dec  2 18:49:33 2007
New Revision: 600421

URL: http://svn.apache.org/viewvc?rev=600421&view=rev
Log:
add some Ivy reference in generated pom

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java?rev=600421&r1=600420&r2=600421&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
Sun Dec  2 18:49:33 2007
@@ -25,12 +25,19 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.ivy.Ivy;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.util.StringUtils;
 
 public final class PomModuleDescriptorWriter {
+    // used to ease tests only
+    private static boolean addIvyVersion = true;
+    static void setAddIvyVersion(boolean addIvyVersion) {
+        PomModuleDescriptorWriter.addIvyVersion = addIvyVersion;
+    }
+
     private PomModuleDescriptorWriter() {
     }
     
@@ -52,6 +59,14 @@
             if (licenseHeader != null) {
                 out.print(licenseHeader);
             }
+            out.println("<!--"); 
+            out.println("   Apache Maven 2 POM generated by Apache Ivy"); 
+            out.println("   " + Ivy.getIvyHomeURL());
+            if (addIvyVersion) {
+                out.println("   Apache Ivy version: " + Ivy.getIvyVersion() 
+                    + " " + Ivy.getIvyDate());
+            }
+            out.println("-->"); 
             out.println("<project xmlns=\"http://maven.apache.org/POM/4.0.0\" "
                     + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
             out.println("    xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 "

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java?rev=600421&r1=600420&r2=600421&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java
Sun Dec  2 18:49:33 2007
@@ -40,7 +40,7 @@
         }
     }
     private File _dest = new File("build/test/test-write.xml");
-
+    
     public void testSimple() throws Exception {
         ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
             new IvySettings(), getClass().getResource("test-simple.pom"), false);
@@ -99,6 +99,8 @@
     }
 
     public void setUp() {
+        // don't add ivy version to se static files for comparison
+        PomModuleDescriptorWriter.setAddIvyVersion(false);
         if (_dest.exists()) {
             _dest.delete();
         }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml?rev=600421&r1=600420&r2=600421&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml
Sun Dec  2 18:49:33 2007
@@ -17,6 +17,10 @@
    specific language governing permissions and limitations
    under the License.    
 -->
+<!--
+   Apache Maven 2 POM generated by Apache Ivy
+   http://ant.apache.org/ivy/
+-->
 <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">
 

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml?rev=600421&r1=600420&r2=600421&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml
Sun Dec  2 18:49:33 2007
@@ -17,6 +17,10 @@
    specific language governing permissions and limitations
    under the License.    
 -->
+<!--
+   Apache Maven 2 POM generated by Apache Ivy
+   http://ant.apache.org/ivy/
+-->
 <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">
 

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml?rev=600421&r1=600420&r2=600421&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml
Sun Dec  2 18:49:33 2007
@@ -17,6 +17,10 @@
    specific language governing permissions and limitations
    under the License.    
 -->
+<!--
+   Apache Maven 2 POM generated by Apache Ivy
+   http://ant.apache.org/ivy/
+-->
 <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">
 

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml?rev=600421&r1=600420&r2=600421&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml Sun
Dec  2 18:49:33 2007
@@ -17,6 +17,10 @@
    specific language governing permissions and limitations
    under the License.    
 -->
+<!--
+   Apache Maven 2 POM generated by Apache Ivy
+   http://ant.apache.org/ivy/
+-->
 <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">
 



Mime
View raw message