I have 3 projects open in my Eclipse and 2 of them are dependencies for the main one. I also have a custom build script ( made by someone else ) that I use to build my project. I would like for the build.xml file be able to include the external source files from the other projects. I have tried something like this
<path id="build.class.path">
<fileset dir="${project-root}/WebContent/WEB-INF/lib" />
<pathelement path="${classes-folder}" />
<pathelement path="E:\EclipseWorkspace\workspace\clear4-runtime-core\src" />
</path>
But no luck. I must admit my ANT and build.xml skills are low to nonexistent.
You’re adding classpath elements, not source elements.
You’d need to modify where the
javactask gets its sources from. See the javac task docs for more details, particularly anything relating to thesourcepathorsourcepathrefattributes, or thesrcelements.This said, please don’t hardcode any values like this into the build file as it ties it to a specific directory hierarchy. Provide a properties file that lets each dev assign their own values.