Author: alexsmirnov
Date: 2009-12-28 01:51:50 -0500 (Mon, 28 Dec 2009)
New Revision: 16212
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java
Log:
Move generation to APT
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java 2009-12-24
18:51:04 UTC (rev 16211)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java 2009-12-28
06:51:50 UTC (rev 16212)
@@ -39,6 +39,7 @@
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.CdkProcessingException;
import org.richfaces.cdk.CdkWorker;
+import org.richfaces.cdk.ModelValidator;
import org.richfaces.cdk.StandardOutputs;
import org.richfaces.cdk.StandardSources;
import org.richfaces.cdk.CdkContext.OutputType;
@@ -99,6 +100,7 @@
// parse non-java sources
getContext().getBuilderFor(StandardSources.FACES_CONFIGS).build();
getContext().getBuilderFor(StandardSources.RENDERER_TEMPLATES).build();
+
getContext().getWorker(ModelValidator.class).verify(getContext().getLibrary());
} else if(!getContext().getErrors().iterator().hasNext()){
// processing over, generate files.
for (OutputType type : StandardOutputs.values()) {
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-12-24
18:51:04 UTC (rev 16211)
+++
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java 2009-12-28
06:51:50 UTC (rev 16212)
@@ -37,12 +37,14 @@
import org.richfaces.cdk.CdkWorker;
import org.richfaces.cdk.LibraryBuilder;
import org.richfaces.cdk.LoggerFactory;
+import org.richfaces.cdk.ModelBuilder;
import org.richfaces.cdk.ModelValidator;
import org.richfaces.cdk.NamingConventions;
import org.richfaces.cdk.RichFacesConventions;
import org.richfaces.cdk.StandardOutputFolders;
import org.richfaces.cdk.StandardSources;
import org.richfaces.cdk.ValidatorImpl;
+import org.richfaces.cdk.apt.AptBuilder;
import java.io.File;
import java.net.MalformedURLException;
@@ -287,7 +289,8 @@
try {
// Build JSF library.
- LibraryBuilder builder = LibraryBuilder.createInstance(context);
+// LibraryBuilder builder = LibraryBuilder.createInstance(context);
+ ModelBuilder builder = context.getWorker(AptBuilder.class);
builder.build();
// Tell project about generated files.
Show replies by date