Add classpath ref to build.generated.xml
The targets used in build.generated.xml should use a non-default classpath that is created in build.main.xml and extends the default classpath. This will allow discovery of jars in builds outside of Eclipse.
Submitted by Vlad Vergu on 4 January 2013 at 13:56
Issue Log
The point of this issue was to make building plugins outside of Eclipse easier/possible.
Unfortunately simply adding a custom class path as suggested by the issue description breaks the dynamic loading feature of Spoofax. Since the entire build process is going to be revised in the future it is not worth investing much time in the current build process.
The following workaround is implemented as of r25865.
Two extra Ant build files are generated optionally:
build.main.external.xml
a clone ofbuild.main.xml
but for use in builds outside of Eclipse.build.generated.external.xml
a subset/modification ofbuild.generated.xml
containing the necessary class paths for building outside of Eclipse.This results in two couples of Ant build files. One couple (the ones without external in the name) remains unchanged and is used by builds in Eclipse, and the other can be used from command line.
To build a project outside of Eclipse:
1. Create an empty filebuild.generated.external.xml
. This will signal Spoofax to generate the external builders.
2. Rebuild the project.
3. Run the utils-files target contributed bybuild.main.xml
once. This will create a directory utils and pull in some Jar files and StrategoMix.def, which are needed later.
4. Call the all target in thebuild.main.external.xml
file.Steps 1-3 need to be run in Eclipse. Step 4 is the build outside of Eclipse.
Building outside of Eclipse has at least the following two requirements:
- The
sdf2table
executable is available on the PATH- The
implodePT
executable is available on the PATH
The procedure above is documented in the WIKI here.
Log in to post comments