Scala projects with Eclipse PDE Build (2)

Some time ago I wrote about how to let Eclipse PDE Build automatically compile Scala projects. Therefore a special Ant script (customBuildCallbacks.xml) had to be created in the project’s root directory. This script looked for the Scala library and compiler and then built the project’s source files.

This method still works. The OSGi bundles containing the Scala library and compiler are delivered together with the Scala IDE for Eclipse. This project is now not affiliated with the EPFL anymore and is developed mostly independently from the Scala tool chain. Hence, the OSGi bundle names have changed and so the Ant script from my previous post does not work anymore.

The following things have to be changed:

  • The symbolic name of the Scala library OSGi bundle now starts with org.scala-ide.scala.library_
  • The compiler is now provided by a bundle whose name starts with org.scala-ide.scala.compiler_
  • The Scala Ant task now resides in scala-compiler.jar which is provided by the compiler bundle

I created a new script that can be downloaded here:

customBuildCallbacks.xml (4.0 KiB)