You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2008/09/19 11:46:02 UTC
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/
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 @@
+<?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=project%3A%2F%2F%2Fsettings%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&retrieveSync=false&alphaOrder=false&resolveInWorkspace=false"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ivydetest-ivy-base-dir</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/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 @@
+<!--
+ 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-ivy-base-dir">
+ <description>
+ </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/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 @@
+<ivysettings>
+ <caches defaultCacheDir="${ivy.basedir}/../cache-fakerepo" useOrigin="false" />
+ <settings defaultResolver="fakerepo" checkUpToDate="false" />
+ <resolvers>
+ <filesystem name="fakerepo">
+ <ivy pattern="${ivy.basedir}/../fakerepo/[organisation]/[module]/ivy-[revision].xml"/>
+ <artifact pattern="${ivy.basedir}/../fakerepo/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
+ </filesystem>
+ </resolvers>
+</ivysettings>
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
AW: AW: AW: 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/
Posted by Ja...@rzf.fin-nrw.de.
>> > I think it would be better to write
>> > Message.info("\n\nIVYDE: Ivy-settings has changed,
configuring Ivy again\n");
>> > Or is "ivysettings" a technical term?
>>
>> well, in Ivy's literature, I used to read about some "ivyconf", so
with the
>> new terminology, it becames "ivysettings". It looks understandable
for me.
>> But I don't have any objection to change every occurence of it into
"Ivy
>> settings".
>
>To me ivysettings is pretty obvious, at least when you know
>how Ivy settings
>are written. But Ivy settings would be fine too, I don't mind.
I am not so familiar with Ivy (yet). So if "ivysettings" is a common
technical term,
I would keep it as it is.
Thanks for clarification.
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: AW: AW: 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/
Posted by Xavier Hanin <xa...@gmail.com>.
On Fri, Sep 19, 2008 at 2:16 PM, Nicolas Lalevée <nicolas.lalevee@hibnet.org
> wrote:
> Le vendredi 19 septembre 2008, Jan.Materne@rzf.fin-nrw.de a écrit :
> > >> > if (ivySettingsLastModified == -1) {
> > >> > Message.info("\n\n");
> > >> > } else {
> > >> > Message.info("\n\nIVYDE: ivysettings has changed,
> > >>
> > >> The info message completely in lower case?
> > >
> > >is there any worry about it ?
> >
> > Not really. But if you present a log message (like the Exception
> > strings)
> > I think it would be better to write
> > Message.info("\n\nIVYDE: Ivy-settings has changed, configuring
> > Ivy again\n");
> > Or is "ivysettings" a technical term?
>
> well, in Ivy's literature, I used to read about some "ivyconf", so with the
> new terminology, it becames "ivysettings". It looks understandable for me.
> But I don't have any objection to change every occurence of it into "Ivy
> settings".
To me ivysettings is pretty obvious, at least when you know how Ivy settings
are written. But Ivy settings would be fine too, I don't mind.
Xavier
>
>
> Nicolas
>
> >
> > >> Why just the two new lines when -1?
> > >
> > >The two new lines are I think because we are probably starting
> > >a new resolve
> > >session, so this need to be somehow visible.
> > >And -1 means that the file has not been loaded yet, so there
> > >is no reloading
> > >to log about.
> >
> > Ok, thanks
> >
> >
> > Jan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
--
Xavier Hanin - Independent Java Consultant
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/
Re: AW: AW: 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/
Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le vendredi 19 septembre 2008, Jan.Materne@rzf.fin-nrw.de a écrit :
> >> > if (ivySettingsLastModified == -1) {
> >> > Message.info("\n\n");
> >> > } else {
> >> > Message.info("\n\nIVYDE: ivysettings has changed,
> >>
> >> The info message completely in lower case?
> >
> >is there any worry about it ?
>
> Not really. But if you present a log message (like the Exception
> strings)
> I think it would be better to write
> Message.info("\n\nIVYDE: Ivy-settings has changed, configuring
> Ivy again\n");
> Or is "ivysettings" a technical term?
well, in Ivy's literature, I used to read about some "ivyconf", so with the
new terminology, it becames "ivysettings". It looks understandable for me.
But I don't have any objection to change every occurence of it into "Ivy
settings".
Nicolas
>
> >> Why just the two new lines when -1?
> >
> >The two new lines are I think because we are probably starting
> >a new resolve
> >session, so this need to be somehow visible.
> >And -1 means that the file has not been loaded yet, so there
> >is no reloading
> >to log about.
>
> Ok, thanks
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
AW: AW: 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/
Posted by Ja...@rzf.fin-nrw.de.
>> > if (ivySettingsLastModified == -1) {
>> > Message.info("\n\n");
>> > } else {
>> > Message.info("\n\nIVYDE: ivysettings has changed,
>>
>>
>> The info message completely in lower case?
>
>is there any worry about it ?
Not really. But if you present a log message (like the Exception
strings)
I think it would be better to write
Message.info("\n\nIVYDE: Ivy-settings has changed, configuring
Ivy again\n");
Or is "ivysettings" a technical term?
>
>> Why just the two new lines when -1?
>
>The two new lines are I think because we are probably starting
>a new resolve
>session, so this need to be somehow visible.
>And -1 means that the file has not been loaded yet, so there
>is no reloading
>to log about.
Ok, thanks
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: AW: 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/
Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le vendredi 19 septembre 2008, Jan.Materne@rzf.fin-nrw.de a écrit :
> >Modified:
> >ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/
>
> eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
>
> >@@ -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");
>
> The info message completely in lower case?
is there any worry about it ?
> Why just the two new lines when -1?
The two new lines are I think because we are probably starting a new resolve
session, so this need to be somehow visible.
And -1 means that the file has not been loaded yet, so there is no reloading
to log about.
Nicolas
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
AW: 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/
Posted by Ja...@rzf.fin-nrw.de.
>Modified:
>ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/
eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
>@@ -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");
The info message completely in lower case?
Why just the two new lines when -1?
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org