ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1199020 - in /ant/ivy/ivyde/trunk: doc/ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/ test/parent-pom/ test/parent-pom/src/
Date Mon, 07 Nov 2011 23:56:02 GMT
Author: hibou
Date: Mon Nov  7 23:56:01 2011
New Revision: 1199020

URL: http://svn.apache.org/viewvc?rev=1199020&view=rev
Log:
IVYDE-273:
 - fix the parsing of a pom with a parent and with the workspace resolver enabled

Added:
    ant/ivy/ivyde/trunk/test/parent-pom/   (with props)
    ant/ivy/ivyde/trunk/test/parent-pom/.classpath
    ant/ivy/ivyde/trunk/test/parent-pom/.project   (with props)
    ant/ivy/ivyde/trunk/test/parent-pom/pom.xml   (with props)
    ant/ivy/ivyde/trunk/test/parent-pom/src/
Modified:
    ant/ivy/ivyde/trunk/doc/release-notes.html
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java

Modified: ant/ivy/ivyde/trunk/doc/release-notes.html
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/doc/release-notes.html?rev=1199020&r1=1199019&r2=1199020&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/doc/release-notes.html (original)
+++ ant/ivy/ivyde/trunk/doc/release-notes.html Mon Nov  7 23:56:01 2011
@@ -145,6 +145,7 @@ List of changes since <a href="/ivy/ivyd
     <li>FIX: Multiple eclipse projects with similar ivy library definitions results
in launch config source path collisions (IVYDE-237)</li>
     <li>FIX: NPE when starting the IvyPlugin (IVYDE-269)</li>
     <li>FIX: IvyDE deletes entirely a project if the retrieve pattern resolved to be
the root of the project (IVYDE-272)</li>
+    <li>FIX: java.lang.StackOverflowError on Ivy>Resolve of a pom.xml with a parent
and the workspace resolver (IVYDE-273)</li>
 </ul>
 
 Most of our changes are logged in our JIRA, where you can find comments and links to our
subversion:

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java?rev=1199020&r1=1199019&r2=1199020&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java
Mon Nov  7 23:56:01 2011
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 
 import org.apache.ivy.Ivy;
+import org.apache.ivy.core.IvyContext;
 import org.apache.ivy.core.module.descriptor.Artifact;
 import org.apache.ivy.core.module.descriptor.Configuration;
 import org.apache.ivy.core.module.descriptor.DefaultArtifact;
@@ -143,6 +144,14 @@ public class WorkspaceResolver extends A
 
     public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data)
             throws ParseException {
+        String contextId = "ivyde.workspaceresolver." + getName() + "." + dd.getDependencyRevisionId().toString();
+        DependencyDescriptor parentDD = (DependencyDescriptor) IvyContext.getContext().get(contextId);
+        if (parentDD != null && parentDD.getDependencyRevisionId().equals(dd.getDependencyRevisionId()))
{
+            // this very workspace resolver has been already called for the same dependency
+            // we are going into a circular dependency, let's return 'not found'
+            return null;
+        }
+        IvyContext.getContext().set(contextId, dd);
 
         ModuleRevisionId dependencyMrid = dd.getDependencyRevisionId();
 

Propchange: ant/ivy/ivyde/trunk/test/parent-pom/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Nov  7 23:56:01 2011
@@ -0,0 +1 @@
+bin

Added: ant/ivy/ivyde/trunk/test/parent-pom/.classpath
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/parent-pom/.classpath?rev=1199020&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/test/parent-pom/.classpath (added)
+++ ant/ivy/ivyde/trunk/test/parent-pom/.classpath Mon Nov  7 23:56:01 2011
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?project=ivydetest-parent-pom&amp;ivyXmlPath=pom.xml&amp;confs=*&amp;ivySettingsPath=&amp;loadSettingsOnDemand=false&amp;propertyFiles=&amp;acceptedTypes=jar&amp;alphaOrder=true&amp;resolveInWorkspace=true&amp;retrievedClasspath=false&amp;sourceTypes=source&amp;javadocTypes=javadoc&amp;sourceSuffixes=-source%2C-sources%2C-src&amp;javadocSuffixes=-javadoc%2C-javadocs%2C-doc%2C-docs&amp;mapIfOnlyOneSource=false&amp;mapIfOnlyOneJavadoc=false"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: ant/ivy/ivyde/trunk/test/parent-pom/.project
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/parent-pom/.project?rev=1199020&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/test/parent-pom/.project (added)
+++ ant/ivy/ivyde/trunk/test/parent-pom/.project Mon Nov  7 23:56:01 2011
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>ivydetest-parent-pom</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.apache.ivyde.eclipse.ivynature</nature>
+	</natures>
+</projectDescription>

Propchange: ant/ivy/ivyde/trunk/test/parent-pom/.project
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/ivyde/trunk/test/parent-pom/.project
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/ivyde/trunk/test/parent-pom/.project
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ant/ivy/ivyde/trunk/test/parent-pom/pom.xml
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/parent-pom/pom.xml?rev=1199020&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/test/parent-pom/pom.xml (added)
+++ ant/ivy/ivyde/trunk/test/parent-pom/pom.xml Mon Nov  7 23:56:01 2011
@@ -0,0 +1,34 @@
+<!-- 
+ 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>
+
+  <parent>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>5</version>
+  </parent>
+
+  <groupId>org.apache.ivyde.test</groupId>
+  <artifactId>parent-pom</artifactId>
+  <packaging>pom</packaging>
+  <name>Test parent pom</name>
+  <version>1</version>
+  <description>Test parent pom</description>
+</project>

Propchange: ant/ivy/ivyde/trunk/test/parent-pom/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/ivyde/trunk/test/parent-pom/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/ivyde/trunk/test/parent-pom/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message