[richfaces-issues] [JBoss JIRA] (RF-12317) maven-cdk-plugin: two phase source compilation needed for consuming projects to determine types during CDK build

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Mon Jun 11 07:34:04 EDT 2012


Lukáš Fryč created RF-12317:
-------------------------------

             Summary: 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)
            Reporter: Lukáš Fryč


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: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list