This page is no longer maintained — Please continue to the home page at www.scala-lang.org

maven-scala plugin not able to build scala on some projects

1 reply
Tommy Chheng
Joined: 2010-03-06,
User offline. Last seen 1 year 23 weeks ago.

Hi,
One of my colleagues is having trouble compiling a scala project with
the maven scala plugin.
We are using mac osx lion 10.7.2 with maven-scala 2.15.2/maven 3.0.3
and scala 2.9.1 This project currently works on my mac.

Oddly, my colleague can compile another scala 2.9.1 project correctly.
Below is the stack trace, what can cause this type of error? It's the
first time i've seen this.

[ERROR] error: error while loading , error in opening zip
file[ERROR] error: scala.tools.nsc.MissingRequirementError: object
scala not found.[INFO] at
scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:655)[INFO]
at scala.tools.nsc.symtab.Definitions$definitions$.getModule(Definitions.scala:605)[INFO]
at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackage(Definitions.scala:145)[INFO]
at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackageClass(Definitions.scala:146)[INFO]
at scala.tools.nsc.symtab.Definitions$definitions$.AnyClass(Definitions.scala:176)[INFO]
at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:814)[INFO]
at scala.tools.nsc.Global$Run.(Global.scala:697)[INFO] at
scala.tools.nsc.Main$.process(Main.scala:105)[INFO] at
scala.tools.nsc.Main$.main(Main.scala:123)[INFO] at
scala.tools.nsc.Main.main(Main.scala)[INFO] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[INFO] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[INFO]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[INFO]
at java.lang.reflect.Method.invoke(Method.java:597)[INFO] at
org_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:161)[INFO]
at org_scala_tools_maven_executions.MainWithArgsInFile.main
The pom build section:

org.scala-tools
maven-scala-plugin
2.15.2

compile
testCompile

${scala.compiler.version}
${project.build.sourceEncoding}
${project.build.sourceEncoding}

-optimise
-unchecked
-deprecation

org.apache.maven.plugins
maven-compiler-plugin
2.3.2

${project.build.sourceEncoding}
1.6
1.6
true

* please don't suggest convert to sbt :)

Peter Kwan
Joined: 2011-12-22,
User offline. Last seen 42 years 45 weeks ago.
Re: maven-scala plugin not able to build scala on some projects

Hi Tommy, are you able to find the solution to this problem that you posted?

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland