I wonder if it wouldn't be wiser to have the cast in the ``ScalaProject.javaProject`` implementation. WDYT?