Author: alexsmirnov
Date: 2011-01-05 18:05:01 -0500 (Wed, 05 Jan 2011)
New Revision: 20898
Modified:
branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
branches/RF-9323/cdk/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java
Log:
RESOLVED - issue RF-10105: CDK: impossible to import configuration files from project
https://issues.jboss.org/browse/RF-10105
Modified:
branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
===================================================================
---
branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2011-01-05
21:01:18 UTC (rev 20897)
+++
branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2011-01-05
23:05:01 UTC (rev 20898)
@@ -68,9 +68,8 @@
renderer=(a)JsfRenderer(type="org.richfaces.cdk.test.HtmlAbbrRenderer")),
@RendererSpecificComponent(type =
"org.richfaces.cdk.test.TestHtmlDfn",
tag=@Tag(name="dfn"),
- generate="org.richfaces.cdk.test.component.html.HtmlTestDfn"
- /*,
- attributes="html5.xml"*/)
+ generate="org.richfaces.cdk.test.component.html.HtmlTestDfn",
+ attributes="html5.xml")
}
)
public abstract class AbstractTestComponent extends UIComponentBase /*implements
ValueHolder */{
Modified:
branches/RF-9323/cdk/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java
===================================================================
---
branches/RF-9323/cdk/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java 2011-01-05
21:01:18 UTC (rev 20897)
+++
branches/RF-9323/cdk/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java 2011-01-05
23:05:01 UTC (rev 20898)
@@ -360,10 +360,14 @@
CdkClassLoader classLoader = null;
try {
- String outputDirectory = project.getBuild().getOutputDirectory();
- List<File> urls = new ArrayList<File>(classpathElements.size() +
1);
- urls.add(new File(outputDirectory));
-
+ // This Mojo executed befor process-resources phase, therefore we have to use
original resource folders.
+ List<Resource> resources = project.getResources();
+ List<File> urls = new ArrayList<File>(classpathElements.size() +
resources.size());
+ for (Resource resource : resources) {
+ String directory = resource.getDirectory();
+ // TODO - use includes/excludes and target path.
+ urls.add(resolveRelativePath(new File(directory)));
+ }
for (Iterator<String> iter = classpathElements.iterator();
iter.hasNext();) {
String element = iter.next();