Author: xavier
Date: Thu Mar 8 07:22:54 2007
New Revision: 516069
URL: http://svn.apache.org/viewvc?view=rev&rev=516069
Log:
FIX: ${project.groupId} and ${project.version} not processed correctly in poms
(IVY-425)
Added:
incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom
Modified:
incubator/ivy/core/trunk/CHANGES.txt
incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
Modified: incubator/ivy/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/CHANGES.txt?view=diff&rev=516069&r1=516068&r2=516069
==============================================================================
--- incubator/ivy/core/trunk/CHANGES.txt (original)
+++ incubator/ivy/core/trunk/CHANGES.txt Thu Mar 8 07:22:54 2007
@@ -18,8 +18,10 @@
- FIX: NPE when no organisation or no name is provided in module element of
ivyconf (IVY-422)
- FIX: FileUtil#copy(File src, File dest, CopyProgressListener l, boolean
overwrite) (IVY-420)
+- FIX: ${project.groupId} and ${project.version} not processed correctly in
poms (IVY-425)
- FIX: Incorrect pom parsing with profile (IVY-423)
- FIX: Ivy doesn't recognize maven2 classifiers (IVY-418)
+- FIX: PomModuleDescriptorParser fails with nested profile dependency
(IVY-392) (thanks to William Lyvers)
- FIX: Static revision replacement is not working when delivering an artifact
with a dependency having extra attributes (IVY-415)
- FIX: Static revision replacement is not working when delivering an artifact
with a dependency on a branch (IVY-404)
- FIX: latest-time conflict manager not working properly (IVY-407)
@@ -28,7 +30,6 @@
- FIX: Comments in ivy.xml duplicated (IVY-336) (thanks to Gilles Scokart)
- FIX: Ivy failure when the ivy.xml file contains non US-ASCII characters
(IVY-346) (thanks to Gilles Scokart)
- FIX: Urlresolver is not possible to use dynamic revisions on nonstandard
repository structure (IVY-350) (thanks to Pierre Hägnestrand)
-- FIX: PomModuleDescriptorParser fails with nested profile dependency
(IVY-392) (thanks to William Lyvers)
version 1.4.1 - 2006-11-09
Modified:
incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
URL:
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java?view=diff&rev=516069&r1=516068&r2=516069
==============================================================================
---
incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
(original)
+++
incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Thu Mar 8 07:22:54 2007
@@ -131,6 +131,9 @@
_revision = "SNAPSHOT";
}
ModuleRevisionId mrid =
ModuleRevisionId.newInstance(_organisation, _module, _revision);
+ _properties.put("project.groupId", _organisation);
+ _properties.put("project.artifactId", _module);
+ _properties.put("project.version", _revision);
_properties.put("pom.version", _revision);
_md.setModuleRevisionId(mrid);
_md.addArtifact("master", new DefaultArtifact(mrid,
getDefaultPubDate(),_module, "jar", "jar"));
@@ -252,8 +255,6 @@
}
}
-
-
private String getContext() {
StringBuffer buf = new StringBuffer();
for (Iterator iter = _contextStack.iterator(); iter.hasNext();) {
Modified:
incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
URL:
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java?view=diff&rev=516069&r1=516068&r2=516069
==============================================================================
---
incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
(original)
+++
incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
Thu Mar 8 07:22:54 2007
@@ -169,6 +169,19 @@
assertEquals(ModuleRevisionId.newInstance("junit", "junit", "3.7"),
dds[0].getDependencyRevisionId());
}
+ public void testVariables() throws Exception {
+ // test case for IVY-425
+ ModuleDescriptor md =
PomModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(),
getClass().getResource("spring-hibernate3-2.0.2.pom"), false);
+ assertNotNull(md);
+
+ assertEquals(ModuleRevisionId.newInstance("org.springframework",
"spring-hibernate3", "2.0.2"), md.getModuleRevisionId());
+
+ DependencyDescriptor[] dds = md.getDependencies();
+ assertNotNull(dds);
+ assertEquals(11, dds.length);
+ assertEquals(ModuleRevisionId.newInstance("org.springframework",
"spring-web", "2.0.2"), dds[10].getDependencyRevisionId());
+ }
+
public void testDependenciesInProfile() throws Exception {
// test case for IVY-423
ModuleDescriptor md =
PomModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(),
getClass().getResource("mule-module-builders-1.3.3.pom"), false);
Added:
incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom
URL:
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom?view=auto&rev=516069
==============================================================================
---
incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom
(added)
+++
incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom
Thu Mar 8 07:22:54 2007
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<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>org.springframework</groupId>
+ <artifactId>spring-hibernate3</artifactId>
+ <packaging>jar</packaging>
+ <name>Spring Framework: Hibernate3</name>
+
+ <version>2.0.2</version>
+ <description>Spring Framework: Hibernate3</description>
+ <url>http://www.springframework.org</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+
<connection>scm:cvs:pserver:anonymous:@springframework.cvs.sourceforge.net:/cvsroot/springframework</connection>
+ <developerConnection>scm:cvs:ext:[EMAIL
PROTECTED]:/cvsroot/springframework</developerConnection>
+ <tag>2.0.2</tag>
+
+ <url>http://springframework.cvs.sourceforge.net/springframework/</url>
+ </scm>
+ <organization>
+ <name>Spring Framework</name>
+ <url>http://www.springframework.org/</url>
+ </organization>
+ <dependencies>
+
+<!-- External Dependencies -->
+ <dependency>
+ <groupId>aopalliance</groupId>
+ <artifactId>aopalliance</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>3.2.1.ga</version>
+
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+
+<!-- Spring Dependencies -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+
+ <artifactId>spring-context</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${project.version}</version>
+
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>spring-dao</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+
+ <groupId>${project.groupId}</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>spring-web</artifactId>
+
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+</project>