views:

186

answers:

2

The Eclipse build for my 1.6 application project is succeeding and the Ant build is failing. I'm looking for help on why they aren't behaving the same way.

We are developing on Mac OSX 10.5.8 with Eclipse 3.5 against SDK 1.6 + Google APIs. There are no setting changes in Eclipse, either at workspace or project level. Similarly, our ant is also a vanilla- flavored unmodified installation of 1.7.1. JDK is 1.5.0_22. The CLASSPATH environment variable is not set. JAVA_HOME is /Library/Java/ Home

The application was initially created by a team member using the Eclipse plugins. The application references two jar files, one of which has a dependency on javax.xml.bind.annotation.XmlSeeAlso, which is not defined anywhere in our code or in android.jar. The other jar file has an explicit dependency on android.jar. I generated the Ant build file using android update.

The Eclipse project builds an apk and runs the application in the emulator. I think this is incorrect behavior.

The Android ant project fails to build. I think this is correct behavior. MyClass.java:98: cannot access javax.xml.bind.annotation.XmlSeeAlso [javac] file javax/xml/bind/annotation/XmlSeeAlso.class not found

Any ideas as to why the two build methods are behaving differently? I would expect them both to fail.

Thanks!

-Amy

A: 
Christopher
A: 

One of the jars has a dependency on a Java class that is not present in Android Java. The the Eclipse Android compilation shouldn't be working - after all, one major point of compilation is to resolve dependencies. Yet this incorrect code is compiling.

All existing jar dependencies are loaded by both Eclipse and Ant.

Amy Winarske