Hello Dinesh,
You'll have to:
- create a maven.xml (if you don't have already one).
- define a new goal a bit like that:
<goal name="my:castor">
<attainGoal name="castor:prepare-filesystem"/>
<castor:generate schema="${basedir}/xsd/some.xsd"
package="com.foo.bar" types="j2"/>
</goal>
- call that goal before java:compile with:
<preGoal name="java:compile">
<attainGoal name="ae6-web:castor"/>
</preGoal>
- you may have to use the castorbuilder.properties file to make some
namespace/package mappins if you don't use the package attribute
(especially if you have some more complex multi-file xsd system)
And you should be done!
Guillaume
On 26/04/05, Dinesh Pandey <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to use the Maven's castor plugin for source code generation
> based on xsd file.
>
> When I see the documentation it talks about only one goal
> castor:prepare-filesystem.
>
> It also talks about a tag called castor:generate but its not clear how do I
> use this tag into my project.
>
> Could someone please help me with this?
>
> Thanks in advance,
>
> Dinesh
>
>
--
Guillaume Laforge
http://glaforge.free.fr/weblog/?catid=2
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]