1

Note: even though this question involves GWT, it's really an Ant question. All I'm asking is: is the Ant PATH that I have below a "legal" path?

I am getting ClassNotFoundExceptions on a type (com.google.gwt.dev.Compiler) that is packaged inside gwt-dev.jar (which as you can see is configured to be on the path below). Does the gwt.path look wrong to anyone:

<path id="gwt.path">
    <pathelement location="${gen.bin.main.dir}"/>
    <fileset dir="${gen.lib.main.dir}">
        <filename name="gin-2.1.2.jar"/>
        <filename name="guice-3.0.0.jar"/>
        <filename name="guice-assistedinject-3.0.0.jar"/>
        <filename name="gwt-bootstrap-2.2.2.jar"/>
        <filename name="gwt-bootstrap-sources-2.2.2.jar"/>
        <filename name="gwt-dev.jar"/>
        <filename name="gwt-user.jar"/>
        <filename name="javax-inject-1.0.0.jar"/>
        <filename name="requestfactory-apt.jar"/>
        <filename name="requestfactory-client+src.jar"/>
        <filename name="validation-api-1.0.0.GA.jar"/>
        <filename name="validation-api-1.0.0.GA-sources.jar"/>
    </fileset>
</path>

If now then I will explore other avenues.

IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756

2 Answers2

1

To see if an ant path is correct use the ant touch command:

<touch file="myfile"/>

This is similar to the unix touch command and should create an empty file named myfile in that path, if the path is correct.

In this case, are you trying to add some jars to the classpath? In that case you should use the classpath element and not path.

Angular University
  • 42,341
  • 15
  • 74
  • 81
  • Thanks @jhadesdev (+1) - but when I change the outer `` to `` (and same for its closing tag) I get a new error: `BUILD FAILED /home/myUser/MyProj/build.xml:81: Problem: failed to create task or type classpath Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any / declarations have taken place.` Thoughts? – IAmYourFaja Dec 08 '13 at 22:58
  • @TicketMonster What's your version of Ant? – Thomas Broyer Dec 09 '13 at 09:09
0

I figured it out. It was bad Ant. All the <fileset> elements need to be <pathelement location="the-jar"/> instead.

IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756