Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 603735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:57:48+00:00 2026-05-13T16:57:48+00:00

I’ve been using GWT for quite some time now and have only used the

  • 0

I’ve been using GWT for quite some time now and have only used the eclipse plugin to compile my projects so far. Due to a new requirement I need to use an ant build (for the first time) to build a gwt project. First I’ll say that I have 2 modules which have an entry point and 2 other common modules which only contain java classes (which should be translated to js) and they sit in a different project in my workspace.

Currently I have the GWT project which requires the Common project which in turn requires the DAL project (when I say require I mean that it is so defined in the eclipse project build path). In my GWT project I have, in an appropriate location, a Common.gwt.xml and DAL.gwt.xml files which define those as modules and my ModuleEntryPoint.gwt.xml inherits those two modules (in addition to other modules). When I currently use the gwt eclipse plugin to compile everything works well.

However when I tried to simulate this with the ant build the compilation of my ModuleEntryPoint fails as the compiler says it cannot find sources for classes which belong to DAL module or Common module.

The ant build code is very basic as this is my first attemp.
Thanks in advance for any help granted.

    <path id="compile.classpath">
    <fileset dir="${build.dir.WEB-INF.lib}">
                <include name="**/*.jar" />
                <include name="**/*.xml" />
    </fileset>
    <fileset dir="${ExternalLib.WebServer.dir}">
            <include name="**/*.jar" />
            <include name="**/*.xml" />
    </fileset>

    <fileset dir="${GWT.dir}">
            <include name="**/*.jar" />
            <include name="**/*.dll" />
    </fileset>

</path>

<target name="clear_previous_war">
<delete dir="${build.dir}" />
<mkdir dir="${build.dir.WEB-INF.classes}"/>
<mkdir dir="${build.dir.WEB-INF.lib}"/>

<target name="build_common" >
    <jar destfile="${build.dir.WEB-INF.lib}/${jar.common}"
        basedir="${common.dir.build}"
        includes="com/**"
        excludes="**/.svn"
      />    
</target>

<target name="build_dal" >
    <jar destfile="${build.dir.WEB-INF.lib}/${jar.dal}"
        basedir="${dal.dir.build}"
        includes="com/**"
        excludes="**/.svn"
      />    
</target>

<target name="copy_additional_files" >
    ... Copies all required external jars to web-inf/lib
</target>

<target name="compile_web_classes" >
    <javac srcdir="src" classpathref="compile.classpath"
    destdir="${build.dir.WEB-INF.classes}"
            source="1.6"/>  
</target>

<target name="compile_gwt_button"  description="GWT compile to JavaScript">
                <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
                        <classpath>
                                <pathelement location="${src.dir}" />
                                <path refid="compile.classpath" />                  
                        </classpath>
                        <jvmarg value="-Xmx256M" />
                        <arg value="com.myCompany.web.Button" />
                </java>
 </target>

<target name="deploy" description="Build web project">
    <antcall target="clear_previous_war" />
    <antcall target="build_common" />
    <antcall target="build_dal" />
    <antcall target="copy_additional_files" />
    <antcall target="compile_web_classes" />
    <antcall target="compile_gwt_button" />
</target>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:57:48+00:00Added an answer on May 13, 2026 at 4:57 pm

    In the compile-gwt task I didn’t give him the path to the sources of the common modules (../Common/src etc) so I’ve added it and it works.
    Something like:

    <classpath>
        <pathelement location="src"/>
        <pathelement location="../Common/src"/>
        <path refid="gwt.compile.classpath"/>
      </classpath>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.