I have problem with build path in ant build file. due to bug in gwt. I created 1 gwt package(com.google.gwt.user.client.ui) into my project & copied MenuBar class, I modified the Menubar class code to solve our problem. its work great. even i can compile it from eclipse too.
But problem is that when i run ant build file. Menu Bar class taking from gwt jar & throws exception that "unresolved methods". I want to ant builds takes MenuBar class from my project package instead of gwt jar.
Please help me out what to do for that.
Below is the build.xml file content
--> --> -->
<property name="main-class" value="com.my.project.main.Main" />
<!-- defbizserver libraries
<path id="libraries">
<fileset dir="./libs">
<include name="*.jar"/>
</fileset>
</path>-->
<!-- accounter server libraries-->
<!--<path id="acclibraries">
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
<fileset dir="${acc.dir}">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${acc.dir}/src"/>
</path>-->
<!-- gwt libraries-->
<path id="gwtlibraries">
<fileset dir="${bizantragui.dir}">
<include name="**/**.jar" />
</fileset>
<fileset dir="./libs">
<include name="*.jar" />
</fileset>
<fileset dir="${acc.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${src.dir}" />
<pathelement location="${acc.dir}/src" />
<pathelement location="${gwt.sdk}/gwt-user.jar" />
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar" />
<pathelement location="${bizantragui.dir}/src" />
<!--<pathelement location="${comet.dir}/src" />-->
<!--<pathelement location="${network.dir}/src" />-->
</path>
<fileset file="webapp" id="webapp">
<exclude name=".svn" />
</fileset>
<target name="clean">
<delete dir="${build.dir}" />
<delete defaultExcludes="false">
<fileset dir="./webapp/myprouject" />
</delete>
</target>
<!--Compiling-->
<target name="compile" depends="check-gwtpath" if="gwt.present">
<mkdir dir="${classes.dir}" />
<mkdir dir="${libs.dir}" />
<copy todir="${classes.dir}">
<fileset dir="${acc.dir}/war/WEB-INF/classes">
<include name="**/**" />
</fileset>
</copy>
<!--<javac srcdir="${comet.dir}/src" destdir="${classes.dir}" classpathref="gwtlibraries" debug="true" />-->
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="gwtlibraries" debug="true" />
<!--<javac srcdir="${network.dir}" destdir="${classes.dir}" classpathref="gwtlibraries" debug="true" />-->
<!--<javac srcdir="${acc.dir}/src" destdir="${classes.dir}" classpathref="gwtlibraries" debug="true" />-->
</target>
<target name="gwtcompile" description="GWT COMPILATION">
<mkdir dir="./webapp" />
<java classpathref="gwtlibraries" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="${bizantragui.dir}/src" />
<pathelement location="${acc.dir}/src" />
</classpath>
<jvmarg value="-Xmx1024m" />
<arg line="-war ./webapp/" />
<arg line="-style OBF" />
<arg line="com.bizantra.Bizantra">
</arg>
<arg line="-localWorkers 2" />
</java>
</target>
<target name="makewebapp">
<foreach target="compress_file" param="file">
<path>
<fileset dir="./webapp/bizantra" id="outputhtml">
<include name="*.cache.js" />
<include name="**/*.js" />
</fileset>
</path>
</foreach>
</target>
<target name="compress_file" description="Compress file and make gz file">
<gzip src="${file}" zipfile="${file}.gz" />
</target>
<target name="setup" depends="compile,gwtcompile,makewebapp">
<mkdir dir="${classes.dir}" />
<!-- <copy todir="${classes.dir}">
<fileset dir="./">
<exclude name="*xml" />
<exclude name="build.xml" />
</fileset>
<fileset dir="${acc.dir}/src">
<exclude name="*xml" />
</fileset>
</copy>-->
<!--<copy todir="${classes.dir}/webapp/images">
<fileset dir="${bizantragui.dir}/war/images">
<include name="**/*.*" />
</fileset>
<fileset dir="${acc.dir}/war/images">
<include name="**/*.*" />
</fileset>
</copy>-->
<!--<copy todir="${classes.dir}/webapp">
<fileset dir="${network.dir}/war">
<include name="**/*.html" />
<include name="**/*.jsp" />
</fileset>
</copy>-->
<mkdir dir="${classes.dir}/webapp" />
<mkdir dir="${classes.dir}/mapping" />
<copy todir="${classes.dir}/mapping">
<fileset dir="./mapping">
</fileset>
</copy>
<!--<copy todir="${classes.dir}/networkmapping">
<fileset dir="./networkmapping">
</fileset>
</copy>-->
<copy todir="${classes.dir}">
<fileset dir="src/">
<include name="**/*.properties" />
</fileset>
<fileset dir="${acc.dir}/src">
<include name="**/*.properties" />
</fileset>
</copy>
<copy todir="${libs.dir}">
<fileset dir="./">
<include name="*.jar" />
</fileset>
</copy>
<jar destfile="${libs.dir}/${ant.project.name}.jar" basedir="${classes.dir}" index="true">
<manifest>
<attribute name="Main-Class" value="${main-class}" />
</manifest>
</jar>
<delete dir="${classes.dir}">
</delete>
</target>
<!--tar Setup-->
<target name="linux-setup-tar" depends="setup">
<copy todir="${setup.dir}/tar">
<fileset dir="./">
<include name="config/**" />
<include name="libs/**" />
</fileset>
</copy>
<copy todir="${linuxtar-lib.dir}">
<fileset dir="${libs.dir}">
</fileset>
</copy>
<mkdir dir="${tmp.dir}" />
<copy todir="${tmp.dir}">
<fileset dir="${setup.dir}/tar">
<exclude name=".svn/*" />
</fileset>
</copy>
<chmod file="${tmp.dir}/collaberserver" perm="+x" />
<chmod file="${tmp.dir}/collaberserverd" perm="+x" />
<tar destfile="${output.dir}/bizantra-1.0.tar" basedir="${tmp.dir}" />
<gzip destfile="${output.dir}/bizantra-1.0.tar.gz" src="${output.dir}/bizantra-1.0.tar" />
<delete dir="${tmp.dir}" />
<delete file="${output.dir}/bizantra-1.0.tar" />
</target>
<!--Windows Setup-->
<target name="win-setup" depends="setup">
<copy todir="${setup.dir}/windows">
<fileset dir="./">
<include name="libs/**" />
</fileset>
</copy>
<copy todir="${win-lib.dir}">
<fileset dir="${libs.dir}">
<include name="*.jar" />
</fileset>
</copy>
<exec command="makensis ${setup.dir}/windows/BizantraSetup.nsi">
</exec>
<copy todir="${output.dir}">
<fileset dir="${setup.dir}/windows">
<include name="BizantraSetupWithJRE.exe" />
</fileset>
</copy>
<delete>
<fileset dir="${setup.dir}/windows">
<include name="BizantraSetupWithJRE.exe" />
</fileset>
</delete>
<move todir="${output.dir}">
<fileset dir="${setup.dir}/windows">
<include name="Bizantra.exe" />
</fileset>
</move>
</target>
<target name="clean-setup" depends="clean,setup" />
<target name="setupandclean" depends="clean-setup,linux-setup-tar,win-setup" />