[
https://jira.codehaus.org/browse/MJAXB-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275568#comment-275568
]
Anders Hammar commented on MJAXB-35:
------------------------------------
I agree that forcing the binding file's extension to be 'xjb' is too harsh. As
I understand it, it could be anything (but possibly 'xjb' is the most common).
'xml' shouldn't be too uncommon I'm guessing.
> Postfix of bindingfiles can't be set
> ------------------------------------
>
> Key: MJAXB-35
> URL: https://jira.codehaus.org/browse/MJAXB-35
> Project: Maven 2.x JAXB 2.1 Plugin
> Issue Type: Improvement
> Affects Versions: 1.3
> Reporter: Harald Entner
> Priority: Minor
>
> There is a difference between the jaxws-maven-plugin and the
> jaxb2-maven-plugin. Both are able to use binding files, but the latter
> expects these files to end with .xjb where jaxws-maven-plugin expects them to
> end with .xml
> The problem is that we don't have any knowledge how these files end.
> Unfortunately i can't checkout the source, otherwise i could provide a diff
> file.
> It's pretty easy to add an additional parameter (e.g. bindingPostfix).
> The code below shows how this could work (nothing special).
> /**
> * @parameter default-value=".xjb"
> */
> protected String bindingPostfix;
> /**
> * Returns true if the file ends with an xsd extension.
> *
> * @param file
> * The filed being reviewed by the filter.
> * @return true if an xsd file.
> */
> public boolean accept( final java.io.File file )
> {
> boolean accept = file.isFile() && file.getName().endsWith( ".xsd"
> );
> if ( log.isDebugEnabled() )
> {
> log.debug( "accept " + accept + " for file " + file.getPath()
> );
> }
> return accept;
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email