Hi,
please see inline ....
Werner
De Smet Ringo wrote:
> Hello,
>
> I hope that this mailing list is alos the place to discuss the usage of
> the Castor Maven2 plugin.
>
> During the transition of a complete build system from Maven1 to Maven2,
> there is a certain module that gives me a headache. One of our
> developers mentioned that certain Castor generated sources became
> abstract classes, while they where concrete classes in the Maven1 build.
> First of all, it puzzles me that this worked out of the box in the
> Maven1 since the XSD that gives me problems is one that requires a
> binding file to get correct sources.
>
> First of all, I activated the generation of warnings in the definition
> of the castor-maven-plugin to find out about the issues. Once I found
> how to setup the binding file (I'm a newbie at Castor), I configured
> this in the Maven2 POM also. Here is the POM snippet from the setup of
> the castor-maven-plugin:
>
> --- START castor-maven-plugin snippet ---
> <execution>
> <id>ActTechSitResponse</id>
> <goals>
> <goal>generate</goal>
> </goals>
> <configuration>
> <schema>${basedir}/src/xsd/ActTechSitResponse.xsd</schema>
>
> <bindingfile>${basedir}/src/resources/xml/bindings.xml</bindingfile>
> <packaging>
>
> be.telenet.srv.supplier.suppliermgmt.util.xml.xmlobjects.acttechsitrespo
> nse
> </packaging>
> <properties>
> ${basedir}/src/resources/props/castorbuilder.properties
> </properties>
> <warnings>true</warnings>
> </configuration>
> </execution>
> --- END castor-maven-plugin snippet ---
>
> Even with the binding file configured, I still get warnings while
> building:
>
> --- START build output ---
> [INFO] [castor:generate {execution: ActTechSitResponse}]
> [INFO] Processing
> C:\Data\Workspaces\HEAD\srv.supplier.ordermgmt\src\xsd\ActTechSitRespons
> e.xsd
>
> Warning: A class name generation conflict has occured between
> complexType 'complexType:InputDetails' and element
> 'complexType:ActiveTechnicalSituationResponseType/inputDetails'. Please
> use a Binding file to solve this problem.Continue anyway [not
> recommended]
> (y|n|?)y
> ...
> --- END build output ---
>
> I'm not gonna post the complete binding file, since I have numerous
> warnings like above. Below you can see what I wrote in the bindings file
> related to resolving the warning above:
>
> --- START bindings.xml snippet ---
> <elementBinding name="/complexType:InputDetails">
> <java-class name="InputDetailsType"/>
> </elementBinding>
> <elementBinding
> name="/complexType:ActiveTechnicalSituationResponseType/inputDetails">
> <java-class name="InputDetails"/>
> </elementBinding>
> --- END bindings.xml snippet ---
>
> I have double-checked numerous times if the location of the bindings
> file is like I configured in the POM. Even building in verbose/debug
> mode correctly points to the mojo pointing to the correct bindings file.
>
> Some version information of the used components, written in Maven2
> style:
> 1) org.codehaus.mojo:castor-maven-plugin:1.0
> 2) castor:castor:0.9.9.1
>
> For completeness: upgrading Castor to a newer version is not an option
> for now since Maven1 and Maven2 are currently used interchangeably and
> the dependency versions should remain fixed for this product release!
That's a problem, as I was just about to advise you to switch to newer
releases of both the Maven plugin as well as Castor itself.
> Some questions:
> - is there a known bug in the given versions of either the library or
> the plugin that you people know of?
I don't really know. I do know that with recent SNAPSHOT versions of the
Castor Maven plugin, things work without any problems. Let me put it
like this: it definitely is not a problem of castor itself. I could have
a look at this in detail, but looking at very old code does notg look
really appealing to me .. ;-).
Can you wait a few days ? I am in the middle of preparing and shipping
Castor 1.3 RC1, and I'd rather focus on this for the next few days.
Or maybe some fo my peer committers find the time to have a short peek
at the 1.0 release of the Maven plugin for Castor. Can you provide us
with a minimal sample POM that shows your config and e.g. XML schema
fragments, binding file fragments, etc ?
> - The Maven1 build only generates a concrete InputDetails class. Why
> doesn't the Maven2 plugin behave the same?
>
> I hope I was already able to provide a lot of information for someone to
> help me out. If not, please ask as I'm the one that wants seeks help!
> ;-)
>
> Ringo De Smet
> ixor
> *************************************************************
>
> Dit e-mail bericht inclusief eventuele ingesloten bestanden kan informatie
> bevatten die vertrouwelijk is en/of beschermd door intellectuele
> eigendomsrechten. Dit bericht is uitsluitend bestemd voor de
> geadresseerde(n). Elk gebruik van de informatie vervat in dit bericht
> (waaronder de volledige of gedeeltelijke reproductie of verspreiding onder
> elke vorm) door andere personen dan de geadresseerde(n) is verboden. Indien u
> dit bericht per vergissing heeft ontvangen, gelieve de afzender hiervan te
> verwittigen en dit bericht te verwijderen.
>
> This e-mail and any attachment thereto may contain information which is
> confidential and/or protected by intellectual property rights and are
> intended for the sole use of the addressees. Any use of the information
> contained herein (including but not limited to total or partial reproduction
> or distribution in any form) by other persons than the addressees is
> prohibited. If you have received this e-mail in error, please notify the
> sender and delete its contents.
>
> Ce courriel et les annexes éventuelles peuvent contenir des informations
> confidentielles et/ou protégées par des droits de propriété intellectuelle.
> Ce message est adressé exclusivement à son (ses) destinataire(s). Toute
> utilisation du contenu de ce message (y compris la reproduction ou diffusion
> partielle ou complète sous toute forme) par une autre personne que le(s)
> destinataire(s) est formellement interdite. Si vous avez reçu ce message par
> erreur, veuillez prévenir l'expéditeur du message et en détruire le contenu.
>
> *************************************************************
>
> ---------------------------------------------------------------------
> 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