You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2008/10/29 21:28:08 UTC

svn commit: r709000 - /myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java

Author: lu4242
Date: Wed Oct 29 13:28:07 2008
New Revision: 709000

URL: http://svn.apache.org/viewvc?rev=709000&view=rev
Log:
MYFACES-2025 generated myfaces-metadata.xml on myfaces-impl on linux does not have information annotated on impl

Modified:
    myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java

Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java?rev=709000&r1=708999&r2=709000&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java Wed Oct 29 13:28:07 2008
@@ -150,6 +150,7 @@
         {
             throw new MojoExecutionException("Model must have id set");
         }
+        //System.out.println("includes:"+includes+" excludes:"+excludes);
 
         JavaDocBuilder builder = new JavaDocBuilder();
 
@@ -181,6 +182,13 @@
     private void addFileToJavaDocBuilder(JavaDocBuilder builder,
             FileSelector selector, File path)
     {
+        addFileToJavaDocBuilder(builder,selector, path, path.getPath());
+    }
+    
+    
+    private void addFileToJavaDocBuilder(JavaDocBuilder builder,
+            FileSelector selector, File path, String basePath)
+    {
         if (path.isDirectory())
         {
             File[] files = path.listFiles();
@@ -188,16 +196,28 @@
             //Scan all files in directory
             for (int i = 0; i < files.length; i++)
             {
-                addFileToJavaDocBuilder(builder, selector, files[i]);
+                addFileToJavaDocBuilder(builder, selector, files[i], basePath);
             }
         }
         else
         {
             File file = path;
+
             try
             {
-                if (selector.isSelected(new SourceFileInfo(file)))
+                String name = file.getPath();
+                while (name.startsWith("/"))
+                {
+                    name = name.substring(1);
+                }
+                while (name.startsWith("\\"))
+                {
+                    name = name.substring(1);
+                }
+                SourceFileInfo fileInfo = new SourceFileInfo(file,name);
+                if (selector.isSelected(fileInfo))
                 {
+                    //System.out.println("file:"+name);
                     builder.addSource(file);
                 }
             }