Thats fine, so long as there is only a single target package. In the two projects where I use castor, I have several.
Feel free to submit a patch - just don't break the existing behaviour :) -Tim > -----Original Message----- > From: Nathan Coast [mailto:[EMAIL PROTECTED] > Sent: Friday, 10 October 2003 3:10 PM > To: Maven Users List > Subject: Re: castor plugin > > > Hi, > > good point. I think it should be possible to carefully chose > values for the > properties that would ensure that in 99% of cases no properties > would need to be > specified. It would be fairly trivial to make the plugin operate on > multiple xsd sources based on some pattern. > > defaults in plugin.properties e.g > maven.castor.source=src/castor > maven.castor.includes=**/*.xsd > maven.castor.excludes= > maven.castor.dest=${maven.build.dir}/castor > maven.castor.package=${pom.package} > maven.castor.types=j2 > > <some kinda looping> > <castor:generate schema="${my.xsd.file}" > package="${maven.castor.package}" > types="${maven.castor.types}"/> > </looping> > > > From the example code you'd have to write a chunk of xml for > each schema in > your maven.xml. IMO, it's ugly to have to write similar xml > script for each file. > > <preGoal name="java:compile"> > <attainGoal name="castor:prepare-filesystem"/> > <castor:generate schema="src/schemas/foo.xsd" > package="com.foo.bar" > types="j2"/> > > I do sincerely mean IMO. I'm not saying I'm right, and that everyone who > disagrees must be wrong :) > > Tim Anderson wrote: > > > The main reason is that multiple parameters must > > be specified to generate sources for a particular schema. > > To specify these via properties would be ugly IMHO. > > > > Your preferred approach only allows one schema per project, > > which is unrealistic. > > > > -Tim > > > > > > > >>-----Original Message----- > >>From: Nathan Coast [mailto:[EMAIL PROTECTED] > >>Sent: Friday, 10 October 2003 1:45 PM > >>To: Maven Users > >>Subject: castor plugin > >> > >> > >>Hi, > >> > >>Is there any reason why the castor plugin doesn't provide 'ready > >>to go' jelly > >>script? What I mean by this is that in order to use the castor > >>plugin you have > >>to write maven.xml that sets properties then calls tags defined > >>within the > >>castor plugin. Isn't the more 'normal' plugin mechanism to > >>define executable > >>jelly script that you configure with properties? > >> > >>would it be 'nicer' if the castor plugin did something like > >> > >>javac any java sources > >>generate sources from an xsd - default from say > >>src/castor/${pom.id}.xsd to > >>target/castor/java > >>add target/castor/java to compile.src.set > >>call java:jar to compile and assemble the ${maven.final.name}.jar? > >> > >>One thing I like about maven is that in general, if you place > >>your sources in > >>default locations, you don't have to write any jelly script or > configure > >>anything and the default goal for the plugin will do something sensible. > >> > >>More than happy to modify / patch the castor plugin if that's > >>what people want. > >> > >>cheers > >>Nathan > >> > >> > >> > >> > >>--------------------------------------------------------------------- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]