You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2008/01/03 03:50:52 UTC

svn commit: r608314 - /maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java

Author: brianf
Date: Wed Jan  2 18:50:46 2008
New Revision: 608314

URL: http://svn.apache.org/viewvc?rev=608314&view=rev
Log:
MDEP-119: create the classpath output folders if needed.

Modified:
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java?rev=608314&r1=608313&r2=608314&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/BuildClasspathMojo.java Wed Jan  2 18:50:46 2008
@@ -299,6 +299,8 @@
     {
         try
         {
+            out.mkdirs();
+            
             Writer w = new BufferedWriter( new FileWriter( out ) );
 
             try
@@ -309,7 +311,7 @@
             }
             catch ( IOException ex )
             {
-                throw new MojoExecutionException( "Error while writting to classpath file '" + cpFile + "': " +
+                throw new MojoExecutionException( "Error while writting to classpath file '" + out + "': " +
                     ex.toString(), ex );
             }
             finally
@@ -319,7 +321,7 @@
         }
         catch ( IOException ex )
         {
-            throw new MojoExecutionException( "Error while opening/closing classpath file '" + cpFile + "': " +
+            throw new MojoExecutionException( "Error while opening/closing classpath file '" + out + "': " +
                 ex.toString(), ex );
         }
     }