I am trying to dig deeper into this problem. Is there an easy way to get
more logging output while running the Castor source generator?

Ringo 

> -----Original Message-----
> From: De Smet Ringo [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 30 september 2008 13:41
> To: [email protected]
> Subject: [castor-user] Binding file not used in Maven2 plugin?
> 
> 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.actte
> chsitrespo
> 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\ActTech
> SitRespons
> 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!
> 
> Some questions:
> - is there a known bug in the given versions of either the 
> library or the plugin that you people know of?
> - 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 eventuelles peuvent contenir des 
> informations confidentielles et/ou protegees par des droits 
> de propriete intellectuelle. Ce message est adresse 
> exclusivement a son (ses) destinataire(s). Toute utilisation 
> du contenu de ce message (y compris la reproduction ou 
> diffusion partielle ou complete sous toute forme) par une 
> autre personne que le(s) destinataire(s) est formellement 
> interdite. Si vous avez recu ce message par erreur, veuillez 
> prevenir l'expediteur du message et en detruire 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


Reply via email to