Author: alexsmirnov
Date: 2009-11-04 20:07:38 -0500 (Wed, 04 Nov 2009)
New Revision: 15829
Added:
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/verify.bsh
Modified:
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java
Log:
JAXB-based template parser.
Added: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/verify.bsh
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/verify.bsh
(rev 0)
+++
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/verify.bsh 2009-11-05
01:07:38 UTC (rev 15829)
@@ -0,0 +1,42 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+ File generatedPackage = new File( basedir,
"target/generated-sources/main/java" );
+ System.out.println( "Checking for existence of generated package directory:
" + generatedPackage );
+ if ( !generatedPackage.isDirectory() )
+ {
+ System.out.println( "FAILED" );
+ return false;
+ }
+
+ File classesDirectory = new File( basedir, "target/classes" );
+
+ String[] classes = { "org/richfaces/cdk/test/UITestComponent" };
+ for ( String generatedClass : classes )
+ {
+ File generatedClassFile = new File( generatedPackage, generatedClass +
".java" );
+ System.out.println( "Checking for existence of generated Class: " +
generatedClassFile );
+ if ( !generatedClassFile.isFile() )
+ {
+ System.out.println( "FAILED" );
+ return false;
+ }
+ File compiledClassFile = new File( classesDirectory, generatedClass +
".class" );
+ System.out.println( "Checking for existence of compiled Class: " +
compiledClassFile );
+ if ( !compiledClassFile.isFile() )
+ {
+ System.out.println( "FAILED" );
+ return false;
+ }
+ }
+}
+catch( Throwable t )
+{
+ t.printStackTrace();
+ return false;
+}
+
+return true;
Modified:
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java
===================================================================
---
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java 2009-11-05
00:56:46 UTC (rev 15828)
+++
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java 2009-11-05
01:07:38 UTC (rev 15829)
@@ -54,6 +54,7 @@
* @author asmirnov(a)exadel.com
*
* @goal generate
+ * @requiresDependencyResolution compile
* @phase generate-sources
*/
public class GenerateMojo extends AbstractMojo {
@@ -106,7 +107,7 @@
/**
* Directory where the output Java Files will be located.
*
- * @parameter
expression="${project.build.directory}/cdk-generated/main/java"
+ * @parameter
expression="${project.build.directory}/generated-sources/main/java"
*/
protected File outputJavaDirectory;
@@ -114,12 +115,12 @@
* Directory where the output Java Files will be located.
*
* @parameter
- *
expression="${project.build.directory}/cdk-generated/main/resources"
+ *
expression="${project.build.directory}/generated-sources/main/resources"
*/
protected File outputResourcesDirectory;
/**
- * @parameter
expression="${project.build.directory}/cdk-generated/test/java"
+ * @parameter
expression="${project.build.directory}/generated-sources/test/java"
*/
protected File outputTestDirectory;
@@ -127,7 +128,7 @@
* Directory where the output Java Files will be located.
*
* @parameter
- *
expression="${project.build.directory}/cdk-generated/test/resources"
+ *
expression="${project.build.directory}/generated-sources/test/resources"
*/
protected File outputTestResourcesDirectory;
@@ -239,7 +240,7 @@
}
// Set default naming conventions if it was not configured.
- if (namingConventionsConfigured) {
+ if (!namingConventionsConfigured) {
RichFacesConventions facesConventions = new RichFacesConventions();
try {
@@ -252,7 +253,7 @@
}
// Set default model validator if it was not configured.
- if (validatorConfigured) {
+ if (!validatorConfigured) {
ValidatorImpl validatorImpl = new ValidatorImpl();
try {
Show replies by date