ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1407813 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse: CachedIvy.java cpcontainer/IvyClasspathContainerMapper.java resolve/IvyResolveJob.java resolve/IvyResolver.java
Date Sat, 10 Nov 2012 14:05:18 GMT
Author: hibou
Date: Sat Nov 10 14:05:16 2012
New Revision: 1407813

URL: http://svn.apache.org/viewvc?rev=1407813&view=rev
Log:
Improve IvyDE logs

Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java?rev=1407813&r1=1407812&r2=1407813&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
Sat Nov 10 14:05:16 2012
@@ -190,10 +190,10 @@ public abstract class CachedIvy {
         }
 
         if (file.lastModified() != ivySettingsLastModified || !isLoadSettingsOnDemandPath())
{
-            IvySettings ivySettings = createIvySettings();
             if (ivySettingsLastModified != -1) {
                 IvyDEMessage.info("Settings has changed, configuring Ivy again");
             }
+            IvySettings ivySettings = createIvySettings();
             ivy = Ivy.newInstance(ivySettings);
             try {
                 ivy.configure(file);

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java?rev=1407813&r1=1407812&r2=1407813&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java
Sat Nov 10 14:05:16 2012
@@ -102,7 +102,7 @@ public class IvyClasspathContainerMapper
         IClasspathEntry[] classpathEntries;
         Collection paths = new LinkedHashSet();
 
-        IvyDEMessage.verbose("Building classpath from " + all.size() + " resolved artifacts");
+        IvyDEMessage.verbose("Building classpath from " + all.size() + " resolved artifact(s)");
 
         for (Iterator iter = all.iterator(); iter.hasNext();) {
             ArtifactDownloadReport artifact = (ArtifactDownloadReport) iter.next();

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java?rev=1407813&r1=1407812&r2=1407813&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
Sat Nov 10 14:05:16 2012
@@ -127,11 +127,14 @@ public class IvyResolveJob extends Job {
             Iterator itRequests = toResolve.iterator();
             while (itRequests.hasNext()) {
                 ResolveRequest request = (ResolveRequest) itRequests.next();
+
+                IvyDEMessage.info("Processing resolve request " + request.toString());
+
                 forceFailOnError = forceFailOnError || request.isForceFailOnError();
                 monitor.subTask("loading " + request.getResolver().toString());
                 IProject project = request.getResolver().getProject();
                 if (project != null && !project.isAccessible()) {
-                    // closed project, skip it
+                    IvyDEMessage.warn("Skipping resolve on closed project " + project.getName());
                     monitor.worked(step);
                     continue;
                 }
@@ -184,9 +187,9 @@ public class IvyResolveJob extends Job {
         step = (MONITOR_LENGTH - IVY_LOAD_LENGTH - POST_RESOLVE_LENGTH) / toResolve.size();
 
         if (inworkspaceModules.isEmpty()) {
-            IvyDEMessage.verbose("No modules to resolve in workspace");
+            IvyDEMessage.verbose("No module to resolve in workspace");
         } else {
-            IvyDEMessage.info(inworkspaceModules.size() + " modules to resolve in workspace");
+            IvyDEMessage.info(inworkspaceModules.size() + " module(s) to resolve in workspace");
             // for the modules which are using the workspace resolver, make sure
             // we resolve them in the correct order
 
@@ -217,9 +220,9 @@ public class IvyResolveJob extends Job {
         }
 
         if (otherModules.isEmpty()) {
-            IvyDEMessage.verbose("No modules to resolve outside the workspace");
+            IvyDEMessage.verbose("No module to resolve outside the workspace");
         } else {
-            IvyDEMessage.info(otherModules.size() + " modules to resolve outside the workspace");
+            IvyDEMessage.info(otherModules.size() + " module(s) to resolve outside the workspace");
 
             Iterator it = otherModules.iterator();
             while (it.hasNext()) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java?rev=1407813&r1=1407812&r2=1407813&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java
Sat Nov 10 14:05:16 2012
@@ -29,6 +29,7 @@ import java.util.Set;
 import org.apache.ivy.Ivy;
 import org.apache.ivy.core.IvyContext;
 import org.apache.ivy.core.IvyPatternHelper;
+import org.apache.ivy.core.module.descriptor.Artifact;
 import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
@@ -144,7 +145,7 @@ public class IvyResolver {
                     if (!retrieveStatus.isOK()) {
                         return retrieveStatus;
                     }
-    
+
                     postResolveOrRefresh(ivy, md, result, monitor);
                 }
             } catch (ParseException e) {
@@ -219,7 +220,6 @@ public class IvyResolver {
                 } catch (ParseException e) {
                     IvyDEMessage.info("Error while parsing the report " + report
                             + ". Falling back by doing a resolve again.");
-                    // it fails, so let's try resolving for all configuration
                     return doResolve(ivy, md);
                 }
             }
@@ -279,6 +279,8 @@ public class IvyResolver {
     private void findAllArtifactOnRefresh(Ivy ivy, XmlReportParser parser, ResolveResult
result)
             throws ParseException {
         ModuleRevisionId[] dependencyMrdis = parser.getDependencyRevisionIds();
+        IvyDEMessage.verbose("Resolve report parsed. Fetching artifacts of "
+                + dependencyMrdis.length + " dependencie(s)");
         for (int iDep = 0; iDep < dependencyMrdis.length; iDep++) {
             DependencyResolver depResolver = ivy.getSettings().getResolver(dependencyMrdis[iDep]);
             DefaultDependencyDescriptor depDescriptor = new DefaultDependencyDescriptor(
@@ -286,11 +288,16 @@ public class IvyResolver {
             ResolveOptions options = new ResolveOptions();
             options.setRefresh(true);
             options.setUseCacheOnly(true);
+            IvyDEMessage.debug("Fetching dependency " + dependencyMrdis[iDep]);
             ResolvedModuleRevision dependency = depResolver.getDependency(depDescriptor,
                 new ResolveData(ivy.getResolveEngine(), options));
             if (dependency != null) {
-                result.putArtifactsForDep(dependencyMrdis[iDep], dependency.getDescriptor()
-                        .getAllArtifacts());
+                Artifact[] artifacts = dependency.getDescriptor().getAllArtifacts();
+                IvyDEMessage.debug("Dependency " + dependencyMrdis[iDep] + " found: "
+                        + artifacts.length + " artifact(s) found");
+                result.putArtifactsForDep(dependencyMrdis[iDep], artifacts);
+            } else {
+                IvyDEMessage.debug("Dependency " + dependencyMrdis[iDep] + " not found");
             }
         }
     }



Mime
View raw message