Author: hibou
Date: Tue Dec 30 09:24:11 2008
New Revision: 730193
URL: http://svn.apache.org/viewvc?rev=730193&view=rev
Log:
IVYDE-143: handle also the url like 'file:./...' (thanks to Will Gorman)
Added:
ant/ivy/ivyde/trunk/test/old-settings-conf/ (with props)
ant/ivy/ivyde/trunk/test/old-settings-conf/.classpath
ant/ivy/ivyde/trunk/test/old-settings-conf/.project
ant/ivy/ivyde/trunk/test/old-settings-conf/ivy.xml (with props)
ant/ivy/ivyde/trunk/test/old-settings-conf/ivysettings.xml (with props)
ant/ivy/ivyde/trunk/test/old-settings-conf/src/
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt?rev=730193&r1=730192&r2=730193&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt Tue Dec 30
09:24:11 2008
@@ -10,6 +10,7 @@
- FIX: source and javadoc attachment regression (IVYDE-146)
- FIX: IvyDE does not save "Configurations" and "Types" field values for
"Retrive" tab (IVYDE-142) (thanks to Daniel Becheanu)
- FIX: Retrieve after resolve task fails because of wrong resolve
configuration (IVYDE-140) (thanks to Daniel Becheanu)
+- FIX: Conversion from "file:" to "project:" fails (IVYDE-143) (thanks to Will
Gorman)
version 2.0.0 beta1
==========================
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java?rev=730193&r1=730192&r2=730193&view=diff
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
(original)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
Tue Dec 30 09:24:11 2008
@@ -259,8 +259,8 @@
}
/**
- * Read old configuration that were based on relative urls, like:
"file://./ivysettings.xml".
- * This kind of URL "project:///ivysettings.xml" should be used now.
+ * Read old configuration that were based on relative urls, like:
"file://./ivysettings.xml" or
+ * "file:./ivysettings.xml". This kind of URL "project:///ivysettings.xml"
should be used now.
*
* @param value
* the value to read
@@ -280,9 +280,12 @@
if (file.exists()) {
return value;
}
- // the file doesn't exist, so try to find out if it is a relative path
to the project.
- file = new
File(javaProject.getProject().getFile(url.getPath()).getLocation().toOSString());
- return PROJECT_SCHEME_PREFIX + url.getPath();
+ // the file doesn't exist, it is a relative path to the project.
+ String urlpath = url.getPath();
+ if (urlpath != null && urlpath.startsWith("./")) {
+ urlpath = urlpath.substring(1);
+ }
+ return PROJECT_SCHEME_PREFIX + urlpath;
}
private void checkNonNullConf() {
@@ -448,8 +451,8 @@
IFile f = javaProject.getProject().getFile(path);
if (!f.exists()) {
IvyDEException ex = new IvyDEException("Ivy settings file
not found",
- "The Ivy settings file '" + settingsPath + "' cannot
be found ("
- + this.toString() + ")", null);
+ "The Ivy settings file '" + settingsPath + "'
cannot be found ("
+ + this.toString() + ")", null);
setConfStatus(ex);
throw ex;
}
@@ -459,16 +462,16 @@
IResource p =
ResourcesPlugin.getWorkspace().getRoot().findMember(projectName);
if (p == null) {
IvyDEException ex = new IvyDEException("Project '" +
projectName
- + "' not found", "The project name '" + projectName +
"' from '"
- + settingsPath + "' was not found (" + this.toString()
+ ")", null);
+ + "' not found", "The project name '" +
projectName + "' from '"
+ + settingsPath + "' was not found (" +
this.toString() + ")", null);
setConfStatus(ex);
throw ex;
}
IFile f = p.getProject().getFile(path);
if (!f.exists()) {
IvyDEException ex = new IvyDEException("Ivy settings file
not found",
- "The Ivy settings file '" + path + "' cannot be found
in project '"
- + projectName + "'", null);
+ "The Ivy settings file '" + path + "' cannot be
found in project '"
+ + projectName + "'", null);
setConfStatus(ex);
throw ex;
}
Propchange: ant/ivy/ivyde/trunk/test/old-settings-conf/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Dec 30 09:24:11 2008
@@ -0,0 +1,2 @@
+bin
+
Added: ant/ivy/ivyde/trunk/test/old-settings-conf/.classpath
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/old-settings-conf/.classpath?rev=730193&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/test/old-settings-conf/.classpath (added)
+++ ant/ivy/ivyde/trunk/test/old-settings-conf/.classpath Tue Dec 30 09:24:11
2008
@@ -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/?ivyXmlPath=ivy.xml&confs=*&ivySettingsPath=file%3A.%2Fivysettings.xml&acceptedTypes=jar&sourceTypes=source&javadocTypes=javadoc&sourceSuffixes=-source%2C-sources%2C-src&javadocSuffixes=-javadoc%2C-javadocs%2C-doc%2C-docs&doRetrieve=false&retrievePattern=lib%2F%5Bconf%5D%2F%5Bartifact%5D.%5Bext%5D&alphaOrder=false"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: ant/ivy/ivyde/trunk/test/old-settings-conf/.project
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/old-settings-conf/.project?rev=730193&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/test/old-settings-conf/.project (added)
+++ ant/ivy/ivyde/trunk/test/old-settings-conf/.project Tue Dec 30 09:24:11 2008
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ivydetest-old-settings-conf</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>
+ </natures>
+</projectDescription>
Added: ant/ivy/ivyde/trunk/test/old-settings-conf/ivy.xml
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/old-settings-conf/ivy.xml?rev=730193&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/test/old-settings-conf/ivy.xml (added)
+++ ant/ivy/ivyde/trunk/test/old-settings-conf/ivy.xml Tue Dec 30 09:24:11 2008
@@ -0,0 +1,31 @@
+<!--
+ 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.
+-->
+<ivy-module version="1.0">
+ <info organisation="org.apache.ivyde" module="ivytest-old-settings-conf">
+ <description>
+ Project referencing some local settings the old way
+ </description>
+ </info>
+ <configurations>
+ <conf name="default" />
+ </configurations>
+ <dependencies>
+ <dependency org="myorg" name="mymodule" rev="1.1" conf="default" />
+ </dependencies>
+</ivy-module>
Propchange: ant/ivy/ivyde/trunk/test/old-settings-conf/ivy.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ant/ivy/ivyde/trunk/test/old-settings-conf/ivy.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: ant/ivy/ivyde/trunk/test/old-settings-conf/ivy.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: ant/ivy/ivyde/trunk/test/old-settings-conf/ivysettings.xml
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/old-settings-conf/ivysettings.xml?rev=730193&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/test/old-settings-conf/ivysettings.xml (added)
+++ ant/ivy/ivyde/trunk/test/old-settings-conf/ivysettings.xml Tue Dec 30
09:24:11 2008
@@ -0,0 +1,10 @@
+<ivysettings>
+ <caches defaultCacheDir="${ivy.settings.dir}/../cache-fakerepo"
useOrigin="false" />
+ <settings defaultResolver="fakerepo" checkUpToDate="false" />
+ <resolvers>
+ <filesystem name="fakerepo">
+ <ivy
pattern="${ivy.settings.dir}/../fakerepo/[organisation]/[module]/ivy-[revision].xml"/>
+ <artifact
pattern="${ivy.settings.dir}/../fakerepo/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
+ </filesystem>
+ </resolvers>
+</ivysettings>
Propchange: ant/ivy/ivyde/trunk/test/old-settings-conf/ivysettings.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ant/ivy/ivyde/trunk/test/old-settings-conf/ivysettings.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: ant/ivy/ivyde/trunk/test/old-settings-conf/ivysettings.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml