[ 
https://jira.codehaus.org/browse/MCASTOR-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274819#comment-274819
 ] 

Werner Guttmann commented on MCASTOR-37:
----------------------------------------

{quote}
Can we first try to solve this problem by introducing castor-codegen:1.3.2 as a 
dependency of castor-maven-plugin?
{quote}

If there's a regression issue with regards to the castor-maven-plugin, I will 
look into this in the context of this plugin.

Don't worry too much about all the other questions: if the issue is a problem 
with Castor (and still is a valid issue with release 1.3.2), we'll have a look. 
And if you really require a solution fast, and are not in a position to wait 
for a Castor 1.3.3 release, we can always push a snapshot release of Castor 
1.3.3 to a Maven repo (for you to pick up).

But please do understand my request re: the separation of concerns as well.

> Castor generates code which doesn't compile
> -------------------------------------------
>
>                 Key: MCASTOR-37
>                 URL: https://jira.codehaus.org/browse/MCASTOR-37
>             Project: Maven 2.x Castor Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Michiel Kalkman
>
> I am using the following xsd to generate java code:
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
> targetNamespace="http://domain"; xmlns:tns="http://domain"; 
> attributeFormDefault="unqualified" elementFormDefault="qualified">
> ...
>       <xs:simpleType name="BFlowType">
>               <xs:restriction base="xs:string">
>                       <xs:enumeration value="component2resource"/>   <!-- 
> Component sends data -->
>                       <xs:enumeration value="resource2component"/>   <!-- 
> Component receives data -->
>                       <xs:enumeration value="inout"/>   <!-- Component 
> receives and sends data --> 
>               </xs:restriction>
>       </xs:simpleType>
> ...
> Using org.codehaus.mojo:castor-maven-plugin:2.0 I get compilable java code.
> With org.codehaus.mojo:castor-maven-plugin:2.1 I get code that does not 
> compile:
> /*
>  * This class was automatically generated with 
>  * <a href="http://www.castor.org";>Castor 1.3.1</a>, using an XML
>  * Schema.
>  * $Id$
>  */
> ...
>     /**
>      * Field enumConstants.
>      */
>     private static final java.util.Map<java.lang.String, BFlowType> 
> enumConstants = new java.util.HashMap<java.lang.String, BFlowType>();
>     static {
>         for (BFlowType c: BFlowType.values()) {
>             BFlowType.enumConstants.put(c.value, c);
>         }
>     };
> The final semi-colon gives the compilation error.
> Perhaps the problem is already resolved in castor-codegen 1.3.2?

--
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


Reply via email to