Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 34004 invoked from network); 19 Sep 2008 09:46:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Sep 2008 09:46:54 -0000 Received: (qmail 41726 invoked by uid 500); 19 Sep 2008 09:46:51 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 41675 invoked by uid 500); 19 Sep 2008 09:46:51 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 41666 invoked by uid 99); 19 Sep 2008 09:46:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Sep 2008 02:46:51 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Sep 2008 09:45:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A8798238896F; Fri, 19 Sep 2008 02:46:02 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r697019 - in /ant/ivy/ivyde/trunk: org.apache.ivyde.eclipse/ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ test/ivy-base-dir/ test/ivy-base-dir/settings/ test/ivy-base-dir/src/ Date: Fri, 19 Sep 2008 09:46:02 -0000 To: notifications@ant.apache.org From: hibou@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080919094602.A8798238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hibou Date: Fri Sep 19 02:46:01 2008 New Revision: 697019 URL: http://svn.apache.org/viewvc?rev=697019&view=rev Log: IVYDE-52: - now the ivy base dir is set to the eclipse project location - test project added, and it is correctly resolved Added: ant/ivy/ivyde/trunk/test/ivy-base-dir/ (with props) ant/ivy/ivyde/trunk/test/ivy-base-dir/.classpath ant/ivy/ivyde/trunk/test/ivy-base-dir/.project ant/ivy/ivyde/trunk/test/ivy-base-dir/ivy.xml (with props) ant/ivy/ivyde/trunk/test/ivy-base-dir/settings/ ant/ivy/ivyde/trunk/test/ivy-base-dir/settings/ivysettings.xml (with props) ant/ivy/ivyde/trunk/test/ivy-base-dir/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=697019&r1=697018&r2=697019&view=diff ============================================================================== --- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt (original) +++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt Fri Sep 19 02:46:01 2008 @@ -9,6 +9,7 @@ - NEW: Handle a project: scheme for the path of the ivysettings.xml (IVYDE-94) - NEW: Need CleanCache task in context menu (IVYDE-114) +- IMPROVE: Set current working dir to eclipse project location (IVYDE-52) - IMPROVE: Make the classpath entries order configuration UI more intuitive (IVYDE-104) - IMPROVE: Retrieve after resolve feature does not clean target directory first (IVYDE-105) 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=697019&r1=697018&r2=697019&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 Fri Sep 19 02:46:01 2008 @@ -31,6 +31,7 @@ import org.apache.ivy.Ivy; import org.apache.ivy.core.module.descriptor.ModuleDescriptor; +import org.apache.ivy.core.settings.IvySettings; import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry; import org.apache.ivy.util.Message; import org.apache.ivyde.eclipse.IvyDEException; @@ -373,9 +374,12 @@ if (settingsPath == null || settingsPath.trim().length() == 0) { // no settings specified, so take the default one if (ivy == null) { - ivy = new Ivy(); + IvySettings ivySettings = new IvySettings(); + if (javaProject != null) { + ivySettings.setBaseDir(javaProject.getProject().getLocation().toFile()); + } try { - ivy.configureDefault(); + ivySettings.loadDefault(); } catch (ParseException e) { IvyDEException ex = new IvyDEException( "Parsing error of the default Ivy settings", @@ -391,6 +395,7 @@ setConfStatus(ex); throw ex; } + ivy = Ivy.newInstance(ivySettings); } setConfStatus(null); return ivy; @@ -402,7 +407,7 @@ String path = settingsPath.substring(pathIndex + 1); if (projectName.equals("")) { IFile f = javaProject.getProject().getFile(path); - File file = new File(f.getLocation().toOSString()); + File file = f.getLocation().toFile(); return getIvy(file); } else { try { @@ -425,8 +430,11 @@ File file = new File(f.getLocation().toOSString()); return getIvy(file); } catch (JavaModelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + IvyDEException ex = new IvyDEException("The workspace is broken", + "The projects in the workspace could not be listed when resolving the settings (" + + this.toString() + ")", null); + setConfStatus(ex); + throw ex; } } } @@ -447,9 +455,12 @@ } else { // an URL but not a file if (ivy == null || ivySettingsLastModified == -1) { - ivy = new Ivy(); + IvySettings ivySettings = new IvySettings(); + if (javaProject != null) { + ivySettings.setBaseDir(javaProject.getProject().getLocation().toFile()); + } try { - ivy.configure(url); + ivySettings.load(url); ivySettingsLastModified = 0; } catch (ParseException e) { IvyDEException ex = new IvyDEException("Parsing error of the Ivy settings", @@ -464,6 +475,7 @@ setConfStatus(ex); throw ex; } + ivy = Ivy.newInstance(ivySettings); } } setConfStatus(null); @@ -480,14 +492,17 @@ } if (file.lastModified() != ivySettingsLastModified) { - ivy = new Ivy(); + IvySettings ivySettings = new IvySettings(); + if (javaProject != null) { + ivySettings.setBaseDir(javaProject.getProject().getLocation().toFile()); + } if (ivySettingsLastModified == -1) { Message.info("\n\n"); } else { Message.info("\n\nIVYDE: ivysettings has changed, configuring ivy again\n"); } try { - ivy.configure(file); + ivySettings.load(file); } catch (ParseException e) { IvyDEException ex = new IvyDEException("Parsing error of the Ivy settings", "The ivy settings file '" + ivySettingsPath + "' could not be parsed (" @@ -501,6 +516,7 @@ setConfStatus(ex); throw ex; } + ivy = Ivy.newInstance(ivySettings); ivySettingsLastModified = file.lastModified(); } Propchange: ant/ivy/ivyde/trunk/test/ivy-base-dir/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Fri Sep 19 02:46:01 2008 @@ -0,0 +1,2 @@ +bin + Added: ant/ivy/ivyde/trunk/test/ivy-base-dir/.classpath URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/ivy-base-dir/.classpath?rev=697019&view=auto ============================================================================== --- ant/ivy/ivyde/trunk/test/ivy-base-dir/.classpath (added) +++ ant/ivy/ivyde/trunk/test/ivy-base-dir/.classpath Fri Sep 19 02:46:01 2008 @@ -0,0 +1,7 @@ + + + + + + + Added: ant/ivy/ivyde/trunk/test/ivy-base-dir/.project URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/ivy-base-dir/.project?rev=697019&view=auto ============================================================================== --- ant/ivy/ivyde/trunk/test/ivy-base-dir/.project (added) +++ ant/ivy/ivyde/trunk/test/ivy-base-dir/.project Fri Sep 19 02:46:01 2008 @@ -0,0 +1,17 @@ + + + ivydetest-ivy-base-dir + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + Added: ant/ivy/ivyde/trunk/test/ivy-base-dir/ivy.xml URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/ivy-base-dir/ivy.xml?rev=697019&view=auto ============================================================================== --- ant/ivy/ivyde/trunk/test/ivy-base-dir/ivy.xml (added) +++ ant/ivy/ivyde/trunk/test/ivy-base-dir/ivy.xml Fri Sep 19 02:46:01 2008 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + Propchange: ant/ivy/ivyde/trunk/test/ivy-base-dir/ivy.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ant/ivy/ivyde/trunk/test/ivy-base-dir/ivy.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: ant/ivy/ivyde/trunk/test/ivy-base-dir/ivy.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: ant/ivy/ivyde/trunk/test/ivy-base-dir/settings/ivysettings.xml URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/test/ivy-base-dir/settings/ivysettings.xml?rev=697019&view=auto ============================================================================== --- ant/ivy/ivyde/trunk/test/ivy-base-dir/settings/ivysettings.xml (added) +++ ant/ivy/ivyde/trunk/test/ivy-base-dir/settings/ivysettings.xml Fri Sep 19 02:46:01 2008 @@ -0,0 +1,10 @@ + + + + + + + + + + Propchange: ant/ivy/ivyde/trunk/test/ivy-base-dir/settings/ivysettings.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ant/ivy/ivyde/trunk/test/ivy-base-dir/settings/ivysettings.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: ant/ivy/ivyde/trunk/test/ivy-base-dir/settings/ivysettings.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml