I get compile errors when compiling valid code against a Java model enhanced with JDO. I am confused at the errors because there is no direct usage of the package private static member interfaces in question from Scala. I understand Scala doesn't support using such interfaces from Scala code, but I am confused that the Scala compiler complains about them.
Here is the error I am getting:
[scalac] Compiling 3 scala and 196 java source files to /home/alain/Documents/Project/build/model/src
[scalac] error: error while loading Error, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/error/Error.class)
[scalac] error: error while loading Binder, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/attachment/Binder.class)
[scalac] error: error while loading Journal, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/note/Journal.class)
[scalac] error: error while loading Exemption, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/exemption/Exemption.class)
[scalac] error: error while loading Flag, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/flag/Flag.class)
[scalac] error: error while loading ConfigurationGroup, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/configuration/ConfigurationGroup.class)
[scalac] error: error while loading IssueConfiguration, Missing dependency 'class javax.jdo.spi.PersistenceCapable$ObjectIdFieldSupplier', required by /home/alain/Documents/Project/model/dist/model.jar(model/analysis/configuration/IssueConfiguration.class)
[scalac] 7 errors found
Here is the Ant snippet I use to compile:
<target name="compile" depends="jar">
<depend srcdir="src" destdir="${src.classes.dir}" cache="${build.dir}/src_dependencies" />
<scalac srcdir="src" destdir="${src.classes.dir}" classpathref="src.build.classpath">
<include name="**/*.scala"/>
<include name="**/*.java"/>
</scalac>
<javac srcdir="src" destdir="${src.classes.dir}" source="1.6" target="1.6" nowarn="on"
debug="on" encoding="UTF-8" classpathref="src.build.classpath" />
</target>
model.jar with the enhanced classes is on src.build.classpath.
I don't understand why scalac cares about dependencies of Java classes it can't resolve if they don't affect the knowledge to compile my Scala source.
Interestingly IntelliJ's Scala Plug-in is able to compile and run this code.