Maven CDK plugin configuration

Version 7

    This is general way to use maven-cdk-plugin. Here is a snippet of CDK project pom.xml :

    <project>
    ..........
     <build>
       <plugins>
          <plugin>
            <groupId>org.richfaces.cdk</groupId>
            <artifactId>maven-cdk-plugin</artifactId>
            <version>4.0.0-SNAPSHOT</version>
             <executions>
               <execution>
                <id>generate</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                    .............
                </configuration>
              </execution>
            </executions>
          </plugin>
       </plugins>
     </build>
    ..........
    </project>
    

     

    To owerwrite default values this plugin can be confugured by the <configure> section:

    <configuration>
         <!-- the directory for generated java source files -->
         <outputJavaDirectory>target/cdk-generated/main/java</outputJavaDirectory>
          <!-- the directory for generated non-java files ( faces-config.xml, ...taglib.xml and so on )-->
         <outputResourcesDirectory>target/cdk-generated/main/resources</outputResourcesDirectory>
          <!-- the directory for generated jUnit test source files -->
         <outputTestDirectory>target/cdk-generated/test/java</outputTestDirectory>
          <!-- the directory for generated jUnit test resource files -->
         <outputTestResourcesDirectory>target/cdk-generated/test/java</outputTestResourcesDirectory>
          <!-- define java source files that will be excluded from annotations processing
               by default, CDK processes all Java files -->
         <sourceExcludes>
            <exclude>**/Foo.java</exclude>
         </sourceExcludes>
         <sourceIncludes>
            <include>**/*.java</include>
         </sourceIncludes>
         <!-- faces-config files, with CDK extensions -->
         <facesConfigs>
            <facesConfig>
               <directory>src/main/configs</directory>
               <includes>
                  <include>**/*.xml</include>
               </includes>
               <!-- empty by default
               <excludes>
                  <exclude>foo/bar.xml</exclude>
               </excludes>
               -->
            </facesConfig>
         </facesConfigs>
         <!-- renderer template  files -->
         <templates>
            <template>
               <directory>src/main/templates</directory>
               <includes>
                  <include>**/*.xml</include>
               </includes>
               <!-- empty by default
               <excludes>
                  <exclude>foo/bar.xml</exclude>
               </excludes>
               -->
            </template>
         </templates>
         <!-- miscellaneous options -->
         <options>
              <taglibUrl>http://foo.bar/</taglibUrl>
         </options>
         <!-- advanced configuration. most of the CDK modules can be redefined to change default functionality -->
         <workers>
           <!-- element name defines worker interface with implementation class name as content -->
           <org.richfaces.cdk.NamingConventions>org.richfaces.cdk.RichfacesConventions</org.richfaces.cdk.NamingConventions>
         </workers>
    </configuration>