users@jaxb.java.net

Re: How to Change package name to targetnamespace in XJC ant task

From: Felipe Gaścho <fgaucho_at_gmail.com>
Date: Thu, 31 Jan 2008 09:58:33 +0100

use the package attribute:

        <target name="compileschema">
                <echo message="Compiling the Curriculum XML Schema..." />
                <mkdir dir="${jaxb.classes.dir}" />
                <xjc schema="${schema}" extension="true"
classpath="${build.dir.classes}" target="${generated.dir}"
package="${jaxb.bindingclasses.package}"> <!-- - - - HERE -->
                        <produces dir="${jaxb.classes.dir}" includes="**/*.java" />
                </xjc>
                <javac srcdir="${generated.dir}" destdir="${generated.dir}"
debug="off" source="1.6" />
                <jar destfile="lib/footprint-config.jar" basedir="${generated.dir}"
excludes="**/*.java" />
                <delete dir="${generated.dir}" />
        </target>

On Jan 31, 2008 9:36 AM, Deepak Gaikwad <deepakbgaikwad_at_hotmail.com> wrote:
>
> Hi
>
> I am using XJC ant task but it is giving package name all in smallcase
> letters. It is not picking package name from scheam targetnamespace
> attribute.
>
> How do I forece XJC ant task to pick package name from targetnamespace
> attribute.
>
> Deepak Gaikwad
> Software Engineer
>
>
> ________________________________
> Detailed profiles 4 marriage! Only at Shaadi.com Try it!