[richfaces-svn-commits] JBoss Rich Faces SVN: r14059 - trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu May 7 08:13:33 EDT 2009


Author: abelevich
Date: 2009-05-07 08:13:33 -0400 (Thu, 07 May 2009)
New Revision: 14059

Modified:
   trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo/ResourceDependencyMojo.java
Log:


Modified: trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo/ResourceDependencyMojo.java
===================================================================
--- trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo/ResourceDependencyMojo.java	2009-05-07 12:02:11 UTC (rev 14058)
+++ trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo/ResourceDependencyMojo.java	2009-05-07 12:13:33 UTC (rev 14059)
@@ -266,7 +266,10 @@
 				scriptFilePath = scriptFilePath.endsWith(".js") ? scriptFilePath : scriptFilePath + ".js";  
 				File scriptFile = new File(outputResourceDirectory, scriptFilePath);
 				if(!scriptFile.exists()) {
-					scriptFile.mkdirs();
+					File parent = scriptFile.getParentFile();
+					if(parent != null && !parent.exists()) {
+						parent.mkdirs();
+					}
 				}	
 				
 				ScriptAssembler scriptAssembler = new ScriptAssembler(getLog());
@@ -282,9 +285,11 @@
 				styleFilePath = styleFilePath.endsWith(".xcss") ? styleFilePath : styleFilePath + ".xcss";  
 				
 				File styleFile = new File(outputResourceDirectory, styleFilePath);
-				if(!styleFile.exists()) {
-					styleFile.mkdirs();
-				}				
+				File parent = styleFile.getParentFile();
+				if(parent != null && !parent.exists()) {
+					parent.mkdirs();
+				}
+
 				StyleAssembler styleAssembler = new StyleAssembler(getLog());
 				styleAssembler.setVelocityComponent(velocity);
 				getLog().info("Start merge styles to the: " + styleFile.getPath());




More information about the richfaces-svn-commits mailing list