[pkg-java] r7875 - in trunk/maven-debian-helper: . debian maven-debian-helper maven-debian-helper/src/main/java/org/debian/maven maven-debian-plugin maven-debian-plugin/src/main/java/org/debian/maven/plugin
twerner at alioth.debian.org
twerner at alioth.debian.org
Sun Jan 25 12:43:08 UTC 2009
Author: twerner
Date: 2009-01-25 12:43:08 +0000 (Sun, 25 Jan 2009)
New Revision: 7875
Modified:
trunk/maven-debian-helper/debian/changelog
trunk/maven-debian-helper/maven-debian-helper/pom.xml
trunk/maven-debian-helper/maven-debian-helper/src/main/java/org/debian/maven/Wrapper.java
trunk/maven-debian-helper/maven-debian-plugin/pom.xml
trunk/maven-debian-helper/maven-debian-plugin/src/main/java/org/debian/maven/plugin/SysInstallMojo.java
trunk/maven-debian-helper/pom.xml
Log:
UNRELEASED
* Implement better exception handling.
Modified: trunk/maven-debian-helper/debian/changelog
===================================================================
--- trunk/maven-debian-helper/debian/changelog 2009-01-25 00:16:47 UTC (rev 7874)
+++ trunk/maven-debian-helper/debian/changelog 2009-01-25 12:43:08 UTC (rev 7875)
@@ -1,3 +1,10 @@
+maven-debian-helper (0.3) unstable; urgency=low
+
+ UNRELEASED
+ * Implement better exception handling.
+
+ -- Torsten Werner <twerner at debian.org> Sun, 25 Jan 2009 12:27:03 +0100
+
maven-debian-helper (0.2) unstable; urgency=low
* Rename the bootstrap script.
Modified: trunk/maven-debian-helper/maven-debian-helper/pom.xml
===================================================================
--- trunk/maven-debian-helper/maven-debian-helper/pom.xml 2009-01-25 00:16:47 UTC (rev 7874)
+++ trunk/maven-debian-helper/maven-debian-helper/pom.xml 2009-01-25 12:43:08 UTC (rev 7875)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.debian.maven</groupId>
<artifactId>maven-debian</artifactId>
- <version>0.2</version>
+ <version>0.3</version>
</parent>
<artifactId>maven-debian-helper</artifactId>
Modified: trunk/maven-debian-helper/maven-debian-helper/src/main/java/org/debian/maven/Wrapper.java
===================================================================
--- trunk/maven-debian-helper/maven-debian-helper/src/main/java/org/debian/maven/Wrapper.java 2009-01-25 00:16:47 UTC (rev 7874)
+++ trunk/maven-debian-helper/maven-debian-helper/src/main/java/org/debian/maven/Wrapper.java 2009-01-25 12:43:08 UTC (rev 7875)
@@ -36,10 +36,23 @@
public static void updateProperties(String key) throws IOException
{
String filename = systemProperties.getProperty(key);
- if (filename != null)
+ if (filename == null)
{
- extraProperties.load(new FileInputStream(filename));
+ return;
}
+ FileInputStream stream = null;
+ try
+ {
+ stream = new FileInputStream(filename);
+ extraProperties.load(stream);
+ }
+ finally
+ {
+ if (stream != null)
+ {
+ stream.close();
+ }
+ }
}
/* Fill new commandline array 'newArgs' with properties from
Modified: trunk/maven-debian-helper/maven-debian-plugin/pom.xml
===================================================================
--- trunk/maven-debian-helper/maven-debian-plugin/pom.xml 2009-01-25 00:16:47 UTC (rev 7874)
+++ trunk/maven-debian-helper/maven-debian-plugin/pom.xml 2009-01-25 12:43:08 UTC (rev 7875)
@@ -5,7 +5,7 @@
<parent>
<artifactId>maven-debian</artifactId>
<groupId>org.debian.maven</groupId>
- <version>0.2</version>
+ <version>0.3</version>
</parent>
<artifactId>maven-debian-plugin</artifactId>
Modified: trunk/maven-debian-helper/maven-debian-plugin/src/main/java/org/debian/maven/plugin/SysInstallMojo.java
===================================================================
--- trunk/maven-debian-helper/maven-debian-plugin/src/main/java/org/debian/maven/plugin/SysInstallMojo.java 2009-01-25 00:16:47 UTC (rev 7874)
+++ trunk/maven-debian-helper/maven-debian-plugin/src/main/java/org/debian/maven/plugin/SysInstallMojo.java 2009-01-25 12:43:08 UTC (rev 7875)
@@ -179,7 +179,15 @@
private void mkdir(String path) throws IOException
{
- new File(path).mkdirs();
+ File destinationDirectory = new File(path);
+ if (destinationDirectory.isDirectory())
+ {
+ return;
+ }
+ if (!destinationDirectory.mkdirs())
+ {
+ throw new IOException("cannot create destination directory " + path);
+ }
}
private void run(String[] command) throws IOException
Modified: trunk/maven-debian-helper/pom.xml
===================================================================
--- trunk/maven-debian-helper/pom.xml 2009-01-25 00:16:47 UTC (rev 7874)
+++ trunk/maven-debian-helper/pom.xml 2009-01-25 12:43:08 UTC (rev 7875)
@@ -4,7 +4,7 @@
<groupId>org.debian.maven</groupId>
<artifactId>maven-debian</artifactId>
- <version>0.2</version>
+ <version>0.3</version>
<packaging>pom</packaging>
<name>helper tools for using Maven to build Debian packages</name>
More information about the pkg-java-commits
mailing list