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

On 4 January 2013 at 13:56 Vlad Vergu tagged @vvergu

On 8 January 2013 at 13:03 Eelco Visser tagged 1.1

On 30 January 2013 at 12:54 Vlad Vergu tagged minor

On 30 January 2013 at 12:55 Vlad Vergu tagged client

On 31 January 2013 at 21:15 Vlad Vergu commented:

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:

  1. build.main.external.xml a clone of build.main.xml but for use in builds outside of Eclipse.
  2. build.generated.external.xml a subset/modification of build.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 file build.generated.external.xml. This will signal Spoofax to generate the external builders.
2. Rebuild the project.
3. Run the utils-files target contributed by build.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 the build.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:

  1. The sdf2table executable is available on the PATH
  2. The implodePT executable is available on the PATH

On 31 January 2013 at 21:15 Vlad Vergu closed this issue.

On 31 January 2013 at 21:16 Vlad Vergu commented:

The procedure above is documented in the WIKI here.

Log in to post comments