Thursday, May 6, 2010

import cannot be resolved...NOT

We use Ant to build GWT project. Occasionally our developers write
code comments using {@link ...} syntax to link to a class outside of
the designated client package, thus insert a "import" statement that
causes the notorious "The import ... cannot be resolved" ERROR. That
is what we expected, and the fix is easy enough; simply remove the
import.

What's interesting and we don't understand is that when we manually
run the same build.xml in Eclipse, we don't get this error and
everything compiles fine. It's like the Ant in Eclipse completely
ignore the import statement. Looking at jars included in Eclipse 3.5,
it's using Ant 1.7.1, which is the same version installed on our auto
build server.

This causes a minor problem in that developers will accidentally check
in codes that won't compile on automation server.

Here is a segment of our build script:

<target name="gwtc">
<java failonerror="true" fork="true"
classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src" />
<path refid="Gwtc.class.path" />
</classpath>
<jvmarg value="-Xmx256M" />
<arg line="${gwt.args}" />
</java>
</target>

Has anyone encountered similar issue? Any thoughts would be
appreciated. Thanks.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate