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

newly broken ant scalac/fsc tasks ??

2 replies
iztok.kucan
Joined: 2010-09-07,
User offline. Last seen 1 year 20 weeks ago.

using scala 2.9.0 with jdk 1.6.0_17 or 1.6.0_21 and ant 1.7.1 or ant
1.8.2

trivial project (single source file with 5 lines of scala)

compile:
[echo] c:\workstem\intraday\htd\trunk\jvm\dud/build
[scalac] Compiling 1 source file to c:\workstem\intraday\htd\trunk
\jvm\dud\build
[scalac] scala.tools.nsc.MissingRequirementError: object scala not
found.
[scalac] at scala.tools.nsc.symtab.Definitions$definitions
$.getModuleOrClass(Definitions.scala:514)
[scalac] at scala.tools.nsc.symtab.Definitions$definitions
$.ScalaPackage(Definitions.scala:43)
[scalac] at scala.tools.nsc.symtab.Definitions$definitions
$.ScalaPackageClass(Definitions.scala:44)
[scalac] at scala.tools.nsc.symtab.Definitions$definitions
$.UnitClass(Definitions.scala:86)
[scalac] at scala.tools.nsc.symtab.Definitions$definitions
$.init(Definitions.scala:770)
[scalac] at scala.tools.nsc.Global$Run.(Global.scala:620)
[scalac] at scala.tools.ant.Scalac.executeInternal(Scalac.scala:
643)
[scalac] at scala.tools.ant.Scalac.execute(Scalac.scala:587)
[scalac] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[scalac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[scalac] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
[scalac] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
[scalac] at java.lang.reflect.Method.invoke(Method.java:597)
[scalac] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
106)
[scalac] at org.apache.tools.ant.Task.perform(Task.java:348)
[scalac] at org.apache.tools.ant.Target.execute(Target.java:
357)
[scalac] at
org.apache.tools.ant.Target.performTasks(Target.java:385)
[scalac] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[scalac] at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[scalac] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
41)
[scalac] at
org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[scalac] at org.apache.tools.ant.Main.runBuild(Main.java:758)
[scalac] at org.apache.tools.ant.Main.startAnt(Main.java:217)
[scalac] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[scalac] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

tolsen77
Joined: 2008-10-08,
User offline. Last seen 1 year 38 weeks ago.
Re: newly broken ant scalac/fsc tasks ??
Did you remember to include scala-library.jar in classpath for both ant taskdef and scalac?

On 24 May 2011 17:22, iztok <iztok [dot] kucan [at] gmail [dot] com> wrote:
using scala 2.9.0 with jdk 1.6.0_17 or 1.6.0_21 and ant 1.7.1 or ant
1.8.2

trivial project (single source file with 5 lines of scala)


compile:
    [echo] c:\workstem\intraday\htd\trunk\jvm\dud/build
  [scalac] Compiling 1 source file to c:\workstem\intraday\htd\trunk
\jvm\dud\build
  [scalac] scala.tools.nsc.MissingRequirementError: object scala not
found.
  [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
$.getModuleOrClass(Definitions.scala:514)
  [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
$.ScalaPackage(Definitions.scala:43)
  [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
$.ScalaPackageClass(Definitions.scala:44)
  [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
$.UnitClass(Definitions.scala:86)
  [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
$.init(Definitions.scala:770)
  [scalac]     at scala.tools.nsc.Global$Run.<init>(Global.scala:620)
  [scalac]     at scala.tools.ant.Scalac.executeInternal(Scalac.scala:
643)
  [scalac]     at scala.tools.ant.Scalac.execute(Scalac.scala:587)
  [scalac]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  [scalac]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
  [scalac]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
  [scalac]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
  [scalac]     at java.lang.reflect.Method.invoke(Method.java:597)
  [scalac]     at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
106)
  [scalac]     at org.apache.tools.ant.Task.perform(Task.java:348)
  [scalac]     at org.apache.tools.ant.Target.execute(Target.java:
357)
  [scalac]     at
org.apache.tools.ant.Target.performTasks(Target.java:385)
  [scalac]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
  [scalac]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
  [scalac]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
41)
  [scalac]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1189)
  [scalac]     at org.apache.tools.ant.Main.runBuild(Main.java:758)
  [scalac]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
  [scalac]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
  [scalac]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

iztok.kucan
Joined: 2010-09-07,
User offline. Last seen 1 year 20 weeks ago.
Re: newly broken ant scalac/fsc tasks ??

yes, but stupidly, i had scala (2.8.1) in my ant lib path....

when i clean up, it works well

apologies for the noise...

On May 24, 7:02 pm, Trond Olsen wrote:
> Did you remember to include scala-library.jar in classpath for both ant
> taskdef and scalac?
>
> On 24 May 2011 17:22, iztok wrote:
>
>
>
> > using scala 2.9.0 with jdk 1.6.0_17 or 1.6.0_21 and ant 1.7.1 or ant
> > 1.8.2
>
> > trivial project (single source file with 5 lines of scala)
>
> > compile:
> >     [echo] c:\workstem\intraday\htd\trunk\jvm\dud/build
> >   [scalac] Compiling 1 source file to c:\workstem\intraday\htd\trunk
> > \jvm\dud\build
> >   [scalac] scala.tools.nsc.MissingRequirementError: object scala not
> > found.
> >   [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
> > $.getModuleOrClass(Definitions.scala:514)
> >   [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
> > $.ScalaPackage(Definitions.scala:43)
> >   [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
> > $.ScalaPackageClass(Definitions.scala:44)
> >   [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
> > $.UnitClass(Definitions.scala:86)
> >   [scalac]     at scala.tools.nsc.symtab.Definitions$definitions
> > $.init(Definitions.scala:770)
> >   [scalac]     at scala.tools.nsc.Global$Run.(Global.scala:620)
> >   [scalac]     at scala.tools.ant.Scalac.executeInternal(Scalac.scala:
> > 643)
> >   [scalac]     at scala.tools.ant.Scalac.execute(Scalac.scala:587)
> >   [scalac]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> >   [scalac]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >   [scalac]     at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 39)
> >   [scalac]     at
>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp­l.java:
> > 25)
> >   [scalac]     at java.lang.reflect.Method.invoke(Method.java:597)
> >   [scalac]     at
> > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
> > 106)
> >   [scalac]     at org.apache.tools.ant.Task.perform(Task.java:348)
> >   [scalac]     at org.apache.tools.ant.Target.execute(Target.java:
> > 357)
> >   [scalac]     at
> > org.apache.tools.ant.Target.performTasks(Target.java:385)
> >   [scalac]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
> >   [scalac]     at
> > org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >   [scalac]     at
>
> > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.­java:
> > 41)
> >   [scalac]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1189)
> >   [scalac]     at org.apache.tools.ant.Main.runBuild(Main.java:758)
> >   [scalac]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
> >   [scalac]     at
> > org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> >   [scalac]     at
> > org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)- Hide quoted text -
>
> - Show quoted text -

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