Hi Stevo,

can you please let me know why you want a mapping file to be generated
at all ? Java classes plus descriptor classes should be sufficient for
you needs, if this is about (un-)marshalling to and from XML (as defined
by your XML schemas).

Some more answers are inline.

Regards
Werner

Stevo Slavić wrote:
> OK, thank you very much!
> 
> Generating classes works well now, but once I set generateMappings to true,
> generate goal fails with following error:
> 
> The following exception occured while validating field: _classMappingList of
> class: org.exolab.castor.mapping.xml.MappingRoot: The following exception
> occured while validating field: _classChoice of class:
> org.exolab.castor.mapping.xml.ClassMapping: The following exception occured
> while validating field: _fieldMappingList of class:
> org.exolab.castor.mapping.xml.ClassChoice: The following exception occured
> while validating field: _bindXml of class:
> org.exolab.castor.mapping.xml.FieldMapping: The following exception occured
> while validating field: _name of class:
> org.exolab.castor.mapping.xml.BindXml: Name '-error-if-this-is-used-' is not
> a valid QName.
If you do not set <generateMappings> to true, does code generation
succeed ?

> Any idea what could be the problem? Guess I'm hit by this Castor
> issue<http://jira.codehaus.org/browse/CASTOR-676>.
> Advices/workarounds are welcome too.
> 
> Version 1.5 of castor-maven-plugin is being used. There seems to be no
> (documented) way to set output directory for mappings file ("dest" parameter
> does not seem to influence generation of mapping.xml). 
Correct. But there's two more MOJOs that specialize in creating just
mapping files. Please have a look at

http://mojo.codehaus.org/castor-maven-plugin/plugin-info.html

> Currently, in my case
> with the error above, (empty) mappings.xml file gets generated in ${basedir}
> of the project. It's a resource so by default IMO it should be generated in
> ${project.build.directory}/generated-resources/castor directory. Couldn't
> find existing issue for this in MCASTOR JIRA. Is there a way to configure
> mappings file output directory?
No, but please feel free to add a new issue. I guess I don't have to
mention that a patch would be warmly welcome as well.

> One more issue, plugin fails a build if there is no
> ${basedir}/src/main/castor directory in the project. If I understood well,
> this will be fixed for v2.0 of the plugin.
That should have been fixed for 1.5 already. Odd. But if it still does,
please feel free to raise a issue (even if it's a duplicate).

> Regards,
> Stevo.
> 
> On Mon, Aug 10, 2009 at 8:44 PM, Werner Guttmann 
> <[email protected]>wrote:
> 
>> Hi,
>>
>> You can always supply a binding file to the (underlying) Castor XML code
>> generator to override the default output type for <xs:date> instances.
>>
>> Regards
>> Werner
>>
>> Stevo Slavić wrote:
>>> Hello castor(-maven-plugin) users,
>>>
>>> Does anyone know why does castor-maven-plugin (1.5) for xs:date elements
>>> generate class properties of org.exolab.castor.types.Date type? Is there
>> any
>>> way to have it configured to generate java.util.Date instead?
>>>
>>> Regards,
>>> Stevo.
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to