You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by ba...@apache.org on 2006/11/05 17:19:56 UTC

svn commit: r471467 - /incubator/adffaces/branches/myfaces-1_2-maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java

Author: baranda
Date: Sun Nov  5 09:19:55 2006
New Revision: 471467

URL: http://svn.apache.org/viewvc?view=rev&rev=471467
Log:
Added skipApiOrBaseClasses flag (default:true) to the plugin so we can switch it to false to generate the API components for myfaces

Modified:
    incubator/adffaces/branches/myfaces-1_2-maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java

Modified: incubator/adffaces/branches/myfaces-1_2-maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/myfaces-1_2-maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java?view=diff&rev=471467&r1=471466&r2=471467
==============================================================================
--- incubator/adffaces/branches/myfaces-1_2-maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java (original)
+++ incubator/adffaces/branches/myfaces-1_2-maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java Sun Nov  5 09:19:55 2006
@@ -371,16 +371,17 @@
     return cl;
   }
 
-  static protected class SkipFilter extends ComponentFilter
+  protected class SkipFilter extends ComponentFilter
   {
     protected boolean accept(
       ComponentBean component)
     {
       String componentType = component.getComponentType();
 
-      // always skip API and base class generation
-      return (!componentType.startsWith("javax") &&
-              !componentType.endsWith("Base"));
+      // skip API and base class generation?
+      return skipApiOrBaseClasses || (!componentType.startsWith("javax") &&
+                !componentType.endsWith("Base"));
+
     }
   }
 
@@ -395,7 +396,7 @@
     protected boolean accept(
       ComponentBean component)
     {
-      String componentType = component.getComponentType();
+      String componentType = component.getComponentType();        
       return (componentType.startsWith(_typePrefix));
     }
      private final String _typePrefix;
@@ -596,6 +597,11 @@
   * @parameter
   */
   private File licenseHeaderFile;
+
+  /**
+  * @parameter default-value = "true"
+  */
+  private boolean skipApiOrBaseClasses;
 
   private FacesConfigBean _facesConfig;
   private String _licenseHeader;