]
Juraj Húska closed RF-12317.
----------------------------
verified
maven-cdk-plugin: two phase source compilation needed for consuming
projects to determine types during CDK build
----------------------------------------------------------------------------------------------------------------
Key: RF-12317
URL:
https://issues.jboss.org/browse/RF-12317
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: cdk, component
Affects Versions: 4.2.0.Final
Reporter: Lukáš Fryč
Assignee: Lukáš Fryč
Fix For: 4.3.0.Milestone1
With current setup of UI builds, CDK features
* {{component-base-class}}
* {{<cdk:object />}} or {{<c:forEach />}}
can't properly determine the type of component (if not explicitly defined),
since the type is not known in the time of the CDK generation step.
See following log:
{code}
~/cdk/test-component$ mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building RichFaces CDK: Test Component 4.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
...
[INFO] --- maven-cdk-plugin:4.3.0-SNAPSHOT:generate (cdk-generate-sources) @
cdk-test-component ---
[WARNING] Could not determine if the renderer-base-class extends
org.richfaces.renderkit.RendererBase: org.richfaces.renderkit.TestComponentRendererBase
[INFO] Cannot determine the type of
org.richfaces.cdk.templatecompiler.el.types.ReferencedType:
org.richfaces.renderkit.TestComponentRendererBase, it will be treated as generic Object.
[INFO] The <foreach> expression #{msgs} is not array, Iterable nor Iterator. It
will be treated as single object.
...
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cdk-test-component
---
[INFO] Compiling 5 source files to
/home/lfryc/workspaces/richfaces/cdk/test-component/target/classes
...
{code}
Give attention especially to following part:
{code}
[WARNING] Could not determine if the renderer-base-class extends
org.richfaces.renderkit.RendererBase: org.richfaces.renderkit.TestComponentRendererBase
[INFO] Cannot determine the type of
org.richfaces.cdk.templatecompiler.el.types.ReferencedType:
org.richfaces.renderkit.TestComponentRendererBase, it will be treated as generic Object.
{code}
It says {{TestComponentRendererBase}} type cannot be determined, which basically means
{{Class.forName(...)}} fails even though the project's {{target/classes}} directory is
on classpath.
Then note the compilation of sources ({{maven-compiler-plugin}}) is done after the CDK
generation, which is the root cause of this problem.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: