Author: xavier
Date: Thu Mar 8 04:24:43 2007
New Revision: 516020
URL: http://svn.apache.org/viewvc?view=rev&rev=516020
Log:
migrate to latest Ivy version
Modified:
incubator/ivy/ivyde/trunk/ivy.xml
incubator/ivy/ivyde/trunk/ivyconf.xml
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/core/model/IvyModel.java
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java
Modified: incubator/ivy/ivyde/trunk/ivy.xml
URL:
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/ivy.xml?view=diff&rev=516020&r1=516019&r2=516020
==============================================================================
--- incubator/ivy/ivyde/trunk/ivy.xml (original)
+++ incubator/ivy/ivyde/trunk/ivy.xml Thu Mar 8 04:24:43 2007
@@ -8,7 +8,7 @@
<conf name="ant" visibility="public" description="For ant
contribution"/>
</configurations>
<dependencies>
- <dependency org="jayasoft" name="ivy" rev="1.4.1"
conf="default->core,httpclient,oro,vfs,sftp;ant->default"/>
+ <dependency org="apache" name="ivy" rev="latest.integration"
conf="default->core,httpclient,oro,vfs,sftp;ant->default"/>
<dependency org="apache" name="commons-logging" rev="1.0.4"
conf="default->default"/>
</dependencies>
</ivy-module>
Modified: incubator/ivy/ivyde/trunk/ivyconf.xml
URL:
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/ivyconf.xml?view=diff&rev=516020&r1=516019&r2=516020
==============================================================================
--- incubator/ivy/ivyde/trunk/ivyconf.xml (original)
+++ incubator/ivy/ivyde/trunk/ivyconf.xml Thu Mar 8 04:24:43 2007
@@ -1,10 +1,25 @@
<ivyconf>
- <conf defaultResolver="public" />
+ <include url="${ivy.default.conf.dir}/ivyconf-local.xml"/>
+ <conf defaultResolver="default" />
<resolvers>
- <url name="public">
- <ivy
pattern="http://ivyrep.jayasoft.org/[organisation]/[module]/ivy-[revision].xml"/>
- <artifact
pattern="http://ivyrep.jayasoft.org/[organisation]/[module]/[revision]/[artifact].[ext]"/>
- <artifact
pattern="http://www.ibiblio.org/maven/[module]/[type]s/[artifact]-[revision].[ext]"/>
- </url>
+ <chain name="default">
+ <resolver ref="local"/>
+ <url name="public">
+ <ivy
pattern="http://ivyrep.jayasoft.org/[organisation]/[module]/ivy-[revision].xml"/>
+ <artifact
pattern="http://ivyrep.jayasoft.org/[organisation]/[module]/[revision]/[artifact].[ext]"/>
+ <artifact
pattern="http://repo1.maven.org/maven/[module]/[type]s/[artifact]-[revision].[ext]"/>
+ </url>
+ </chain>
+ <chain name="ivy">
+ <resolver ref="local"/>
+ <url name="ivy-latest">
+ <ivy
pattern="http://incubator.apache.org/ivy/downloads/latest/ivy.xml"/>
+ <artifact
pattern="http://incubator.apache.org/ivy/downloads/latest/[artifact].[ext]"/>
+ </url>
+ </chain>
</resolvers>
+ <modules>
+ <!-- since Ivy 1.5 has not been released yet, we use a custom
resolver pointing to the latest area of ivy site -->
+ <module organisation="apache" name="ivy" resolver="ivy"/>
+ </modules>
</ivyconf>
Modified:
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
URL:
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/IvyPlugin.java?view=diff&rev=516020&r1=516019&r2=516020
==============================================================================
--- incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
(original)
+++ incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
Thu Mar 8 04:24:43 2007
@@ -14,6 +14,10 @@
import java.util.ResourceBundle;
import java.util.Set;
+import org.apache.ivy.Ivy;
+import org.apache.ivy.core.IvyContext;
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.util.Message;
import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer;
import
org.apache.ivyde.eclipse.cpcontainer.fragmentinfo.IPackageFragmentExtraInfo;
import org.apache.ivyde.eclipse.cpcontainer.fragmentinfo.PreferenceStoreInfo;
@@ -37,11 +41,6 @@
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.osgi.service.prefs.BackingStoreException;
-
-import fr.jayasoft.ivy.Artifact;
-import fr.jayasoft.ivy.Ivy;
-import fr.jayasoft.ivy.IvyContext;
-import fr.jayasoft.ivy.util.Message;
/**
* The main plugin class to be used in the desktop.
Modified:
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
URL:
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java?view=diff&rev=516020&r1=516019&r2=516020
==============================================================================
---
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
(original)
+++
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
Thu Mar 8 04:24:43 2007
@@ -14,6 +14,27 @@
import java.util.LinkedHashSet;
import java.util.List;
+import org.apache.ivy.Ivy;
+import org.apache.ivy.core.cache.CacheManager;
+import org.apache.ivy.core.event.IvyEvent;
+import org.apache.ivy.core.event.IvyListener;
+import org.apache.ivy.core.event.download.EndArtifactDownloadEvent;
+import org.apache.ivy.core.event.download.PrepareDownloadEvent;
+import org.apache.ivy.core.event.download.StartArtifactDownloadEvent;
+import org.apache.ivy.core.event.resolve.EndResolveDependencyEvent;
+import org.apache.ivy.core.event.resolve.StartResolveDependencyEvent;
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.module.id.ModuleId;
+import org.apache.ivy.core.report.ResolveReport;
+import org.apache.ivy.core.resolve.ResolveOptions;
+import org.apache.ivy.core.retrieve.RetrieveOptions;
+import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry;
+import org.apache.ivy.plugins.report.XmlReportOutputter;
+import org.apache.ivy.plugins.report.XmlReportParser;
+import org.apache.ivy.plugins.repository.TransferEvent;
+import org.apache.ivy.plugins.repository.TransferListener;
+import org.apache.ivy.util.Message;
import org.apache.ivyde.eclipse.IvyPlugin;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
@@ -36,24 +57,6 @@
import org.eclipse.jdt.internal.core.JavaModelManager;
import org.eclipse.swt.widgets.Display;
-import fr.jayasoft.ivy.Artifact;
-import fr.jayasoft.ivy.Ivy;
-import fr.jayasoft.ivy.ModuleDescriptor;
-import fr.jayasoft.ivy.ModuleId;
-import fr.jayasoft.ivy.event.IvyEvent;
-import fr.jayasoft.ivy.event.IvyListener;
-import fr.jayasoft.ivy.event.download.EndArtifactDownloadEvent;
-import fr.jayasoft.ivy.event.download.PrepareDownloadEvent;
-import fr.jayasoft.ivy.event.download.StartArtifactDownloadEvent;
-import fr.jayasoft.ivy.event.resolve.EndResolveDependencyEvent;
-import fr.jayasoft.ivy.event.resolve.StartResolveDependencyEvent;
-import fr.jayasoft.ivy.parser.ModuleDescriptorParserRegistry;
-import fr.jayasoft.ivy.report.ResolveReport;
-import fr.jayasoft.ivy.report.XmlReportOutputter;
-import fr.jayasoft.ivy.repository.TransferEvent;
-import fr.jayasoft.ivy.repository.TransferListener;
-import fr.jayasoft.ivy.util.Message;
-import fr.jayasoft.ivy.xml.XmlReportParser;
/**
*
@@ -68,6 +71,7 @@
private IProgressMonitor _monitor;
private IProgressMonitor _dlmonitor;
private Ivy _ivy;
+ private CacheManager _cacheMgr;
private boolean _usePreviousResolveIfExist;
private int _workPerArtifact = 100;
private boolean _notify;
@@ -75,6 +79,7 @@
public IvyResolveJob(Ivy ivy, boolean usePreviousResolveIfExist,
boolean notify) {
super("Resolve
"+_javaProject.getProject().getName()+"/"+_ivyXmlPath+" dependencies");
_ivy = ivy;
+ _cacheMgr = CacheManager.getInstance(_ivy.getSettings());
_usePreviousResolveIfExist = usePreviousResolveIfExist;
_notify = notify;
}
@@ -143,7 +148,7 @@
Thread resolver = new Thread() {
public void run() {
IvyPlugin.setIvyContext(_javaProject);
- _ivy.addIvyListener(IvyResolveJob.this);
+
_ivy.getEventManager().addIvyListener(IvyResolveJob.this);
_monitor.beginTask("resolving dependencies",
1000);
_monitor.setTaskName("resolving
dependencies...");
@@ -159,7 +164,7 @@
try {
if (_usePreviousResolveIfExist)
{
- md =
ModuleDescriptorParserRegistry.getInstance().parseDescriptor(_ivy, ivyURL,
false);
+ md =
ModuleDescriptorParserRegistry.getInstance().parseDescriptor(_ivy.getSettings(),
ivyURL, false);
if (_confs.length == 1
&& "*".equals(_confs[0])) {
confs =
md.getConfigurationsNames();
} else {
@@ -168,24 +173,31 @@
// we check if all
required configurations have been resolved
for (int i = 0; i <
confs.length; i++) {
- File report =
new File(_ivy.getDefaultCache(),
XmlReportOutputter.getReportFileName(md.getModuleRevisionId().getModuleId(),
confs[i]));
+ File report =
+
_cacheMgr
+
.getConfigurationResolveReportInCache(
+
ResolveOptions.getDefaultResolveId(md),
+
confs[i]);
if
(!report.exists()) {
// no
resolve previously done for at least one conf... we do it now
Message.info("\n\nIVY DE: previous resolve of " +
md.getModuleRevisionId().getModuleId() + " doesn't contain enough data:
resolving again\n");
-
ResolveReport r = _ivy.resolve(ivyURL, null, _confs, _ivy.getDefaultCache(),
null, true);
+
ResolveReport r = _ivy.resolve(ivyURL, new ResolveOptions().setConfs(_confs));
resolved = true;
confs =
r.getConfigurations();
//eventually do
a retrieve
if(IvyPlugin.shouldDoRetrieve(_javaProject)) {
_monitor.setTaskName("retrieving dependencies in
"+IvyPlugin.getFullRetrievePatternHerited(_javaProject));
-
_ivy.retrieve(md.getModuleRevisionId().getModuleId(), confs,
_ivy.getDefaultCache(), IvyPlugin.getFullRetrievePatternHerited(_javaProject));
+
_ivy.retrieve(
+
md.getModuleRevisionId(),
+
IvyPlugin.getFullRetrievePatternHerited(_javaProject),
+
new RetrieveOptions().setConfs(confs));
}
break;
}
}
} else {
Message.info("\n\nIVYDE: calling resolve on " + ivyURL + "\n");
- ResolveReport report =
_ivy.resolve(ivyURL, null, _confs, _ivy.getDefaultCache(), null, true);
+ ResolveReport report =
_ivy.resolve(ivyURL, new ResolveOptions().setConfs(_confs));
problemMessages =
report.getAllProblemMessages();
confs =
report.getConfigurations();
md =
report.getModuleDescriptor();
@@ -198,7 +210,10 @@
//eventually do a
retrieve
if(IvyPlugin.shouldDoRetrieve(_javaProject)) {
_monitor.setTaskName("retrieving dependencies in
"+IvyPlugin.getFullRetrievePatternHerited(_javaProject));
-
_ivy.retrieve(md.getModuleRevisionId().getModuleId(), confs,
_ivy.getDefaultCache(), IvyPlugin.getFullRetrievePatternHerited(_javaProject));
+ _ivy.retrieve(
+
md.getModuleRevisionId(),
+
IvyPlugin.getFullRetrievePatternHerited(_javaProject),
+
new RetrieveOptions().setConfs(confs));
}
}
} catch (FileNotFoundException e) {
@@ -221,7 +236,7 @@
if (!resolved) {
//maybe this is a
problem with the cache, we retry with an actual resolve
Message.info("\n\nIVYDE: tryed to build classpath from cache, but files seemed
to be corrupted... trying with an actual resolve");
- ResolveReport report =
_ivy.resolve(ivyURL, null, _confs, _ivy.getDefaultCache(), null, true);
+ ResolveReport report =
_ivy.resolve(ivyURL, new ResolveOptions().setConfs(_confs));
classpathItems[0] =
parseResolvedConfs(report.getConfigurations(), mid);
}
}
@@ -230,7 +245,7 @@
return;
} finally {
_monitor.done();
- _ivy.removeIvyListener(IvyResolveJob.this);
+
_ivy.getEventManager().removeIvyListener(IvyResolveJob.this);
}
if (!problemMessages.isEmpty()) {
@@ -283,10 +298,13 @@
private ClasspathItem[] parseResolvedConfs(String[] confs,
ModuleId mid) throws ParseException, IOException {
ClasspathItem[] classpathItems;
- XmlReportParser parser = new XmlReportParser();
Collection all = new LinkedHashSet();
+ String resolveId = ResolveOptions.getDefaultResolveId(mid);
for (int i = 0; i < confs.length; i++) {
- Artifact[] artifacts = parser.getArtifacts(mid, confs[i],
_ivy.getDefaultCache());
+ XmlReportParser parser = new XmlReportParser();
+ File report =
_cacheMgr.getConfigurationResolveReportInCache(resolveId, confs[i]);
+ parser.parse(report);
+ Artifact[] artifacts = parser.getArtifacts();
all.addAll(Arrays.asList(artifacts));
}
Collection files = new LinkedHashSet();
@@ -296,7 +314,7 @@
File sourcesArtifact = getSourcesArtifact(artifact,
all);
File javadocArtifact = getJavadocArtifact(artifact,
all);
files.add(new ClasspathItem(
-
_ivy.getArchiveFileInCache(_ivy.getDefaultCache(), artifact),
+
_cacheMgr.getArchiveFileInCache(artifact),
sourcesArtifact,
javadocArtifact
));
@@ -315,7 +333,7 @@
a.getId().getRevision().equals(artifact.getId().getRevision()) &&
IvyPlugin.isSources(_javaProject, a))
{
- return
_ivy.getArchiveFileInCache(_ivy.getDefaultCache(), a);
+ return _cacheMgr.getArchiveFileInCache(a);
}
}
return null;
@@ -330,7 +348,7 @@
a.getId().equals(artifact.getId()) &&
IvyPlugin.isJavadoc(_javaProject, a))
{
- return
_ivy.getArchiveFileInCache(_ivy.getDefaultCache(), a);
+ return _cacheMgr.getArchiveFileInCache(a);
}
}
return null;
@@ -624,9 +642,12 @@
try {
Ivy ivy = IvyPlugin.getIvy(_javaProject);
URL ivyURL = _ivyXmlFile.toURL();
- ModuleDescriptor md =
ModuleDescriptorParserRegistry.getInstance().parseDescriptor(ivy, ivyURL,
false);
-
- return new File(ivy.getDefaultCache(),
XmlReportOutputter.getReportFileName(md.getModuleRevisionId().getModuleId(),
md.getConfigurationsNames()[0])).toURL();
+ ModuleDescriptor md =
ModuleDescriptorParserRegistry.getInstance().parseDescriptor(ivy.getSettings(),
ivyURL, false);
+ String resolveId = ResolveOptions.getDefaultResolveId(md);
+ return CacheManager.getInstance(ivy.getSettings())
+ .getConfigurationResolveReportInCache(
+ resolveId,
+ md.getConfigurationsNames()[0]).toURL();
} catch (Exception ex) {
return null;
}
Modified:
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
URL:
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java?view=diff&rev=516020&r1=516019&r2=516020
==============================================================================
---
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
(original)
+++
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
Thu Mar 8 04:24:43 2007
@@ -12,6 +12,9 @@
import java.net.URL;
import java.text.ParseException;
+import org.apache.ivy.core.module.descriptor.Configuration;
+import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry;
import org.apache.ivyde.eclipse.IvyPlugin;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
@@ -25,8 +28,6 @@
import org.eclipse.jdt.ui.wizards.NewElementWizardPage;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
@@ -51,9 +52,6 @@
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.views.navigator.ResourceSorter;
-import fr.jayasoft.ivy.Configuration;
-import fr.jayasoft.ivy.ModuleDescriptor;
-import fr.jayasoft.ivy.parser.ModuleDescriptorParserRegistry;
public class IvydeContainerPage extends NewElementWizardPage
implements IClasspathContainerPage, IClasspathContainerPageExtension {
@@ -303,7 +301,7 @@
try {
IFile file = _project.getProject().getFile(ivyfile);
URL url = new File( file.getLocation().toOSString()).toURL();
- return
ModuleDescriptorParserRegistry.getInstance().parseDescriptor(IvyPlugin.getIvy(_project),
url, false);
+ return
ModuleDescriptorParserRegistry.getInstance().parseDescriptor(IvyPlugin.getIvy(_project).getSettings(),
url, false);
} catch (Exception e) {}
return null;
}
Modified:
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java
URL:
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java?view=diff&rev=516020&r1=516019&r2=516020
==============================================================================
---
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java
(original)
+++
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java
Thu Mar 8 04:24:43 2007
@@ -6,6 +6,8 @@
*/
package org.apache.ivyde.eclipse.ui.console;
+import org.apache.ivy.util.Message;
+import org.apache.ivy.util.MessageImpl;
import org.apache.ivyde.eclipse.IvyPlugin;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.swt.graphics.Color;
@@ -16,9 +18,6 @@
import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.MessageConsole;
import org.eclipse.ui.console.MessageConsoleStream;
-
-import fr.jayasoft.ivy.util.Message;
-import fr.jayasoft.ivy.util.MessageImpl;
/**
* This class is used to deal with ivy output, and is largely insprired of
Modified:
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/core/model/IvyModel.java
URL:
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/core/model/IvyModel.java?view=diff&rev=516020&r1=516019&r2=516020
==============================================================================
---
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/core/model/IvyModel.java
(original)
+++
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/core/model/IvyModel.java
Thu Mar 8 04:24:43 2007
@@ -11,18 +11,19 @@
import java.util.Map;
import java.util.Properties;
+import org.apache.ivy.Ivy;
+import org.apache.ivy.core.IvyPatternHelper;
+import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.apache.ivy.core.resolve.ResolveData;
+import org.apache.ivy.core.resolve.ResolveOptions;
+import org.apache.ivy.core.resolve.ResolvedModuleRevision;
+import org.apache.ivy.core.settings.IvySettings;
+import org.apache.ivy.plugins.resolver.DependencyResolver;
import org.apache.ivyde.eclipse.IvyPlugin;
import org.apache.ivyde.eclipse.ui.preferences.PreferenceConstants;
import org.eclipse.jdt.core.IJavaProject;
-import fr.jayasoft.ivy.DefaultDependencyDescriptor;
-import fr.jayasoft.ivy.DependencyResolver;
-import fr.jayasoft.ivy.Ivy;
-import fr.jayasoft.ivy.ModuleRevisionId;
-import fr.jayasoft.ivy.ResolveData;
-import fr.jayasoft.ivy.ResolvedModuleRevision;
-import fr.jayasoft.ivy.util.IvyPatternHelper;
-
public class IvyModel {
private IJavaProject _javaProject;
@@ -315,11 +316,11 @@
base.append(' ');
qualifier = qualifier.substring(1);
}
- ResolveData data = new ResolveData(getIvy(),
getIvy().getDefaultCache(), null, null, true);
+ ResolveData data = new
ResolveData(getIvy().getResolveEngine(), new ResolveOptions());
ModuleRevisionId mrid = ModuleRevisionId.newInstance(org,
name, branch, rev, otherAtts);
DefaultDependencyDescriptor ddd = new
DefaultDependencyDescriptor(mrid, false);
try {
- DependencyResolver resolver =
getIvy().getResolver(mrid.getModuleId());
+ DependencyResolver resolver =
getIvySettings().getResolver(mrid.getModuleId());
if (resolver == null) {
return null;
}
@@ -361,11 +362,11 @@
base.append(' ');
qualifier = qualifier.substring(1);
}
- ResolveData data = new ResolveData(getIvy(),
getIvy().getDefaultCache(), null, null, true);
+ ResolveData data = new
ResolveData(getIvy().getResolveEngine(), new ResolveOptions());
ModuleRevisionId mrid =
ModuleRevisionId.newInstance(org, (String)otherAttValues.get("name"),
(String)otherAttValues.get("rev"));
DefaultDependencyDescriptor ddd = new
DefaultDependencyDescriptor(mrid, false);
try {
- String[] confs =
getIvy().getResolver(mrid.getModuleId()).getDependency(ddd,
data).getDescriptor().getConfigurationsNames();
+ String[] confs =
getIvySettings().getResolver(mrid.getModuleId()).getDependency(ddd,
data).getDescriptor().getConfigurationsNames();
for (int i = 0; i < confs.length; i++) {
confs[i] = base + confs[i];
}
@@ -394,11 +395,11 @@
Map otherAttValues =
ivyFile.getAllAttsValues(indexes[0]+1);
String org =
ivyFile.getDependencyOrganisation(otherAttValues);
if(org != null && otherAttValues != null &&
otherAttValues.get("name") != null && otherAttValues.get("rev") != null &&
getIvy() != null) {
- ResolveData data = new ResolveData(getIvy(),
getIvy().getDefaultCache(), null, null, true);
+ ResolveData data = new
ResolveData(getIvy().getResolveEngine(), new ResolveOptions());
ModuleRevisionId mrid =
ModuleRevisionId.newInstance(org, (String)otherAttValues.get("name"),
(String)otherAttValues.get("rev"));
DefaultDependencyDescriptor ddd = new
DefaultDependencyDescriptor(mrid, false);
try {
- String[] confs =
getIvy().getResolver(mrid.getModuleId()).getDependency(ddd,
data).getDescriptor().getConfigurationsNames();
+ String[] confs =
getIvySettings().getResolver(mrid.getModuleId()).getDependency(ddd,
data).getDescriptor().getConfigurationsNames();
List ret = new ArrayList(Arrays.asList(confs));
ret.add("*");
return (String[])ret.toArray(new
String[ret.size()]);
@@ -512,6 +513,10 @@
return IvyPlugin.getIvy(_javaProject);
}
+ private IvySettings getIvySettings() {
+ return getIvy().getSettings();
+ }
+
private List listDependencyTokenValues(String att, IvyFile ivyfile) {
Map allAttsValues = ivyfile.getAllAttsValues();
@@ -530,7 +535,7 @@
replaceToken(otherAttValues, "rev",
IvyPatternHelper.REVISION_KEY);
if (!otherAttValues.containsKey(IvyPatternHelper.BRANCH_KEY)) {
- otherAttValues.put(IvyPatternHelper.BRANCH_KEY,
getIvy().getDefaultBranch());
+ otherAttValues.put(IvyPatternHelper.BRANCH_KEY,
getIvySettings().getDefaultBranch());
}
String stdAtt = standardiseDependencyAttribute(att);
Modified:
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java
URL:
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java?view=diff&rev=516020&r1=516019&r2=516020
==============================================================================
---
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java
(original)
+++
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java
Thu Mar 8 04:24:43 2007
@@ -2,8 +2,8 @@
import java.net.URL;
+import org.apache.ivy.util.Message;
import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer;
-import org.apache.ivyde.eclipse.ui.core.IvyFileEditorInput;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IJavaProject;
@@ -17,10 +17,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
-
-import fr.jayasoft.ivy.util.Message;
public class ReportView extends ViewPart implements ISelectionListener {
private Browser _browser;