[richfaces-svn-commits] JBoss Rich Faces SVN: r14068 - in trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd: mojo and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu May 7 10:56:16 EDT 2009


Author: abelevich
Date: 2009-05-07 10:56:16 -0400 (Thu, 07 May 2009)
New Revision: 14068

Modified:
   trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ComponentsHandler.java
   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/handler/ComponentsHandler.java
===================================================================
--- trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ComponentsHandler.java	2009-05-07 14:48:29 UTC (rev 14067)
+++ trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ComponentsHandler.java	2009-05-07 14:56:16 UTC (rev 14068)
@@ -26,7 +26,6 @@
 import java.util.Set;
 
 import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.plugin.logging.SystemStreamLog;
 import org.codehaus.plexus.util.SelectorUtils;
 import org.richfaces.cdk.rd.Component;
 import org.richfaces.cdk.rd.Components;
@@ -145,8 +144,18 @@
 				if(!doMatch(styleExcludes, style, true)) {
 					this.styles.add(style);
 					log.info("style " + style + " is collected");
+				} else {
+					log.info("style files are in excluded list");
+					for(String styleExclude: styleExcludes) {
+						log.info(styleExclude);
+					}
 				}
 				
+			} else {
+				log.info("style files are not in included list");
+				for(String styleInclude: styleIncludes) {
+					log.info(styleInclude);
+				}
 			}
 			
 		}	
@@ -190,10 +199,19 @@
 				if(!doMatch(scriptExcludes, script, true)) {
 					this.scripts.add(script);
 					log.info("script " + script + " is collected");
+				}else {
+					log.info("script files are in excluded list");
+					for(String styleExclude: scriptExcludes) {
+						log.info(styleExclude);
+					}
 				}
 				
-			}	
-			
+			} else {
+				log.info("script files are not in included list");
+				for(String styleInclude: scriptIncludes) {
+					log.info(styleInclude);
+				}
+			}
 		}
 	}
 	

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 14:48:29 UTC (rev 14067)
+++ trunk/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo/ResourceDependencyMojo.java	2009-05-07 14:56:16 UTC (rev 14068)
@@ -38,6 +38,7 @@
 import org.apache.commons.vfs.FileSystemException;
 import org.apache.commons.vfs.FileSystemManager;
 import org.apache.commons.vfs.VFS;
+import org.apache.commons.vfs.util.FileObjectUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
@@ -245,7 +246,18 @@
 			
 			for (Artifact artifact : artifacts) {
 				FileObject jar = resolveArtifact(artifact);
+				getLog().info("Process jar: " + jar.getName().getFriendlyURI());
 				FileObject [] configs = PluginUtils.resolveConfigsFromJar(jar, xmlConfigPatterns);
+				
+				if(configs.length == 0) {
+					getLog().info("no dependecy files found");
+				} else {
+						getLog().info("next dependency files found");
+						for (FileObject config: configs) {
+							getLog().info(config.getName().getBaseName());
+						}
+				}
+				
 				components.putAll(PluginUtils.processConfigs(configs, defaultDigester));
 			}		
 		
@@ -273,10 +285,9 @@
 				}	
 				
 				ScriptAssembler scriptAssembler = new ScriptAssembler(getLog());
-				
-				getLog().info("Start merge scripts to the: " + scriptFile.getPath());
-				
+			
 				if(!scripts.isEmpty()) {
+					getLog().info("Start merge scripts to the: " + scriptFile.getPath());
 					mergeResources(scriptFile,scriptAssembler, beforeScriptIncludes, afterScriptIncludes, scripts);
 				}	
 		
@@ -292,9 +303,9 @@
 
 				StyleAssembler styleAssembler = new StyleAssembler(getLog());
 				styleAssembler.setVelocityComponent(velocity);
-				getLog().info("Start merge styles to the: " + styleFile.getPath());
-				
+		
 				if(!styles.isEmpty()) {
+					getLog().info("Start merge styles to the: " + styleFile.getPath());
 					mergeResources(styleFile,styleAssembler, beforeStyleIncludes, afterStyleIncludes, styles);
 				}	
 			
@@ -352,9 +363,14 @@
 		scanner.setIncludes(includes);
 		scanner.setExcludes(excludes);
 		scanner.addDefaultExcludes();
+		getLog().info("search *.xhtml files");
 		scanner.scan();
 		
 		String [] collectedFiles =  scanner.getIncludedFiles();
+		
+		for(String collectedFile: collectedFiles) {
+			getLog().info(collectedFile + " found");
+		}
 
 		ComponentsHandler handler = new ComponentsHandler(getLog());
 	  	handler.setComponents(components);
@@ -406,10 +422,10 @@
 			}
 			
 			File file = artifact.getFile();
-
+			
 			try {
 				FileSystemManager manager = VFS.getManager();
-				jarFileObjects = manager.resolveFile("jar:///" + file.getPath());
+				jarFileObjects = manager.resolveFile("jar://" + file.toURI());
 			} catch (FileSystemException e)  {
 				getLog().error("Error during processing file: " + file.getPath()+ "\n" + e.getMessage(), e);
 			}




More information about the richfaces-svn-commits mailing list