I have added a new variable to the build path for a library in eclipse. My library correctly shows up in eclipse under "Referenced Libraries" and all project errors have gone away from the library missing. Although when I build the project from the command line with "ant build" the compile fails because the libraries are not included.
Is there a separate configuration file for the ant classpath vs the eclipse classpath?
Building from Eclipse and ant build are two different processes. Eclipse uses .classpath file to store the references. For ant, you have to add the required dependencies to the classpath using classpath or path task in ant build file. You can check install-staging/build.xml for examples using path task.
To add new SDK jars to a Studio project is a two step process.
1) Add the jar to the classpath inside eclipse to the referenced libraries. Eclipse should then be happy although ant builds will still fail. Here is an example. See the entry near the bottom.
C:viewsFDPE-mainappsFDPE.classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="private-src"/>
<classpathentry kind="src" path="test-src"/>
<classpathentry kind="src" path="build/gen-src"/>
<classpathentry kind="src" path="build/private-gen-src"/>
<classpathentry kind="src" path="build/regen-dao"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/OBOE.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/axis.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/commons-codec.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/commons-collections-3.2.1.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/commons-discovery-0.2.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/commons-httpclient.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/commons-logging-1.0.4.jar"/>
<classpathentry kind="lib" path="plt-classes/platform-api"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/fop.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/itext-1.4.5.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/jaxb-api.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/jaxb-impl.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/jsr173_1.0_api.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/jsr311.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/jersey-multipart.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/jaxb-xjc.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/jaxrpc.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/jbossall-client.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/joda-time-1.2.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/json.jar" sourcepath="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/json.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/log4j.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/mail.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/namespace.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/poi.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/poi-ooxml.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/javax.servlet.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/javax.servlet.jsp.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/struts.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/relaxngDatatype.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/wsdl4j.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/cxf.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/xalan.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/xsdlib.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/aspectjrt-1.2.1.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/cactus-1.7.2.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/cactus-ant-1.7.2.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/cargo-0.5.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/nekohtml-0.9.1.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/junit.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/freemarker-2.3.8.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/ognl-2.6.11.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/struts2-core-2.0.6.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/strutstest-2.1.2.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/xwork-2.0.2.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/spring-context.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/spring-core.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/spring-tx.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/selenium.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/selenium-srcs.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/selenium-guava.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/selenium-jna.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/selenium-httpcore.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.transcendsys.platform.studio_1.0.0/selenium-httpclient.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/DoDCore"/>
<classpathentry kind="var" path="THIRD_PARTY/zip4j/1.3.1/zip4j_1.3.1.jar"/>
<classpathentry kind="output" path="build-eclipse"/>
</classpath>
2) You do not need to add your jar to an ant classpath. You need to set up an ant target to copy the jar to a directory which will get read during ant builds that contains all the jars. Also include this target as a prerequisite for the build. Here is an example where "zip4j" is added.
C:viewsFDPE-mainappsFDPEuild.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="FDPE" default="build" basedir=".">
<xmlproperty file="module-descriptor.xml"/>
<property file="local.properties"/>
<property file="${sdk.plugin.home}/proj-static/build.properties"/>
<property file="${install.root.dir}/../local.properties"/>
<import file="${sdk.plugin.home}/proj-static/base-build.xml"/>
<!--
See the Outline view for a list of possible build tasks to execute.
Commonly executed tasks include "build", "unit-test", "server-test" and "clean".
Before executing "unit-test" or "server-test", you must add junit.jar
to Ant's classpath.
-->
<!--
You may define new targets or override existing targets here.
If you need to add custom steps to the default 'build' target, create a new target called 'build' and set its 'depends' attribute to 'base-build'.
This will ensure that the build target continues to execute all the default targets required to build your module. Then you can add additional
targets or tasks to that target which are specific to your module.
-->
<target name="build" depends="deployZip4j,base-build" description="Override 'build' target">
</target>
<!--
Deploy the Zip4j SDK jar so that it is in the classpath
-->
<fileset id="zip4j.jar.fileset" dir="${third-party.root.dir}/zip4j/1.3.1">
<include name="zip4j_1.3.1.jar"/>
</fileset>
<target name="deployZip4j" description="Copy zip4j SDK needed for application to deploy directories">
<copy todir="${jboss.server.dir}/deploy/dvce.ear/dvce.jar/lib" overwrite="true">
<fileset refid="zip4j.jar.fileset"/>
</copy>
<copy todir="${deploy.war.dir}/WEB-INF/lib" overwrite="true">
<fileset refid="zip4j.jar.fileset"/>
</copy>
<copy todir="${studio.plugin.home}/" overwrite="true">
<fileset refid="zip4j.jar.fileset"/>
</copy>
</target>
</project>