I have a job in Jenkins which builds a repository for a certain feature bundle. The primary plugin contains many Xtend 2 classes. As I did not commit the generated Java files into the Git repository I am trying to start the Xtend 2 build during this job. This should work by calling a certain class with the <java> ant command, like shown in this forum thread: http://www.eclipse.org/forums/index.php/m/792243/ (which seems to refer to https://bugs.eclipse.org/bugs/show_bug.cgi?id=342759).
To make the class org.eclipse.xtext.xtend2.compiler.batch.Main available there is a plugin named org.eclipse.xtext.xtend2.standalone. But unfortunately there exists no feature for it, therefore I installed the Xtend sdk instead (which includes the class, too):
./buckminster install http://download.eclipse.org/releases/juno/ org.eclipse.xtend.sdk
Which seemed to work fine so far.
Here is what I have currently configured for the build job:
<?xml version="1.0" encoding="UTF-8"?>
xmlns="http://www.eclipse.org/buckminster/CSpec-1.0" componentType="eclipse.feature" version="1.0.0">
<dependency name="org.eclipse.rcp" componentType="eclipse.feature"/>
<dependency name="org.eclipse.xtext.xtend2.standalone" componentType="osgi.bundle"/>
<dependency name="org.eclipse.xtext.xtend2.lib" componentType="osgi.bundle"/>
<dependency name="org.aopalliance" componentType="osgi.bundle"/>
<!-- trigger Xtend2 builder -->
<public name="compile.xtend.classes" actor="ant">
<property key="buildFile" value="build.xml" />
<property key="targets" value="compile.xtend.classes" />
<path path="dummy_output/" />
<project name="project" basedir=".">
<target name="compile.xtend.classes" description="Compile Xtend 2 classes to Java classes">
<echo>Compiling Xtend 2 classes to Java classes</echo>
The job execution results in the following error:
[ant] Compiling Xtend 2 classes to Java classes
[ant] Could not find org.eclipse.xtext.xtend2.compiler.batch.Main. Make sure you have it in your classpath
So I guess that I have to reference the classpath somehow:
<java classpathref="mycp" classname="org.eclipse.xtext.xtend2.compiler.batch.Main">
But how can I find out the correct class path? How to specify the headless Buckminster environment or the target platform for that?
Or is my approach already wrong and I must use some jar files to make the Xtend class known?
This whole problem expresses that I obviously never did really understand yet how custom ant task are configured properly within Buckminster.
Thanks for any help.
Merry Christmas to all of you!
[Updated on: Fri, 21 December 2012 12:04]
Report message to a moderator