You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by xa...@apache.org on 2007/06/05 12:02:43 UTC

svn commit: r544459 [4/36] - in /incubator/ivy/core/trunk: src/java/org/apache/ivy/ src/java/org/apache/ivy/ant/ src/java/org/apache/ivy/core/ src/java/org/apache/ivy/core/cache/ src/java/org/apache/ivy/core/check/ src/java/org/apache/ivy/core/deliver/...

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCheck.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCheck.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCheck.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCheck.java Tue Jun  5 05:02:27 2007
@@ -28,66 +28,71 @@
 import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.types.FileSet;
 
-
 /**
- * Checks the given ivy file using current configuration to see if all dependencies
- * are available, with good confs. If a resolver name is given, it also checks that the declared
- * publications are available in the corresponding resolver.
- * Note that the check is not performed recursively, i.e. if a dependency has itself dependencies
- * badly described or not available, this check will not discover it.
- *  
+ * Checks the given ivy file using current configuration to see if all dependencies are available,
+ * with good confs. If a resolver name is given, it also checks that the declared publications are
+ * available in the corresponding resolver. Note that the check is not performed recursively, i.e.
+ * if a dependency has itself dependencies badly described or not available, this check will not
+ * discover it.
  */
 public class IvyCheck extends IvyTask {
     private File _file = null;
+
     private List _filesets = new ArrayList();
+
     private String _resolvername;
+
     public File getFile() {
         return _file;
     }
+
     public void setFile(File file) {
         _file = file;
     }
+
     /**
      * Adds a set of files to check.
-     * @param set a set of files to check
+     * 
+     * @param set
+     *            a set of files to check
      */
     public void addFileset(FileSet set) {
         _filesets.add(set);
     }
+
     public String getResolvername() {
         return _resolvername;
     }
-    
+
     public void setResolvername(String resolverName) {
         _resolvername = resolverName;
     }
-    
 
     public void doExecute() throws BuildException {
         try {
-        Ivy ivy = getIvyInstance();
-        if (_file != null) {
-            if (ivy.check(_file.toURL(), _resolvername)) {
-                Message.verbose("checked "+_file+": OK");
+            Ivy ivy = getIvyInstance();
+            if (_file != null) {
+                if (ivy.check(_file.toURL(), _resolvername)) {
+                    Message.verbose("checked " + _file + ": OK");
+                }
             }
-        }
-        for (int i = 0; i < _filesets.size(); i++) {
-            FileSet fs = (FileSet) _filesets.get(i);
-            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
-            
-            File fromDir = fs.getDir(getProject());
-            
-            String[] srcFiles = ds.getIncludedFiles();
-            for (int j = 0; j < srcFiles.length; j++) {
-                File file = new File(fromDir, srcFiles[j]);
-                if (ivy.check(file.toURL(), _resolvername)) {
-                    Message.verbose("checked "+file+": OK");
+            for (int i = 0; i < _filesets.size(); i++) {
+                FileSet fs = (FileSet) _filesets.get(i);
+                DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+
+                File fromDir = fs.getDir(getProject());
+
+                String[] srcFiles = ds.getIncludedFiles();
+                for (int j = 0; j < srcFiles.length; j++) {
+                    File file = new File(fromDir, srcFiles[j]);
+                    if (ivy.check(file.toURL(), _resolvername)) {
+                        Message.verbose("checked " + file + ": OK");
+                    }
                 }
             }
-        }
         } catch (MalformedURLException e) {
-            throw new BuildException("impossible to convert a file to an url! "+e, e);
+            throw new BuildException("impossible to convert a file to an url! " + e, e);
         }
     }
-    
+
 }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyConfigure.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyConfigure.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyConfigure.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyConfigure.java Tue Jun  5 05:02:27 2007
@@ -33,66 +33,64 @@
  */
 public class IvyConfigure extends IvyTask {
 
-	private IvyAntSettings antSettings = new IvyAntSettings();
+    private IvyAntSettings antSettings = new IvyAntSettings();
 
-	public void doExecute() throws BuildException {
-		ensureMessageInitialised();
-		log(
-				"ivy:configure is deprecated, please use the data type ivy:settings instead",
-				Project.MSG_WARN);
-		// ivyConfigure used to export properties in the ant script.
-		// ivy:settings doesn't.
-		try {
-			loadDefaultProperties();
-		} catch (Exception ex) {
-			throw new BuildException(
-					"impossible to load ivy default properties file: " + ex, ex);
-		}
-		antSettings.registerAsDefault();
-	}
-
-	private void loadDefaultProperties() {
-		Property prop = new Property() {
-			public void execute() throws BuildException {
-				Properties props = antSettings.getDefaultProperties();
-				addProperties(props);
-			}
-		};
-		prop.setProject(getProject());
-		prop.execute();
-	}
-
-	public void addConfiguredCredentials(Credentials c) {
-		antSettings.addConfiguredCredentials(c);
-	}
-
-	public void setFile(File file) {
-		antSettings.setFile(file);
-	}
-
-	public void setHost(String host) {
-		antSettings.setHost(host);
-	}
-
-	public void setPasswd(String passwd) {
-		antSettings.setPasswd(passwd);
-	}
-
-	public void setProject(Project prj) {
-		super.setProject(prj);
-		antSettings.setProject(prj);
-	}
-
-	public void setRealm(String realm) {
-		antSettings.setRealm(realm);
-	}
-
-	public void setUrl(String confUrl) throws MalformedURLException {
-		antSettings.setUrl(confUrl);
-	}
-
-	public void setUsername(String userName) {
-		antSettings.setUsername(userName);
-	}
+    public void doExecute() throws BuildException {
+        ensureMessageInitialised();
+        log("ivy:configure is deprecated, please use the data type ivy:settings instead",
+            Project.MSG_WARN);
+        // ivyConfigure used to export properties in the ant script.
+        // ivy:settings doesn't.
+        try {
+            loadDefaultProperties();
+        } catch (Exception ex) {
+            throw new BuildException("impossible to load ivy default properties file: " + ex, ex);
+        }
+        antSettings.registerAsDefault();
+    }
+
+    private void loadDefaultProperties() {
+        Property prop = new Property() {
+            public void execute() throws BuildException {
+                Properties props = antSettings.getDefaultProperties();
+                addProperties(props);
+            }
+        };
+        prop.setProject(getProject());
+        prop.execute();
+    }
+
+    public void addConfiguredCredentials(Credentials c) {
+        antSettings.addConfiguredCredentials(c);
+    }
+
+    public void setFile(File file) {
+        antSettings.setFile(file);
+    }
+
+    public void setHost(String host) {
+        antSettings.setHost(host);
+    }
+
+    public void setPasswd(String passwd) {
+        antSettings.setPasswd(passwd);
+    }
+
+    public void setProject(Project prj) {
+        super.setProject(prj);
+        antSettings.setProject(prj);
+    }
+
+    public void setRealm(String realm) {
+        antSettings.setRealm(realm);
+    }
+
+    public void setUrl(String confUrl) throws MalformedURLException {
+        antSettings.setUrl(confUrl);
+    }
+
+    public void setUsername(String userName) {
+        antSettings.setUsername(userName);
+    }
 
 }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyConvertPom.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyConvertPom.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyConvertPom.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyConvertPom.java Tue Jun  5 05:02:27 2007
@@ -28,30 +28,30 @@
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 
-
 /**
  * Convert a pom to an ivy file
- * 
- *
  */
 public class IvyConvertPom extends IvyTask {
     private File _pomFile = null;
+
     private File _ivyFile = null;
-    
+
     public File getPomFile() {
         return _pomFile;
     }
+
     public void setPomFile(File file) {
         _pomFile = file;
     }
+
     public File getIvyFile() {
         return _ivyFile;
     }
+
     public void setIvyFile(File ivyFile) {
         _ivyFile = ivyFile;
     }
-    
-    
+
     public void doExecute() throws BuildException {
         try {
             if (_pomFile == null) {
@@ -60,15 +60,19 @@
             if (_ivyFile == null) {
                 throw new BuildException("destination ivy file is required for convertpom task");
             }
-            ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(), _pomFile.toURL(), false);
-            PomModuleDescriptorParser.getInstance().toIvyFile(_pomFile.toURL().openStream(), new URLResource(_pomFile.toURL()), getIvyFile(), md);
+            ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
+                new IvySettings(), _pomFile.toURL(), false);
+            PomModuleDescriptorParser.getInstance().toIvyFile(_pomFile.toURL().openStream(),
+                new URLResource(_pomFile.toURL()), getIvyFile(), md);
         } catch (MalformedURLException e) {
-            throw new BuildException("unable to convert given pom file to url: "+_pomFile+": "+e, e);
+            throw new BuildException("unable to convert given pom file to url: " + _pomFile + ": "
+                    + e, e);
         } catch (ParseException e) {
             log(e.getMessage(), Project.MSG_ERR);
-            throw new BuildException("syntax errors in pom file "+_pomFile+": "+e, e);
+            throw new BuildException("syntax errors in pom file " + _pomFile + ": " + e, e);
         } catch (Exception e) {
-            throw new BuildException("impossible convert given pom file to ivy file: "+e+" from="+_pomFile+" to="+_ivyFile, e);
+            throw new BuildException("impossible convert given pom file to ivy file: " + e
+                    + " from=" + _pomFile + " to=" + _ivyFile, e);
         }
     }
 }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyDeliver.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyDeliver.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyDeliver.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyDeliver.java Tue Jun  5 05:02:27 2007
@@ -38,42 +38,38 @@
 import org.apache.tools.ant.taskdefs.Input;
 import org.apache.tools.ant.taskdefs.Property;
 
-
 /**
- * Trigger the delivery of a module, which may consist in a recursive delivery of dependencies
- * and on the replacement in the ivy file of dynamic revisions (like latest.integration) by static ones.
- * 
- *
+ * Trigger the delivery of a module, which may consist in a recursive delivery of dependencies and
+ * on the replacement in the ivy file of dynamic revisions (like latest.integration) by static ones.
  */
 public class IvyDeliver extends IvyTask {
     private final class DeliverDRResolver extends DefaultPublishingDRResolver {
-        public String resolve(ModuleDescriptor published,
-                String publishedStatus, ModuleRevisionId depMrid,
-                String depStatus) {
+        public String resolve(ModuleDescriptor published, String publishedStatus,
+                ModuleRevisionId depMrid, String depStatus) {
             if (StatusManager.getCurrent().isIntegration(publishedStatus)) {
                 // published status is integration one, nothing to ask
-                return super.resolve(published, publishedStatus, depMrid,
-                        depStatus);
+                return super.resolve(published, publishedStatus, depMrid, depStatus);
             }
 
             // we are publishing a delivery (a non integration module)
 
             if (!StatusManager.getCurrent().isIntegration(depStatus)) {
                 // dependency is already a delivery, nothing to ask
-                return super.resolve(published, publishedStatus, depMrid,
-                        depStatus);
+                return super.resolve(published, publishedStatus, depMrid, depStatus);
             }
-            
+
             // the dependency is not a delivery
 
-            String statusProperty = depMrid.getName() + "."  + depMrid.getRevision() + ".status";
-            String versionProperty = depMrid.getName() + "."  + depMrid.getRevision() + ".version";
-            String deliveredProperty = depMrid.getName() + "." + depMrid.getRevision() + ".delivered";
-            
+            String statusProperty = depMrid.getName() + "." + depMrid.getRevision() + ".status";
+            String versionProperty = depMrid.getName() + "." + depMrid.getRevision() + ".version";
+            String deliveredProperty = depMrid.getName() + "." + depMrid.getRevision()
+                    + ".delivered";
+
             String version = getProject().getProperty(versionProperty);
             String status = getProject().getProperty(statusProperty);
             String delivered = getProject().getProperty(deliveredProperty);
-            Message.debug("found version = " + version + " status=" + status+" delivered="+delivered);
+            Message.debug("found version = " + version + " status=" + status + " delivered="
+                    + delivered);
             if (version != null && status != null) {
                 if ("true".equals(delivered)) {
                     // delivery has already been done : just return the value
@@ -87,14 +83,11 @@
 
             /**
              * By setting these properties: recursive.delivery.status and
-             * recursive.delivery.version, then if the specific status/version
-             * is not found, then we will use the status/version set in these
-             * global properties. This will apply to all artifacts in the
-             * system.
-             * 
-             * This patch is meant to be used for recursive deliveries so that
-             * all deliveries will use the global status/version unless a more
-             * specific one is set.
+             * recursive.delivery.version, then if the specific status/version is not found, then we
+             * will use the status/version set in these global properties. This will apply to all
+             * artifacts in the system. This patch is meant to be used for recursive deliveries so
+             * that all deliveries will use the global status/version unless a more specific one is
+             * set.
              */
             String globalStatusProperty = "recursive.delivery.status";
             String globalVersionProperty = "recursive.delivery.version";
@@ -102,13 +95,15 @@
             status = getProject().getProperty(globalStatusProperty);
             if (version != null && status != null) {
                 // found global delivery properties
-                delivered = getProject().getProperty("recursive."+depMrid.getName()+ ".delivered");
-                Message.debug("found global version = " + version + " and global status=" + status+" - delivered = "+delivered);
+                delivered = getProject().getProperty(
+                    "recursive." + depMrid.getName() + ".delivered");
+                Message.debug("found global version = " + version + " and global status=" + status
+                        + " - delivered = " + delivered);
                 if ("true".equals(delivered)) {
                     // delivery has already been done : just return the value
                     return version;
                 } else {
-                    getProject().setProperty(statusProperty, status); 
+                    getProject().setProperty(statusProperty, status);
                     deliverDependency(depMrid, version, status, depStatus);
                     loadDeliveryList();
                     return version;
@@ -146,7 +141,8 @@
             return version;
         }
 
-        public void deliverDependency(ModuleRevisionId depMrid, String version, String status, String depStatus) {
+        public void deliverDependency(ModuleRevisionId depMrid, String version, String status,
+                String depStatus) {
             // call deliver target if any
             if (_deliverTarget != null && _deliverTarget.trim().length() > 0) {
 
@@ -170,22 +166,23 @@
                 param.setValue(depMrid.getRevision());
                 param = ct.createParam();
                 param.setName("dependency.status");
-                param.setValue(depStatus==null?"null":depStatus);
+                param.setValue(depStatus == null ? "null" : depStatus);
 
                 MessageImpl impl = IvyContext.getContext().getMessageImpl();
                 try {
-                	IvyContext.getContext().setMessageImpl(null);
-                	ct.perform();
+                    IvyContext.getContext().setMessageImpl(null);
+                    ct.perform();
                 } finally {
-                	IvyContext.getContext().setMessageImpl(impl);
+                    IvyContext.getContext().setMessageImpl(impl);
                 }
-                
-                String deliveredProperty = depMrid.getName() + "." + depMrid.getRevision() + ".delivered";
+
+                String deliveredProperty = depMrid.getName() + "." + depMrid.getRevision()
+                        + ".delivered";
                 getProject().setProperty(deliveredProperty, "true");
                 appendDeliveryList(deliveredProperty + " = true");
 
-                getProject().setProperty("recursive."+depMrid.getName() + ".delivered", "true");
-                appendDeliveryList("recursive."+depMrid.getName() + ".delivered" + " = true");
+                getProject().setProperty("recursive." + depMrid.getName() + ".delivered", "true");
+                appendDeliveryList("recursive." + depMrid.getName() + ".delivered" + " = true");
             }
         }
 
@@ -212,9 +209,9 @@
     private File _deliveryList;
 
     private boolean _replacedynamicrev = true;
-    
+
     private String _resolveId;
-    
+
     private String _conf;
 
     public File getCache() {
@@ -296,27 +293,27 @@
     public void setReplacedynamicrev(boolean replacedynamicrev) {
         _replacedynamicrev = replacedynamicrev;
     }
-    
+
     public String getResolveId() {
-    	return _resolveId;
+        return _resolveId;
     }
-    
+
     public void setResolveId(String resolveId) {
-    	_resolveId = resolveId;
+        _resolveId = resolveId;
     }
-    
+
     public String getConf() {
-    	return _conf;
+        return _conf;
     }
-    
+
     public void setConf(String confs) {
-    	_conf = confs;
+        _conf = confs;
     }
 
     public void doExecute() throws BuildException {
-    	Ivy ivy = getIvyInstance();
+        Ivy ivy = getIvyInstance();
         IvySettings settings = ivy.getSettings();
-        
+
         _organisation = getProperty(_organisation, settings, "ivy.organisation", _resolveId);
         _module = getProperty(_module, settings, "ivy.module", _resolveId);
         _revision = getProperty(_revision, settings, "ivy.revision", _resolveId);
@@ -324,8 +321,7 @@
         if (_cache == null) {
             _cache = settings.getDefaultCache();
         }
-        _deliverpattern = getProperty(_deliverpattern, settings,
-                "ivy.deliver.ivy.pattern");
+        _deliverpattern = getProperty(_deliverpattern, settings, "ivy.deliver.ivy.pattern");
         _status = getProperty(_status, settings, "ivy.status");
         if (_deliveryList == null) {
             String deliveryListPath = getProperty(settings, "ivy.delivery.list.file");
@@ -333,19 +329,18 @@
                 _deliveryList = new File(System.getProperty("java.io.tmpdir")
                         + "/delivery.properties");
             } else {
-                _deliveryList = getProject().resolveFile(
-                        settings.substitute(deliveryListPath));
+                _deliveryList = getProject().resolveFile(settings.substitute(deliveryListPath));
             }
         }
         if (_resolveId == null) {
-	        if (_organisation == null) {
-	            throw new BuildException(
-	                    "no organisation provided for ivy deliver task: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
-	        }
-	        if (_module == null) {
-	            throw new BuildException(
-	                    "no module name provided for ivy deliver task: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>");
-	        }
+            if (_organisation == null) {
+                throw new BuildException(
+                        "no organisation provided for ivy deliver task: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
+            }
+            if (_module == null) {
+                throw new BuildException(
+                        "no module name provided for ivy deliver task: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>");
+            }
         }
         if (_revision == null) {
             _revision = Ivy.getWorkingRevision();
@@ -366,10 +361,10 @@
             throw new BuildException(
                     "no status provided: either provide it as parameter or through the ivy.status.default property");
         }
-        
+
         ModuleRevisionId mrid = null;
         if (_resolveId == null) {
-        	mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision);
+            mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision);
         }
         boolean isLeading = false;
         try {
@@ -385,17 +380,18 @@
             } else {
                 drResolver = new DefaultPublishingDRResolver();
             }
-            
-            DeliverOptions options = new DeliverOptions(_status, pubdate, 
-    				CacheManager.getInstance(settings, _cache), 
-    				drResolver, doValidate(settings), _replacedynamicrev, splitConfs(_conf)).setResolveId(_resolveId);
+
+            DeliverOptions options = new DeliverOptions(_status, pubdate, CacheManager.getInstance(
+                settings, _cache), drResolver, doValidate(settings), _replacedynamicrev,
+                    splitConfs(_conf)).setResolveId(_resolveId);
             if (mrid == null) {
-            	ivy.deliver(_pubRevision, _deliverpattern, options);
+                ivy.deliver(_pubRevision, _deliverpattern, options);
             } else {
-            	ivy.deliver(mrid, _pubRevision, _deliverpattern, options);
+                ivy.deliver(mrid, _pubRevision, _deliverpattern, options);
             }
         } catch (Exception e) {
-            throw new BuildException("impossible to deliver " + mrid == null ? _resolveId : mrid + ": " + e, e);
+            throw new BuildException("impossible to deliver " + mrid == null ? _resolveId : mrid
+                    + ": " + e, e);
         } finally {
             if (isLeading) {
                 if (_deliveryList.exists()) {

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyExtractFromSources.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyExtractFromSources.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyExtractFromSources.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyExtractFromSources.java Tue Jun  5 05:02:27 2007
@@ -42,72 +42,90 @@
 import org.apache.tools.ant.types.FilterChain;
 import org.apache.tools.ant.types.RegularExpression;
 
-
 /**
- * Extracts imports from a set of java sources and generate corresponding
- * ivy file
- * 
- *
+ * Extracts imports from a set of java sources and generate corresponding ivy file
  */
 public class IvyExtractFromSources extends IvyTask {
     public static class Ignore {
         String _package;
+
         public String getPackage() {
             return _package;
         }
+
         public void setPackage(String package1) {
             _package = package1;
         }
     }
-    private String  _organisation;
-    private String  _module;
-    private String  _revision;
-    private String  _status;
-    private List    _ignoredPackaged = new ArrayList(); // List (String package)
-    private Map		_mapping = new HashMap(); // Map (String package -> ModuleRevisionId)
-    private Concat  _concat = new Concat();
-    private File    _to;
-    
+
+    private String _organisation;
+
+    private String _module;
+
+    private String _revision;
+
+    private String _status;
+
+    private List _ignoredPackaged = new ArrayList(); // List (String package)
+
+    private Map _mapping = new HashMap(); // Map (String package -> ModuleRevisionId)
+
+    private Concat _concat = new Concat();
+
+    private File _to;
+
     public void addConfiguredIgnore(Ignore ignore) {
         _ignoredPackaged.add(ignore.getPackage());
     }
+
     public File getTo() {
         return _to;
     }
+
     public void setTo(File to) {
         _to = to;
     }
+
     public String getModule() {
         return _module;
     }
+
     public void setModule(String module) {
         _module = module;
     }
+
     public String getOrganisation() {
         return _organisation;
     }
+
     public void setOrganisation(String organisation) {
         _organisation = organisation;
     }
+
     public String getRevision() {
         return _revision;
     }
+
     public void setRevision(String revision) {
         _revision = revision;
     }
+
     public String getStatus() {
         return _status;
     }
+
     public void setStatus(String status) {
         _status = status;
     }
+
     public void addConfiguredMapping(PackageMapping mapping) {
         _mapping.put(mapping.getPackage(), mapping.getModuleRevisionId());
     }
+
     public void addFileSet(FileSet fileSet) {
         _concat.addFileset(fileSet);
     }
-    
+
     public void doExecute() throws BuildException {
         configureConcat();
         Writer out = new StringWriter();
@@ -116,7 +134,7 @@
         Set importsSet = new HashSet(Arrays.asList(out.toString().split("\n")));
         Set dependencies = new HashSet();
         for (Iterator iter = importsSet.iterator(); iter.hasNext();) {
-            String pack = ((String)iter.next()).trim();
+            String pack = ((String) iter.next()).trim();
             ModuleRevisionId mrid = getMapping(pack);
             if (mrid != null) {
                 dependencies.add(mrid);
@@ -125,13 +143,13 @@
         try {
             PrintWriter writer = new PrintWriter(new FileOutputStream(_to));
             writer.println("<ivy-module version=\"1.0\">");
-            writer.println("\t<info organisation=\""+_organisation+"\"");
-            writer.println("\t       module=\""+_module+"\"");
+            writer.println("\t<info organisation=\"" + _organisation + "\"");
+            writer.println("\t       module=\"" + _module + "\"");
             if (_revision != null) {
-                writer.println("\t       revision=\""+_revision+"\"");
+                writer.println("\t       revision=\"" + _revision + "\"");
             }
             if (_status != null) {
-                writer.println("\t       status=\""+_status+"\"");
+                writer.println("\t       status=\"" + _status + "\"");
             } else {
                 writer.println("\t       status=\"integration\"");
             }
@@ -139,19 +157,20 @@
             if (!dependencies.isEmpty()) {
                 writer.println("\t<dependencies>");
                 for (Iterator iter = dependencies.iterator(); iter.hasNext();) {
-                    ModuleRevisionId mrid = (ModuleRevisionId)iter.next();
-                    writer.println("\t\t<dependency org=\""+mrid.getOrganisation()+"\" name=\""+mrid.getName()+"\" rev=\""+mrid.getRevision()+"\"/>");
+                    ModuleRevisionId mrid = (ModuleRevisionId) iter.next();
+                    writer.println("\t\t<dependency org=\"" + mrid.getOrganisation() + "\" name=\""
+                            + mrid.getName() + "\" rev=\"" + mrid.getRevision() + "\"/>");
                 }
                 writer.println("\t</dependencies>");
             }
             writer.println("</ivy-module>");
             writer.close();
-            log(dependencies.size()+" dependencies put in "+_to);
+            log(dependencies.size() + " dependencies put in " + _to);
         } catch (FileNotFoundException e) {
-            throw new BuildException("impossible to create file "+_to+": "+e, e); 
+            throw new BuildException("impossible to create file " + _to + ": " + e, e);
         }
     }
-    
+
     /**
      * @param pack
      * @return
@@ -163,7 +182,7 @@
             if (_ignoredPackaged.contains(pack)) {
                 return null;
             }
-            ret = (ModuleRevisionId)_mapping.get(pack);
+            ret = (ModuleRevisionId) _mapping.get(pack);
             int lastDotIndex = pack.lastIndexOf('.');
             if (lastDotIndex != -1) {
                 pack = pack.substring(0, lastDotIndex);
@@ -172,10 +191,11 @@
             }
         }
         if (ret == null) {
-            log("no mapping found for "+askedPack, Project.MSG_VERBOSE);            
+            log("no mapping found for " + askedPack, Project.MSG_VERBOSE);
         }
         return ret;
     }
+
     private void configureConcat() {
         _concat.setProject(getProject());
         _concat.setTaskName(getTaskName());

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyFindRevision.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyFindRevision.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyFindRevision.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyFindRevision.java Tue Jun  5 05:02:27 2007
@@ -24,63 +24,62 @@
 import org.apache.ivy.core.settings.IvySettings;
 import org.apache.tools.ant.BuildException;
 
-
 /**
- * Look for the latest module in the repository matching the given criteria, 
- * and sets a set of properties according to what was found.
- * 
+ * Look for the latest module in the repository matching the given criteria, and sets a set of
+ * properties according to what was found.
  */
 public class IvyFindRevision extends IvyTask {
-	private String _organisation;
-	private String _module;
-	private String _branch;
-	private String _revision;
-	
-	private String _property = "ivy.revision";
-	
-	public String getModule() {
-		return _module;
-	}
-
-	public void setModule(String module) {
-		_module = module;
-	}
-
-	public String getOrganisation() {
-		return _organisation;
-	}
-
-	public void setOrganisation(String organisation) {
-		_organisation = organisation;
-	}
-
-	public String getRevision() {
-		return _revision;
-	}
-
-	public void setRevision(String revision) {
-		_revision = revision;
-	}
-
-
-	public String getBranch() {
-		return _branch;
-	}
-
-	public void setBranch(String branch) {
-		_branch = branch;
-	}
-
-	public String getProperty() {
-		return _property;
-	}
-
-	public void setProperty(String prefix) {
-		_property = prefix;
-	}
+    private String _organisation;
+
+    private String _module;
+
+    private String _branch;
+
+    private String _revision;
+
+    private String _property = "ivy.revision";
+
+    public String getModule() {
+        return _module;
+    }
+
+    public void setModule(String module) {
+        _module = module;
+    }
+
+    public String getOrganisation() {
+        return _organisation;
+    }
 
+    public void setOrganisation(String organisation) {
+        _organisation = organisation;
+    }
 
-	public void doExecute() throws BuildException {
+    public String getRevision() {
+        return _revision;
+    }
+
+    public void setRevision(String revision) {
+        _revision = revision;
+    }
+
+    public String getBranch() {
+        return _branch;
+    }
+
+    public void setBranch(String branch) {
+        _branch = branch;
+    }
+
+    public String getProperty() {
+        return _property;
+    }
+
+    public void setProperty(String prefix) {
+        _property = prefix;
+    }
+
+    public void doExecute() throws BuildException {
         if (_organisation == null) {
             throw new BuildException("no organisation provided for ivy findmodules");
         }
@@ -90,15 +89,16 @@
         if (_revision == null) {
             throw new BuildException("no revision provided for ivy findmodules");
         }
-        
+
         Ivy ivy = getIvyInstance();
         IvySettings settings = ivy.getSettings();
         if (_branch == null) {
             settings.getDefaultBranch(new ModuleId(_organisation, _module));
         }
-		ResolvedModuleRevision rmr = ivy.findModule(ModuleRevisionId.newInstance(_organisation, _module, _branch, _revision));
-		if (rmr != null) {
-			getProject().setProperty(_property, rmr.getId().getRevision());
-		}
-	}
+        ResolvedModuleRevision rmr = ivy.findModule(ModuleRevisionId.newInstance(_organisation,
+            _module, _branch, _revision));
+        if (rmr != null) {
+            getProject().setProperty(_property, rmr.getId().getRevision());
+        }
+    }
 }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInfo.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInfo.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInfo.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInfo.java Tue Jun  5 05:02:27 2007
@@ -32,18 +32,16 @@
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 
-
 /**
  * Parses information about an ivy file and make them available in ant.
- * 
- *
  */
 public class IvyInfo extends IvyTask {
     private File _file = null;
-    
+
     public File getFile() {
         return _file;
     }
+
     public void setFile(File file) {
         _file = file;
     }
@@ -54,31 +52,35 @@
         if (_file == null) {
             _file = getProject().resolveFile(getProperty(settings, "ivy.dep.file"));
         }
-        
+
         try {
-			ModuleDescriptor md = ModuleDescriptorParserRegistry.getInstance().parseDescriptor(settings, _file.toURL(), doValidate(settings));
-            getProject().setProperty("ivy.organisation", md.getModuleRevisionId().getOrganisation());
+            ModuleDescriptor md = ModuleDescriptorParserRegistry.getInstance().parseDescriptor(
+                settings, _file.toURL(), doValidate(settings));
+            getProject()
+                    .setProperty("ivy.organisation", md.getModuleRevisionId().getOrganisation());
             getProject().setProperty("ivy.module", md.getModuleRevisionId().getName());
             getProject().setProperty("ivy.revision", md.getModuleRevisionId().getRevision());
             getProject().setProperty("ivy.configurations", mergeConfs(md.getConfigurationsNames()));
-            
+
             // store the public configurations in a separate property
             Configuration[] configs = md.getConfigurations();
             List publicConfigsList = new ArrayList();
             for (int i = 0; i < configs.length; i++) {
-            	if (Visibility.PUBLIC.equals(configs[i].getVisibility())) {
-            		publicConfigsList.add(configs[i].getName());
-            	}
+                if (Visibility.PUBLIC.equals(configs[i].getVisibility())) {
+                    publicConfigsList.add(configs[i].getName());
+                }
             }
-            String[] publicConfigs = (String[]) publicConfigsList.toArray(new String[publicConfigsList.size()]);
+            String[] publicConfigs = (String[]) publicConfigsList
+                    .toArray(new String[publicConfigsList.size()]);
             getProject().setProperty("ivy.public.configurations", mergeConfs(publicConfigs));
         } catch (MalformedURLException e) {
-            throw new BuildException("unable to convert given ivy file to url: "+_file+": "+e, e);
+            throw new BuildException(
+                    "unable to convert given ivy file to url: " + _file + ": " + e, e);
         } catch (ParseException e) {
             log(e.getMessage(), Project.MSG_ERR);
-            throw new BuildException("syntax errors in ivy file: "+e, e);
+            throw new BuildException("syntax errors in ivy file: " + e, e);
         } catch (Exception e) {
-            throw new BuildException("impossible to resolve dependencies: "+e, e);
+            throw new BuildException("impossible to resolve dependencies: " + e, e);
         }
     }
 }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInstall.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInstall.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInstall.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInstall.java Tue Jun  5 05:02:27 2007
@@ -29,23 +29,30 @@
 
 /**
  * Allow to install a module or a set of module from repository to another one.
- *
- *
- *
  */
 public class IvyInstall extends IvyTask {
-    private String  _organisation;
-    private String  _module;
-    private String  _revision;
-    private File 	_cache;
+    private String _organisation;
+
+    private String _module;
+
+    private String _revision;
+
+    private File _cache;
+
     private boolean _overwrite = false;
+
     private String _from;
+
     private String _to;
+
     private boolean _transitive;
+
     private String _type;
+
     private String _matcher = PatternMatcher.EXACT;
+
     private boolean _haltOnFailure = true;
-    
+
     public void doExecute() throws BuildException {
         Ivy ivy = getIvyInstance();
         IvySettings settings = ivy.getSettings();
@@ -53,104 +60,128 @@
             _cache = settings.getDefaultCache();
         }
         if (_organisation == null) {
-            throw new BuildException("no organisation provided for ivy publish task: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
+            throw new BuildException(
+                    "no organisation provided for ivy publish task: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
         }
         if (_module == null && PatternMatcher.EXACT.equals(_matcher)) {
-            throw new BuildException("no module name provided for ivy publish task: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>");
+            throw new BuildException(
+                    "no module name provided for ivy publish task: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>");
         } else if (_module == null && !PatternMatcher.EXACT.equals(_matcher)) {
             _module = PatternMatcher.ANY_EXPRESSION;
         }
         if (_revision == null && PatternMatcher.EXACT.equals(_matcher)) {
-            throw new BuildException("no module revision provided for ivy publish task: It can either be set explicitely via the attribute 'revision' or via 'ivy.revision' property or a prior call to <resolve/>");
+            throw new BuildException(
+                    "no module revision provided for ivy publish task: It can either be set explicitely via the attribute 'revision' or via 'ivy.revision' property or a prior call to <resolve/>");
         } else if (_revision == null && !PatternMatcher.EXACT.equals(_matcher)) {
             _revision = PatternMatcher.ANY_EXPRESSION;
         }
         if (_from == null) {
-            throw new BuildException("no from resolver name: please provide it through parameter 'from'");
+            throw new BuildException(
+                    "no from resolver name: please provide it through parameter 'from'");
         }
         if (_to == null) {
-            throw new BuildException("no to resolver name: please provide it through parameter 'to'");
+            throw new BuildException(
+                    "no to resolver name: please provide it through parameter 'to'");
         }
         ModuleRevisionId mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision);
         ResolveReport report;
         try {
-            report = ivy.install(mrid, _from, _to, _transitive, doValidate(settings), _overwrite, FilterHelper.getArtifactTypeFilter(_type), _cache, _matcher);
+            report = ivy.install(mrid, _from, _to, _transitive, doValidate(settings), _overwrite,
+                FilterHelper.getArtifactTypeFilter(_type), _cache, _matcher);
         } catch (Exception e) {
-            throw new BuildException("impossible to install "+ mrid +": "+e, e);
+            throw new BuildException("impossible to install " + mrid + ": " + e, e);
         }
-        
+
         if (report.hasError() && isHaltonfailure()) {
-            throw new BuildException("Problem happened while installing modules - see output for details");
+            throw new BuildException(
+                    "Problem happened while installing modules - see output for details");
         }
     }
-    
+
     public boolean isHaltonfailure() {
         return _haltOnFailure;
     }
+
     public void setHaltonfailure(boolean haltOnFailure) {
         _haltOnFailure = haltOnFailure;
     }
-    
+
     public File getCache() {
         return _cache;
     }
+
     public void setCache(File cache) {
         _cache = cache;
     }
+
     public String getModule() {
         return _module;
     }
+
     public void setModule(String module) {
         _module = module;
     }
+
     public String getOrganisation() {
         return _organisation;
     }
+
     public void setOrganisation(String organisation) {
         _organisation = organisation;
     }
+
     public String getRevision() {
         return _revision;
     }
+
     public void setRevision(String revision) {
         _revision = revision;
     }
-    
+
     public boolean isOverwrite() {
         return _overwrite;
     }
+
     public void setOverwrite(boolean overwrite) {
         _overwrite = overwrite;
     }
+
     public String getFrom() {
         return _from;
     }
+
     public void setFrom(String from) {
         _from = from;
     }
+
     public String getTo() {
         return _to;
     }
+
     public void setTo(String to) {
         _to = to;
     }
+
     public boolean isTransitive() {
         return _transitive;
     }
+
     public void setTransitive(boolean transitive) {
         _transitive = transitive;
     }
+
     public String getType() {
         return _type;
     }
+
     public void setType(String type) {
         _type = type;
     }
-    
+
     public String getMatcher() {
         return _matcher;
     }
-    
+
     public void setMatcher(String matcher) {
         _matcher = matcher;
     }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyListModules.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyListModules.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyListModules.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyListModules.java Tue Jun  5 05:02:27 2007
@@ -24,79 +24,82 @@
 import org.apache.ivy.plugins.matcher.PatternMatcher;
 import org.apache.tools.ant.BuildException;
 
-
 /**
  * Look for modules in the repository matching the given criteria, and sets a set of properties
  * according to what was found.
- * 
  */
 public class IvyListModules extends IvyTask {
-	private String _organisation;
-	private String _module;
-	private String _branch = PatternMatcher.ANY_EXPRESSION;
-	private String _revision;
-	private String _matcher = PatternMatcher.EXACT_OR_REGEXP;
-	
-	private String _property;
-	private String _value;
-	
-	public String getMatcher() {
-		return _matcher;
-	}
-
-	public void setMatcher(String matcher) {
-		_matcher = matcher;
-	}
-
-	public String getModule() {
-		return _module;
-	}
-
-	public void setModule(String module) {
-		_module = module;
-	}
-
-	public String getProperty() {
-		return _property;
-	}
-
-	public void setProperty(String name) {
-		_property = name;
-	}
-
-	public String getOrganisation() {
-		return _organisation;
-	}
-
-	public void setOrganisation(String organisation) {
-		_organisation = organisation;
-	}
-
-	public String getRevision() {
-		return _revision;
-	}
-
-	public void setRevision(String revision) {
-		_revision = revision;
-	}
-
-	public String getValue() {
-		return _value;
-	}
-
-	public void setValue(String value) {
-		_value = value;
-	}
-
-	public String getBranch() {
-		return _branch;
-	}
-
-	public void setBranch(String branch) {
-		_branch = branch;
-	}
+    private String _organisation;
+
+    private String _module;
+
+    private String _branch = PatternMatcher.ANY_EXPRESSION;
+
+    private String _revision;
+
+    private String _matcher = PatternMatcher.EXACT_OR_REGEXP;
+
+    private String _property;
+
+    private String _value;
+
+    public String getMatcher() {
+        return _matcher;
+    }
+
+    public void setMatcher(String matcher) {
+        _matcher = matcher;
+    }
+
+    public String getModule() {
+        return _module;
+    }
+
+    public void setModule(String module) {
+        _module = module;
+    }
 
-	public void doExecute() throws BuildException {
+    public String getProperty() {
+        return _property;
+    }
+
+    public void setProperty(String name) {
+        _property = name;
+    }
+
+    public String getOrganisation() {
+        return _organisation;
+    }
+
+    public void setOrganisation(String organisation) {
+        _organisation = organisation;
+    }
+
+    public String getRevision() {
+        return _revision;
+    }
+
+    public void setRevision(String revision) {
+        _revision = revision;
+    }
+
+    public String getValue() {
+        return _value;
+    }
+
+    public void setValue(String value) {
+        _value = value;
+    }
+
+    public String getBranch() {
+        return _branch;
+    }
+
+    public void setBranch(String branch) {
+        _branch = branch;
+    }
+
+    public void doExecute() throws BuildException {
         if (_organisation == null) {
             throw new BuildException("no organisation provided for ivy findmodules");
         }
@@ -112,13 +115,14 @@
         if (_value == null) {
             throw new BuildException("no value provided for ivy findmodules");
         }
-		Ivy ivy = getIvyInstance();
+        Ivy ivy = getIvyInstance();
         IvySettings settings = ivy.getSettings();
-		ModuleRevisionId[] mrids = ivy.listModules(ModuleRevisionId.newInstance(_organisation, _module, _branch, _revision), settings.getMatcher(_matcher));
-		for (int i = 0; i < mrids.length; i++) {
+        ModuleRevisionId[] mrids = ivy.listModules(ModuleRevisionId.newInstance(_organisation,
+            _module, _branch, _revision), settings.getMatcher(_matcher));
+        for (int i = 0; i < mrids.length; i++) {
             String name = IvyPatternHelper.substitute(settings.substitute(_property), mrids[i]);
             String value = IvyPatternHelper.substitute(settings.substitute(_value), mrids[i]);
             getProject().setProperty(name, value);
-		}
-	}
+        }
+    }
 }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPostResolveTask.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPostResolveTask.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPostResolveTask.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPostResolveTask.java Tue Jun  5 05:02:27 2007
@@ -33,310 +33,339 @@
 import org.apache.ivy.util.filter.FilterHelper;
 import org.apache.tools.ant.BuildException;
 
-
 /**
- * Base class for tasks needing to be performed after a resolve. 
- * 
- * 
- *
+ * Base class for tasks needing to be performed after a resolve.
  */
 public abstract class IvyPostResolveTask extends IvyTask {
     private String _conf;
+
     private boolean _haltOnFailure = true;
+
     private boolean _transitive = true;
+
     private boolean _inline = false;
+
     private File _cache;
 
     private String _organisation;
+
     private String _module;
+
     private String _revision = "latest.integration";
+
     private String _resolveId;
 
     private String _type;
+
     private File _file;
-    
+
     private Filter _artifactFilter = null;
+
     private boolean useOrigin = false;
-    
+
     private Boolean keep = null;
-    
+
     public boolean isUseOrigin() {
-    	return useOrigin;
+        return useOrigin;
     }
-    
+
     public void setUseOrigin(boolean useOrigin) {
-    	this.useOrigin = useOrigin;
+        this.useOrigin = useOrigin;
     }
-    
+
     protected void prepareAndCheck() {
         Ivy ivy = getIvyInstance();
         IvySettings settings = ivy.getSettings();
-        
+
         boolean orgAndModSetManually = (_organisation != null) && (_module != null);
-        
+
         _organisation = getProperty(_organisation, settings, "ivy.organisation");
         _module = getProperty(_module, settings, "ivy.module");
-        
+
         if (_cache == null) {
             _cache = settings.getDefaultCache();
         }
-        
+
         if (_file == null) {
-        	String fileName = getProperty(settings, "ivy.resolved.file", _resolveId);
-        	if (fileName != null) {
-        		_file = new File(fileName);
-        	}
+            String fileName = getProperty(settings, "ivy.resolved.file", _resolveId);
+            if (fileName != null) {
+                _file = new File(fileName);
+            }
         }
 
         if (isInline()) {
-        	_conf = _conf == null ? "*" : _conf;
+            _conf = _conf == null ? "*" : _conf;
             if (_organisation == null) {
-                throw new BuildException("no organisation provided for ivy cache task in inline mode: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property");
+                throw new BuildException(
+                        "no organisation provided for ivy cache task in inline mode: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property");
             }
             if (_module == null) {
-                throw new BuildException("no module name provided for ivy cache task in inline mode: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property");
+                throw new BuildException(
+                        "no module name provided for ivy cache task in inline mode: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property");
+            }
+            String[] toResolve = getConfsToResolve(getOrganisation(), getModule() + "-caller",
+                _conf, true);
+            if (toResolve.length > 0) {
+                Message.verbose("using inline mode to resolve " + getOrganisation() + " "
+                        + getModule() + " " + getRevision() + " ("
+                        + StringUtils.join(toResolve, ", ") + ")");
+                IvyResolve resolve = createResolve(isHaltonfailure(), isUseOrigin());
+                resolve.setOrganisation(getOrganisation());
+                resolve.setModule(getModule());
+                resolve.setRevision(getRevision());
+                resolve.setInline(true);
+                resolve.setConf(_conf);
+                resolve.setCache(_cache);
+                resolve.setResolveId(_resolveId);
+                resolve.execute();
+            } else {
+                Message.verbose("inline resolve already done for " + getOrganisation() + " "
+                        + getModule() + " " + getRevision() + " (" + _conf + ")");
+            }
+            if ("*".equals(_conf)) {
+                _conf = StringUtils.join(getResolvedConfigurations(getOrganisation(), getModule()
+                        + "-caller", true), ", ");
+            }
+        } else {
+            Message.debug("using standard ensure resolved");
+
+            // if the organization and module has been manually specified, we'll reuse the resolved
+            // data from another build (there is no way to know which configurations were resolved
+            // there (TODO: maybe we can check which reports exist and extract the configurations
+            // from these report names?)
+            if (!orgAndModSetManually) {
+                ensureResolved(isHaltonfailure(), isUseOrigin(), isTransitive(), getOrganisation(),
+                    getModule(), getProperty(_conf, settings, "ivy.resolved.configurations"),
+                    _resolveId, _cache);
+            }
+
+            _conf = getProperty(_conf, settings, "ivy.resolved.configurations");
+            if ("*".equals(_conf)) {
+                _conf = getProperty(settings, "ivy.resolved.configurations");
+                if (_conf == null) {
+                    throw new BuildException(
+                            "bad conf provided for ivy cache task: * can only be used with a prior call to <resolve/>");
+                }
             }
-        	String[] toResolve = getConfsToResolve(getOrganisation(), getModule()+"-caller", _conf, true);
-        	if (toResolve.length > 0) {        		
-        		Message.verbose("using inline mode to resolve "+getOrganisation()+" "+getModule()+" "+getRevision()+" ("+StringUtils.join(toResolve, ", ")+")");
-        		IvyResolve resolve = createResolve(isHaltonfailure(), isUseOrigin());
-        		resolve.setOrganisation(getOrganisation());
-        		resolve.setModule(getModule());
-        		resolve.setRevision(getRevision());
-        		resolve.setInline(true);
-        		resolve.setConf(_conf);
-        		resolve.setCache(_cache);
-        		resolve.setResolveId(_resolveId);
-        		resolve.execute();
-        	} else {
-        		Message.verbose("inline resolve already done for "+getOrganisation()+" "+getModule()+" "+getRevision()+" ("+_conf+")");
-        	}
-        	if ("*".equals(_conf)) {
-        		_conf = StringUtils.join(getResolvedConfigurations(getOrganisation(), getModule()+"-caller", true), ", ");
-        	}
-        } else {        
-        	Message.debug("using standard ensure resolved");
-        	
-        	// if the organization and module has been manually specified, we'll reuse the resolved
-        	// data from another build (there is no way to know which configurations were resolved
-        	// there (TODO: maybe we can check which reports exist and extract the configurations
-        	// from these report names?)
-        	if (!orgAndModSetManually) {
-        		ensureResolved(isHaltonfailure(), isUseOrigin(), isTransitive(), getOrganisation(), getModule(), getProperty(_conf, settings, "ivy.resolved.configurations"), _resolveId, _cache);
-        	}
-        	
-	        _conf = getProperty(_conf, settings, "ivy.resolved.configurations");
-	        if ("*".equals(_conf)) {
-	            _conf = getProperty(settings, "ivy.resolved.configurations");
-	            if (_conf == null) {
-	                throw new BuildException("bad conf provided for ivy cache task: * can only be used with a prior call to <resolve/>");
-	            }
-	        }
         }
         _organisation = getProperty(_organisation, settings, "ivy.organisation");
         _module = getProperty(_module, settings, "ivy.module");
         if (_organisation == null) {
-            throw new BuildException("no organisation provided for ivy cache task: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
+            throw new BuildException(
+                    "no organisation provided for ivy cache task: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
         }
         if (_module == null) {
-            throw new BuildException("no module name provided for ivy cache task: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>");
+            throw new BuildException(
+                    "no module name provided for ivy cache task: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>");
         }
         if (_conf == null) {
-            throw new BuildException("no conf provided for ivy cache task: It can either be set explicitely via the attribute 'conf' or via 'ivy.resolved.configurations' property or a prior call to <resolve/>");
+            throw new BuildException(
+                    "no conf provided for ivy cache task: It can either be set explicitely via the attribute 'conf' or via 'ivy.resolved.configurations' property or a prior call to <resolve/>");
         }
-        
+
         _artifactFilter = FilterHelper.getArtifactTypeFilter(_type);
     }
 
-    protected void ensureResolved(boolean haltOnFailure, boolean useOrigin, boolean transitive, String org, String module, String conf, String resolveId, File cache) {
+    protected void ensureResolved(boolean haltOnFailure, boolean useOrigin, boolean transitive,
+            String org, String module, String conf, String resolveId, File cache) {
         ensureMessageInitialised();
-        
+
         String[] confs = null;
         if (resolveId != null) {
-        	confs = getConfsToResolve(resolveId, conf);
+            confs = getConfsToResolve(resolveId, conf);
         } else {
-        	confs = getConfsToResolve(org, module, conf, false);
+            confs = getConfsToResolve(org, module, conf, false);
+        }
+
+        if (confs.length > 0) {
+            IvyResolve resolve = createResolve(haltOnFailure, useOrigin);
+            resolve.setFile(_file);
+            resolve.setCache(cache);
+            resolve.setTransitive(transitive);
+            resolve.setConf(StringUtils.join(confs, ", "));
+            resolve.setResolveId(resolveId);
+            resolve.execute();
         }
-        
-        if (confs.length > 0)  {
-        	IvyResolve resolve = createResolve(haltOnFailure, useOrigin);
-    		resolve.setFile(_file);
-        	resolve.setCache(cache);
-        	resolve.setTransitive(transitive);
-        	resolve.setConf(StringUtils.join(confs, ", "));
-        	resolve.setResolveId(resolveId);
-        	resolve.execute();
-        } 
     }
-    
+
     protected String[] getConfsToResolve(String org, String module, String conf, boolean strict) {
         ModuleDescriptor reference = (ModuleDescriptor) getResolvedDescriptor(org, module, strict);
         String[] rconfs = getResolvedConfigurations(org, module, strict);
         return getConfsToResolve(reference, conf, rconfs);
     }
-    
+
     protected String[] getConfsToResolve(String resolveId, String conf) {
         ModuleDescriptor reference = (ModuleDescriptor) getResolvedDescriptor(resolveId, false);
         if (reference == null) {
-        	// assume the module has been resolved outside this build, resolve the required
-        	// configurations again
-        	// TODO: find a way to discover which confs were resolved by that previous resolve
-        	if (conf == null) {
-        		return new String[] {"*"};
-        	} else {
-        		return splitConfs(conf);
-        	}
+            // assume the module has been resolved outside this build, resolve the required
+            // configurations again
+            // TODO: find a way to discover which confs were resolved by that previous resolve
+            if (conf == null) {
+                return new String[] {"*"};
+            } else {
+                return splitConfs(conf);
+            }
         }
-        String[] rconfs = (String[]) getProject().getReference("ivy.resolved.configurations.ref." + resolveId);
+        String[] rconfs = (String[]) getProject().getReference(
+            "ivy.resolved.configurations.ref." + resolveId);
         return getConfsToResolve(reference, conf, rconfs);
     }
 
     private String[] getConfsToResolve(ModuleDescriptor reference, String conf, String[] rconfs) {
-		Message.debug("calculating configurations to resolve");
-        
-        if (reference == null)  {
-    		Message.debug("module not yet resolved, all confs still need to be resolved");
-        	if (conf == null) {
-        		return new String[] {"*"};
-        	} else {
-        		return splitConfs(conf);
-        	}
+        Message.debug("calculating configurations to resolve");
+
+        if (reference == null) {
+            Message.debug("module not yet resolved, all confs still need to be resolved");
+            if (conf == null) {
+                return new String[] {"*"};
+            } else {
+                return splitConfs(conf);
+            }
         } else if (conf != null) {
-        	String[] confs;
-        	if ("*".equals(conf)) {
-        		confs = reference.getConfigurationsNames();
-        	} else {
-        		confs = splitConfs(conf);
-        	}
-    		HashSet rconfsSet = new HashSet(Arrays.asList(rconfs));
-			HashSet confsSet = new HashSet(Arrays.asList(confs));
-			Message.debug("resolved configurations:   "+rconfsSet);
-			Message.debug("asked configurations:      "+confsSet);
-			confsSet.removeAll(rconfsSet);
-			Message.debug("to resolve configurations: "+confsSet);
-			return (String[]) confsSet.toArray(new String[confsSet.size()]);
+            String[] confs;
+            if ("*".equals(conf)) {
+                confs = reference.getConfigurationsNames();
+            } else {
+                confs = splitConfs(conf);
+            }
+            HashSet rconfsSet = new HashSet(Arrays.asList(rconfs));
+            HashSet confsSet = new HashSet(Arrays.asList(confs));
+            Message.debug("resolved configurations:   " + rconfsSet);
+            Message.debug("asked configurations:      " + confsSet);
+            confsSet.removeAll(rconfsSet);
+            Message.debug("to resolve configurations: " + confsSet);
+            return (String[]) confsSet.toArray(new String[confsSet.size()]);
         } else {
-    		Message.debug("module already resolved, no configuration to resolve");
-        	return new String[0];
+            Message.debug("module already resolved, no configuration to resolve");
+            return new String[0];
         }
-    	
+
     }
 
     protected IvyResolve createResolve(boolean haltOnFailure, boolean useOrigin) {
-		Message.verbose("no resolved descriptor found: launching default resolve");
-		IvyResolve resolve = new IvyResolve();
-		resolve.setProject(getProject());
-		resolve.setHaltonfailure(haltOnFailure);
-		resolve.setUseOrigin(useOrigin);
-		resolve.setValidate(isValidate());
-		resolve.setKeep(isKeep());
-		return resolve;
-	}
+        Message.verbose("no resolved descriptor found: launching default resolve");
+        IvyResolve resolve = new IvyResolve();
+        resolve.setProject(getProject());
+        resolve.setHaltonfailure(haltOnFailure);
+        resolve.setUseOrigin(useOrigin);
+        resolve.setValidate(isValidate());
+        resolve.setKeep(isKeep());
+        return resolve;
+    }
 
     protected ModuleRevisionId getResolvedMrid() {
-    	return new ModuleRevisionId(getResolvedModuleId(), getRevision() == null ?Ivy.getWorkingRevision():getRevision());
+        return new ModuleRevisionId(getResolvedModuleId(), getRevision() == null ? Ivy
+                .getWorkingRevision() : getRevision());
     }
 
     protected ModuleId getResolvedModuleId() {
-    	return isInline()?new ModuleId(getOrganisation(), getModule()+"-caller"):new ModuleId(getOrganisation(), getModule());
+        return isInline() ? new ModuleId(getOrganisation(), getModule() + "-caller")
+                : new ModuleId(getOrganisation(), getModule());
     }
-    
+
     protected ResolveReport getResolvedReport() {
-        return getResolvedReport(getOrganisation(), isInline()?getModule()+"-caller":getModule(), _resolveId);
+        return getResolvedReport(getOrganisation(), isInline() ? getModule() + "-caller"
+                : getModule(), _resolveId);
     }
-    
+
     public String getType() {
-    	return _type;
+        return _type;
     }
+
     public void setType(String type) {
-    	_type = type;
+        _type = type;
     }
-    
+
     public String getConf() {
         return _conf;
     }
-    
+
     public void setConf(String conf) {
         _conf = conf;
     }
-    
+
     public String getModule() {
         return _module;
     }
+
     public void setModule(String module) {
         _module = module;
     }
+
     public String getOrganisation() {
         return _organisation;
     }
+
     public void setOrganisation(String organisation) {
         _organisation = organisation;
     }
+
     public boolean isHaltonfailure() {
         return _haltOnFailure;
     }
+
     public void setHaltonfailure(boolean haltOnFailure) {
         _haltOnFailure = haltOnFailure;
     }
+
     public File getCache() {
         return _cache;
     }
+
     public void setCache(File cache) {
         _cache = cache;
     }
 
-	public String getRevision() {
-		return _revision;
-	}
-
-	public void setRevision(String rev) {
-		_revision = rev;
-	}
+    public String getRevision() {
+        return _revision;
+    }
 
+    public void setRevision(String rev) {
+        _revision = rev;
+    }
 
+    public Filter getArtifactFilter() {
+        return _artifactFilter;
+    }
 
-	public Filter getArtifactFilter() {
-		return _artifactFilter;
-	}
-
-	public boolean isTransitive() {
-		return _transitive;
-	}
-
-	public void setTransitive(boolean transitive) {
-		_transitive = transitive;
-	}
-
-	public boolean isInline() {
-		return _inline;
-	}
-
-	public void setInline(boolean inline) {
-		_inline = inline;
-	}
-	
-	public void setResolveId(String resolveId) {
-		_resolveId = resolveId;
-	}
-	
-	public String getResolveId() {
-		return _resolveId;
-	}
-	
-	public void setFile(File file) {
-		_file = file;
-	}
-	
-	public File getFile() {
-		return _file;
-	}
-	
-	public void setKeep(boolean keep) {
-		this.keep = Boolean.valueOf(keep);
-	}
-	
-	public boolean isKeep() {
-		return this.keep == null ? !isInline() : this.keep.booleanValue();
-	}
+    public boolean isTransitive() {
+        return _transitive;
+    }
+
+    public void setTransitive(boolean transitive) {
+        _transitive = transitive;
+    }
+
+    public boolean isInline() {
+        return _inline;
+    }
+
+    public void setInline(boolean inline) {
+        _inline = inline;
+    }
+
+    public void setResolveId(String resolveId) {
+        _resolveId = resolveId;
+    }
+
+    public String getResolveId() {
+        return _resolveId;
+    }
+
+    public void setFile(File file) {
+        _file = file;
+    }
+
+    public File getFile() {
+        return _file;
+    }
+
+    public void setKeep(boolean keep) {
+        this.keep = Boolean.valueOf(keep);
+    }
+
+    public boolean isKeep() {
+        return this.keep == null ? !isInline() : this.keep.booleanValue();
+    }
 
 }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java?view=diff&rev=544459&r1=544458&r2=544459
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java Tue Jun  5 05:02:27 2007
@@ -38,47 +38,68 @@
 import org.apache.ivy.util.Message;
 import org.apache.tools.ant.BuildException;
 
-
 /**
  * This task allow to publish a module revision to an Ivy repository.
- * 
- *
  */
 public class IvyPublish extends IvyTask {
-    private String  _organisation;
-    private String  _module;
-    private String  _revision;
-    private String  _pubRevision;
-    private File 	_cache; 
-    private String 	_srcivypattern;
-    private String 	_status;
-    private String 	_conf=null;
-    private String 	_pubdate;
-    private String  _deliverTarget;
-    private String  _publishResolverName = null;
+    private String _organisation;
+
+    private String _module;
+
+    private String _revision;
+
+    private String _pubRevision;
+
+    private File _cache;
+
+    private String _srcivypattern;
+
+    private String _status;
+
+    private String _conf = null;
+
+    private String _pubdate;
+
+    private String _deliverTarget;
+
+    private String _publishResolverName = null;
+
     private List _artifactspattern = new ArrayList();
-    private File    _deliveryList;
+
+    private File _deliveryList;
+
     private boolean _publishivy = true;
+
     private boolean _warnonmissing = true;
+
     private boolean _haltonmissing = true;
+
     private boolean _overwrite = false;
+
     private boolean _update = false;
+
     private boolean _replacedynamicrev = true;
-	private boolean _forcedeliver;
-	private Collection _artifacts = new ArrayList();
-    
+
+    private boolean _forcedeliver;
+
+    private Collection _artifacts = new ArrayList();
+
     public File getCache() {
         return _cache;
     }
+
     public void setCache(File cache) {
         _cache = cache;
     }
+
     public String getSrcivypattern() {
         return _srcivypattern;
     }
+
     public void setSrcivypattern(String destivypattern) {
         _srcivypattern = destivypattern;
     }
+
     /**
      * @deprecated use getSrcivypattern instead
      * @return
@@ -86,6 +107,7 @@
     public String getDeliverivypattern() {
         return _srcivypattern;
     }
+
     /**
      * @deprecated use setSrcivypattern instead
      * @return
@@ -93,77 +115,100 @@
     public void setDeliverivypattern(String destivypattern) {
         _srcivypattern = destivypattern;
     }
+
     public String getModule() {
         return _module;
     }
+
     public void setModule(String module) {
         _module = module;
     }
+
     public String getOrganisation() {
         return _organisation;
     }
+
     public void setOrganisation(String organisation) {
         _organisation = organisation;
     }
+
     public String getPubdate() {
         return _pubdate;
     }
+
     public void setPubdate(String pubdate) {
         _pubdate = pubdate;
     }
+
     public String getPubrevision() {
         return _pubRevision;
     }
+
     public void setPubrevision(String pubRevision) {
         _pubRevision = pubRevision;
     }
+
     public String getRevision() {
         return _revision;
     }
+
     public void setRevision(String revision) {
         _revision = revision;
     }
+
     public String getStatus() {
         return _status;
     }
+
     public void setStatus(String status) {
         _status = status;
     }
+
     public void setConf(String conf) {
         _conf = conf;
     }
+
     public void setDelivertarget(String deliverTarget) {
         _deliverTarget = deliverTarget;
     }
+
     public void setDeliveryList(File deliveryList) {
         _deliveryList = deliveryList;
     }
+
     public String getResolver() {
         return _publishResolverName;
-    }    
+    }
+
     public void setResolver(String publishResolverName) {
         _publishResolverName = publishResolverName;
     }
+
     public String getArtifactspattern() {
-        return (String) (_artifactspattern.isEmpty()?null:_artifactspattern.get(0));
-    }    
+        return (String) (_artifactspattern.isEmpty() ? null : _artifactspattern.get(0));
+    }
+
     public void setArtifactspattern(String artifactsPattern) {
         _artifactspattern.clear();
         _artifactspattern.add(artifactsPattern);
     }
-	public void addArtifactspattern(String artifactsPattern) {
-		_artifactspattern.add(artifactsPattern);
-	}
-	public void addConfiguredArtifacts(ArtifactsPattern p) {
-		_artifactspattern.add(p.getPattern());
-	}
+
+    public void addArtifactspattern(String artifactsPattern) {
+        _artifactspattern.add(artifactsPattern);
+    }
+
+    public void addConfiguredArtifacts(ArtifactsPattern p) {
+        _artifactspattern.add(p.getPattern());
+    }
+
     public boolean isReplacedynamicrev() {
         return _replacedynamicrev;
     }
+
     public void setReplacedynamicrev(boolean replacedynamicrev) {
         _replacedynamicrev = replacedynamicrev;
     }
-    
+
     public void doExecute() throws BuildException {
         Ivy ivy = getIvyInstance();
         IvySettings settings = ivy.getSettings();
@@ -176,32 +221,37 @@
             _cache = settings.getDefaultCache();
         }
         if (_artifactspattern.isEmpty()) {
-        	String p = getProperty(null, settings, "ivy.publish.src.artifacts.pattern");
-        	if (p != null) {
-        		_artifactspattern.add(p);
-        	}
+            String p = getProperty(null, settings, "ivy.publish.src.artifacts.pattern");
+            if (p != null) {
+                _artifactspattern.add(p);
+            }
         }
         if (_srcivypattern == null) {
             _srcivypattern = getArtifactspattern();
         }
         _status = getProperty(_status, settings, "ivy.status");
         if (_organisation == null) {
-            throw new BuildException("no organisation provided for ivy publish task: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
+            throw new BuildException(
+                    "no organisation provided for ivy publish task: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
         }
         if (_module == null) {
-            throw new BuildException("no module name provided for ivy publish task: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>");
+            throw new BuildException(
+                    "no module name provided for ivy publish task: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>");
         }
         if (_revision == null) {
-            throw new BuildException("no module revision provided for ivy publish task: It can either be set explicitely via the attribute 'revision' or via 'ivy.revision' property or a prior call to <resolve/>");
+            throw new BuildException(
+                    "no module revision provided for ivy publish task: It can either be set explicitely via the attribute 'revision' or via 'ivy.revision' property or a prior call to <resolve/>");
         }
         if (_artifactspattern.isEmpty()) {
-            throw new BuildException("no artifacts pattern: either provide it through parameter or through ivy.publish.src.artifacts.pattern property");
+            throw new BuildException(
+                    "no artifacts pattern: either provide it through parameter or through ivy.publish.src.artifacts.pattern property");
         }
         if (_publishResolverName == null) {
-            throw new BuildException("no publish deliver name: please provide it through parameter 'resolver'");
+            throw new BuildException(
+                    "no publish deliver name: please provide it through parameter 'resolver'");
         }
         if ("working".equals(_revision)) {
-        	_revision = Ivy.getWorkingRevision();
+            _revision = Ivy.getWorkingRevision();
         }
         Date pubdate = getPubDate(_pubdate, new Date());
         if (_pubRevision == null) {
@@ -212,11 +262,13 @@
             }
         }
         if (_status == null) {
-            throw new BuildException("no status provided: either provide it as parameter or through the ivy.status.default property");
+            throw new BuildException(
+                    "no status provided: either provide it as parameter or through the ivy.status.default property");
         }
         ModuleRevisionId mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision);
         try {
-            File ivyFile = new File(IvyPatternHelper.substitute(_srcivypattern, _organisation, _module, _pubRevision, "ivy", "ivy", "xml"));
+            File ivyFile = new File(IvyPatternHelper.substitute(_srcivypattern, _organisation,
+                _module, _pubRevision, "ivy", "ivy", "xml"));
             if (_publishivy && (!ivyFile.exists() || _forcedeliver)) {
                 IvyDeliver deliver = new IvyDeliver();
                 deliver.setSettingsRef(getSettingsRef());
@@ -234,165 +286,172 @@
                 deliver.setValidate(doValidate(settings));
                 deliver.setReplacedynamicrev(isReplacedynamicrev());
                 deliver.setConf(_conf);
-                
+
                 deliver.execute();
             }
-            
-            Collection missing = ivy.publish(
-            		mrid, 
-            		_artifactspattern, 
-            		_publishResolverName,
-            		new PublishOptions()
-            			.setPubrevision(getPubrevision())
-            			.setCache(CacheManager.getInstance(settings, _cache))
-            			.setSrcIvyPattern(_publishivy?_srcivypattern:null)
-            			.setStatus(getStatus())
-            			.setPubdate(pubdate)
-            			.setExtraArtifacts((Artifact[]) _artifacts.toArray(new Artifact[_artifacts.size()]))
-            			.setValidate(doValidate(settings))
-            			.setOverwrite(_overwrite)
-            			.setUpdate(_update)
-            			.setConfs(splitConfs(_conf)));
+
+            Collection missing = ivy.publish(mrid, _artifactspattern, _publishResolverName,
+                new PublishOptions().setPubrevision(getPubrevision()).setCache(
+                    CacheManager.getInstance(settings, _cache)).setSrcIvyPattern(
+                    _publishivy ? _srcivypattern : null).setStatus(getStatus()).setPubdate(pubdate)
+                        .setExtraArtifacts(
+                            (Artifact[]) _artifacts.toArray(new Artifact[_artifacts.size()]))
+                        .setValidate(doValidate(settings)).setOverwrite(_overwrite).setUpdate(
+                            _update).setConfs(splitConfs(_conf)));
             if (_warnonmissing) {
                 for (Iterator iter = missing.iterator(); iter.hasNext();) {
-                    Artifact artifact = (Artifact)iter.next();
-                    Message.warn("missing artifact: "+artifact);
+                    Artifact artifact = (Artifact) iter.next();
+                    Message.warn("missing artifact: " + artifact);
                 }
             }
             if (_haltonmissing && !missing.isEmpty()) {
-                throw new BuildException("missing published artifacts for "+mrid+": "+missing);
+                throw new BuildException("missing published artifacts for " + mrid + ": " + missing);
             }
-            
+
         } catch (Exception e) {
-            throw new BuildException("impossible to publish artifacts for "+mrid+": "+e, e);
+            throw new BuildException("impossible to publish artifacts for " + mrid + ": " + e, e);
         }
     }
+
     public PublishArtifact createArtifact() {
-    	PublishArtifact art = new PublishArtifact();
-    	_artifacts .add(art);
-		return art;
+        PublishArtifact art = new PublishArtifact();
+        _artifacts.add(art);
+        return art;
     }
+
     public boolean isPublishivy() {
         return _publishivy;
     }
-    
+
     public void setPublishivy(boolean publishivy) {
         _publishivy = publishivy;
     }
+
     public boolean isWarnonmissing() {
         return _warnonmissing;
     }
-    
+
     public void setWarnonmissing(boolean warnonmissing) {
         _warnonmissing = warnonmissing;
     }
+
     public boolean isHaltonmissing() {
         return _haltonmissing;
     }
-    
+
     public void setHaltonmissing(boolean haltonmissing) {
         _haltonmissing = haltonmissing;
     }
+
     public boolean isOverwrite() {
         return _overwrite;
     }
+
     public void setOverwrite(boolean overwrite) {
         _overwrite = overwrite;
     }
-	public void setForcedeliver(boolean b) {
-		_forcedeliver = b;
-	}
-	public boolean isForcedeliver() {
-		return _forcedeliver;
-	}
-	public boolean isUpdate() {
-		return _update;
-	}
-	public void setUpdate(boolean update) {
-		_update = update;
-	}
-	public class PublishArtifact implements Artifact {
-		private String _ext;
-		private String _name;
-		private String _type;
-
-		public String[] getConfigurations() {
-			return null;
-		}
-
-		public String getExt() {
-			return _ext==null?_type:_ext;
-		}
-
-		public ArtifactRevisionId getId() {
-			return null;
-		}
-
-		public ModuleRevisionId getModuleRevisionId() {
-			return null;
-		}
-
-		public String getName() {
-			return _name;
-		}
-
-		public Date getPublicationDate() {
-			return null;
-		}
-
-		public String getType() {
-			return _type;
-		}
-
-		public URL getUrl() {
-			return null;
-		}
-
-		public void setExt(String ext) {
-			_ext = ext;
-		}
-
-		public void setName(String name) {
-			_name = name;
-		}
-
-		public void setType(String type) {
-			_type = type;
-		}
-
-		public String getAttribute(String attName) {
-			return null;
-		}
-
-		public Map getAttributes() {
-			return new HashMap();
-		}
-
-		public String getExtraAttribute(String attName) {
-			return null;
-		}
-
-		public Map getExtraAttributes() {
-			return new HashMap();
-		}
-
-		public String getStandardAttribute(String attName) {
-			return null;
-		}
-
-		public Map getStandardAttributes() {
-			return new HashMap();
-		}
-	}
-	public static class ArtifactsPattern {
-		private String _pattern;
-
-		public String getPattern() {
-			return _pattern;
-		}
-
-		public void setPattern(String pattern) {
-			_pattern = pattern;
-		}
-	}
+
+    public void setForcedeliver(boolean b) {
+        _forcedeliver = b;
+    }
+
+    public boolean isForcedeliver() {
+        return _forcedeliver;
+    }
+
+    public boolean isUpdate() {
+        return _update;
+    }
+
+    public void setUpdate(boolean update) {
+        _update = update;
+    }
+
+    public class PublishArtifact implements Artifact {
+        private String _ext;
+
+        private String _name;
+
+        private String _type;
+
+        public String[] getConfigurations() {
+            return null;
+        }
+
+        public String getExt() {
+            return _ext == null ? _type : _ext;
+        }
+
+        public ArtifactRevisionId getId() {
+            return null;
+        }
+
+        public ModuleRevisionId getModuleRevisionId() {
+            return null;
+        }
+
+        public String getName() {
+            return _name;
+        }
+
+        public Date getPublicationDate() {
+            return null;
+        }
+
+        public String getType() {
+            return _type;
+        }
+
+        public URL getUrl() {
+            return null;
+        }
+
+        public void setExt(String ext) {
+            _ext = ext;
+        }
+
+        public void setName(String name) {
+            _name = name;
+        }
+
+        public void setType(String type) {
+            _type = type;
+        }
+
+        public String getAttribute(String attName) {
+            return null;
+        }
+
+        public Map getAttributes() {
+            return new HashMap();
+        }
+
+        public String getExtraAttribute(String attName) {
+            return null;
+        }
+
+        public Map getExtraAttributes() {
+            return new HashMap();
+        }
+
+        public String getStandardAttribute(String attName) {
+            return null;
+        }
+
+        public Map getStandardAttributes() {
+            return new HashMap();
+        }
+    }
+
+    public static class ArtifactsPattern {
+        private String _pattern;
+
+        public String getPattern() {
+            return _pattern;
+        }
+
+        public void setPattern(String pattern) {
+            _pattern = pattern;
+        }
+    }
 }