After migrating to Spoofax 1.3, I’m unable to build a language on the command-line. If I try mvn clean verify with a newly generated Entity language, I get the following error:

	[INFO] ------------------------------------------------------------------------
	[INFO] ------------------------------------------------------------------------
	[INFO] Total time: 23.514s
	[INFO] Finished at: Fri Nov 14 17:03:21 PST 2014
	[INFO] Final Memory: 92M/1462M
	[INFO] ------------------------------------------------------------------------
	[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (spoofax-generate-sources) on project Ent: An Ant BuildException has occured: The following error occurred while executing this line:
	[ERROR] /home/oskar/workspace/Ent/build.generated.xml:509: The following error occurred while executing this line:
	[ERROR] /home/oskar/workspace/Ent/build.generated.xml:561: Java returned: 1
	[ERROR] around Ant part ...<ant antfile="build.main.xml" inheritRefs="true">... @ 9:52 in /home/oskar/workspace/Ent/target/antrun/build-main.xml
	[ERROR] -> [Help 1]
	[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
	[ERROR] Re-run Maven using the -X switch to enable full debug logging.
	[ERROR] For more information about the errors and possible solutions, please read the following articles:
	[ERROR] [Help 1]

(Line 561 invokes org.strategoxt.strj.Main.)

Also, documentation on how to build an Eclipse update site is missing and doing it the old way doesn’t work anymore.

If someone could provide some insights on how to build an Eclipse update site, that would be really useful.

Submitted by Oskar van Rest on 15 November 2014 at 02:26

On 15 November 2014 at 02:26 Oskar van Rest tagged regression

On 20 November 2014 at 09:46 Gabriël Konat commented:

You need to show more of build output, particularly the last ant build output, since the error is generated inside ant.

On 20 November 2014 at 19:24 Oskar van Rest commented:

It works now when I do mvn verify instead of mvn clean verify. mvn clean removes all files in src-gen but those files are not re-generated from the command-line. That is still only possible from within Eclipse right?

Should I update the documentation to say mvn verify instead of mvn clean verify and explain that src-gen should be generated from within Eclipse beforehand?

Also, what about building an Eclipse update site?

On 21 November 2014 at 00:08 Oskar van Rest commented:

Seems like mvn clean is necessary for mvn verify to work: if I don’t do mvn clean, then mvn verify won’t create directory builddeps.

My solution now is:

mv src-gen/ src-gen_temp/
mvn clean
mv src-gen_temp/ src-gen/
mvn verify

On 21 November 2014 at 14:13 Gabriël Konat commented:

Cleaning removing src-gen is still an issue indeed, because we cannot run the on-save handler for languages on the command-line yet. To work around this, add the following plugin execution to your language’s POM file:

<!-- Hack to prevent the src-gen folder from being cleaned. Since the build cannot run meta-languages such as SDF3, the
  src-gen folder is committed to the git repository. The clean goal will clean the src-gen folder, temporarily renaming
  it will prevent that. This hack overrides the spoofax-clean antrun execution from the parent POM. -->
          <move file="src-gen" tofile="src-gen-keep" />
          <ant antfile="build.main.xml" inheritRefs="true">
            <target name="clean" />
          <move file="src-gen-keep" tofile="src-gen" />

Then you should be able to run mvn clean verify normally.

On 21 November 2014 at 20:04 Oskar van Rest commented:

Ok thanks.

On 21 November 2014 at 20:04 Oskar van Rest closed this issue.

Log in to post comments