You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2008/10/29 21:20:44 UTC

[jira] Commented: (MYFACES-2025) generated myfaces-metadata.xml on myfaces-impl on linux does not have information annotated on impl

    [ https://issues.apache.org/jira/browse/MYFACES-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643640#action_12643640 ] 

Leonardo Uribe commented on MYFACES-2025:
-----------------------------------------

After checking the code and do some tests, a workaround was found.

On myfaces-builder-plugin 1.0.2 a new feature was added on QdoxModelBuilder.

Qdox 1.6.3 does not parse inner enums on classes so we have to exclude some files temporally on myfaces-impl (FacesCompositeELResolver.java). To do that, two new params were added on BuildMetadataMojo (includes and excludes).

The problem start on a call to file.getPath(). This call is system dependent. In windows the result is:

C:\path\to\myfaces-impl\src\main\java\package\Class.java

In linux is:

/path/to/myfaces-impl/src/main/java/package/Class.java

The filter used for include and exclude files is this:

          <execution>
            <id>makemyfacesmetadata</id>
            <configuration>
                <!-- Qdox 1.6.3 does not parse inner enums on classes
                so we have to exclude some files temporally. -->
                <includes>**/*.java</includes>
                <excludes>**/FacesCompositeELResolver.java</excludes>
            </configuration>
            <goals>
              <goal>build-metadata</goal>
            </goals>
          </execution>

This works well on windows but not on linux, since the path starts with a '/' char.

The temporal solution to avoid another release of myfaces-builder-plugin is change the filter for linux case

          <execution>
            <id>makemyfacesmetadata</id>
            <configuration>
                <!-- Qdox 1.6.3 does not parse inner enums on classes
                so we have to exclude some files temporally. -->
                <includes>/**/*.java,**/*.java</includes>
                <excludes>/**/FacesCompositeELResolver.java,**/FacesCompositeELResolver.java</excludes>
            </configuration>
            <goals>
              <goal>build-metadata</goal>
            </goals>
          </execution>

But a solution to avoid this workaround is needed on myfaces-builder-plugin. The idea is that works like UnpackMojo (that goal strip the base path so all file names for selectors looks like:

org/apache/myfaces/Class.java

on both operative systems.



> generated myfaces-metadata.xml on myfaces-impl on linux does not have information annotated on impl
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2025
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2025
>             Project: MyFaces Core
>          Issue Type: Bug
>         Environment: myfaces-builder-plugin 1.0.2
> fedora 9
> jdk 1.5.0_14
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>
> Generated myfaces-metadata.xml on myfaces-impl on linux does not have information annotated on impl
> On windows systems (compiling with jdk 1.6) this does not happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.