Your project definitions look fine. Are you sure your classes are public / accessible from another package?
alex On Tue, Jul 5, 2011 at 4:17 PM, Ian Nowland <[email protected]> wrote: > Hi all, > > I'm trying to build a project in scala that has some java dependencies from > another subproject, but for some reason I get a "class cannot be accessed" > error. Can anyone tell me what I'm doing wrong? > > Here's what the relevant portion of my build file looks like: > > define 'Project' do > > project.version = VERSION_NUMBER > project.group = 'ianne' > > desc 'Common classes between server and client code' > define 'Common' do > compile > package :jar > end > > define 'Server' do > compile.with JERSEY,ASM,projects('Common') > #compile.using projects('Common') > > package(:war).with :libs=>projects('Common') > > task("run"=>[package(:war), jetty.use]) do |task| > jetty.deploy("http://localhost:8080", task.prerequisites.at(2)) > puts 'Press CTRL-C to stop Jetty' > trap 'SIGINT' do > jetty.stop > end > Thread.stop > end > > end > > doc projects > > end > > When scala classes in the Server project reference java classes in the > Common package, the error looks like this: > > Building Project > Compiling Project:Server into /projects/Project/Server/ > target/classes > Recompiling 1 files > /projects/Project/Server/src/main/scala/ianne/gameobjects/Game.scala:9: > error: class Map cannot be accessed in package ianne.dataobjects > val Map = new Map() > ^ > one error found > Buildr aborted! > RuntimeError : Failed to compile, see errors above > > Any help is appreciated. Thank you. > > --Ian >
