ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ange...@apache.org
Subject svn commit: r1462999 - /ace/trunk/org.apache.ace.ant.tasks/src/org/apache/ace/ant/deploymentpackage/DeploymentPackageTask.java
Date Sun, 31 Mar 2013 15:58:47 GMT
Author: angelos
Date: Sun Mar 31 15:58:47 2013
New Revision: 1462999

URL: http://svn.apache.org/r1462999
Log:
ACE-338 Applied the patch after cleaning up whitespace.

Modified:
    ace/trunk/org.apache.ace.ant.tasks/src/org/apache/ace/ant/deploymentpackage/DeploymentPackageTask.java

Modified: ace/trunk/org.apache.ace.ant.tasks/src/org/apache/ace/ant/deploymentpackage/DeploymentPackageTask.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.ant.tasks/src/org/apache/ace/ant/deploymentpackage/DeploymentPackageTask.java?rev=1462999&r1=1462998&r2=1462999&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.ant.tasks/src/org/apache/ace/ant/deploymentpackage/DeploymentPackageTask.java
(original)
+++ ace/trunk/org.apache.ace.ant.tasks/src/org/apache/ace/ant/deploymentpackage/DeploymentPackageTask.java
Sun Mar 31 15:58:47 2013
@@ -134,16 +134,19 @@ public class DeploymentPackageTask exten
         for (String file : files) {
             log("Found file: " + file);
         }
-        
+        if (files.size() == 0) {
+        	log("No files found, creating empty deployment package!", Project.MSG_ERR);
+        }
+
         try {
-        	DeploymentPackageBuilder dp = DeploymentPackageBuilder.createDeploymentPackage(m_name,
m_version);
-        	for (String file : files) {
-        		dp.addBundle(new URL("file://" + m_dir.getAbsolutePath() + "/" + file));
-        	}
-			dp.generate(new FileOutputStream(m_destination));
-		}
+            DeploymentPackageBuilder dp = DeploymentPackageBuilder.createDeploymentPackage(m_name,
m_version);
+            for (String file : files) {
+                dp.addBundle(new File(m_dir, file).toURI().toURL());
+            }
+            dp.generate(new FileOutputStream(m_destination));
+        }
         catch (Exception e) {
-			throw new BuildException("Error building deployment package: " + e.getMessage(), e);
+        	throw new BuildException("Error building deployment package: " + e.getMessage(),
e);
         }
     }
 }



Mime
View raw message