从源代码编译scala时,ant无法按预期运行

时间:2013-07-06 07:07:46

标签: java scala ant build compilation

我正在尝试编译scala编译器套件。不是scala源文件。 scala编译器本身。我从github下载了scala源代码,自述文件没有帮助。

我安装了ant并在scala源目录的根目录中运行ant。 但它显示错误......我是蚂蚁构建系统的新手。这是第一次。善意的帮助。不要告诉我从存储库安装scala。我真的想编译。提前谢谢。

    arulmozhi@koparakesari:~/repo/scala-stuff/scala-master
    $ ant build
    Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar
    Buildfile: /home/arulmozhi/repo/scala-stuff/scala-master/build.xml

    desired.jars.uptodate:

    boot:

    init:
    Unable to obtain resource from /home/arulmozhi/repo/scala-stuff/scala-master/lib/ant/ant-contrib.jar: java.util.zip.ZipException: error in opening zip file
      [taskdef] Unable to obtain resource from /home/arulmozhi/repo/scala-stuff/scala-master/lib/ant/ant-contrib.jar: 
      [taskdef] java.util.zip.ZipException: error in opening zip file
      [taskdef]     at java.util.zip.ZipFile.open(Native Method)
      [taskdef]     at java.util.zip.ZipFile.<init>(ZipFile.java:131)
      [taskdef]     at java.util.jar.JarFile.<init>(JarFile.java:150)
      [taskdef]     at java.util.jar.JarFile.<init>(JarFile.java:114)
      [taskdef]     at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1002)
      [taskdef]     at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:145)
      [taskdef]     at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:109)
      [taskdef]     at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:949)
      [taskdef]     at org.apache.tools.ant.AntClassLoader.getNamedResources(AntClassLoader.java:918)
      [taskdef]     at org.apache.tools.ant.loader.AntClassLoader5.getResources(AntClassLoader5.java:56)
      [taskdef]     at org.apache.tools.ant.taskdefs.Definer.resourceToURLs(Definer.java:375)
      [taskdef]     at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:267)
      [taskdef]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      [taskdef]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      [taskdef]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [taskdef]     at java.lang.reflect.Method.invoke(Method.java:616)
      [taskdef]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      [taskdef]     at org.apache.tools.ant.Task.perform(Task.java:348)
      [taskdef]     at org.apache.tools.ant.Target.execute(Target.java:390)
      [taskdef]     at org.apache.tools.ant.Target.performTasks(Target.java:411)
      [taskdef]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      [taskdef]     at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      [taskdef]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      [taskdef]     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      [taskdef]     at org.apache.tools.ant.Main.runBuild(Main.java:809)
      [taskdef]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
      [taskdef]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
      [taskdef]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
      [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
    Unable to obtain resource from /home/arulmozhi/repo/scala-stuff/scala-master/lib/ant/maven-ant-tasks-2.1.1.jar: java.util.zip.ZipException: error in opening zip file
      [typedef] Unable to obtain resource from /home/arulmozhi/repo/scala-stuff/scala-master/lib/ant/maven-ant-tasks-2.1.1.jar: 
      [typedef] java.util.zip.ZipException: error in opening zip file
      [typedef]     at java.util.zip.ZipFile.open(Native Method)
      [typedef]     at java.util.zip.ZipFile.<init>(ZipFile.java:131)
      [typedef]     at java.util.jar.JarFile.<init>(JarFile.java:150)
      [typedef]     at java.util.jar.JarFile.<init>(JarFile.java:114)
      [typedef]     at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1002)
      [typedef]     at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:145)
      [typedef]     at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:109)
      [typedef]     at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:949)
      [typedef]     at org.apache.tools.ant.AntClassLoader.getNamedResources(AntClassLoader.java:918)
      [typedef]     at org.apache.tools.ant.loader.AntClassLoader5.getResources(AntClassLoader5.java:56)
      [typedef]     at org.apache.tools.ant.taskdefs.Definer.resourceToURLs(Definer.java:375)
      [typedef]     at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:267)
      [typedef]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      [typedef]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      [typedef]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [typedef]     at java.lang.reflect.Method.invoke(Method.java:616)
      [typedef]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      [typedef]     at org.apache.tools.ant.Task.perform(Task.java:348)
      [typedef]     at org.apache.tools.ant.Target.execute(Target.java:390)
      [typedef]     at org.apache.tools.ant.Target.performTasks(Target.java:411)
      [typedef]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      [typedef]     at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      [typedef]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      [typedef]     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      [typedef]     at org.apache.tools.ant.Main.runBuild(Main.java:809)
      [typedef]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
      [typedef]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
      [typedef]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
      [typedef] Could not load definitions from resource org/apache/maven/artifact/ant/antlib.xml. It could not be found.

    BUILD FAILED
    /home/arulmozhi/repo/scala-stuff/scala-master/build.xml:208: Problem: failed to create task or type if
    Cause: The name is undefined.
    Action: Check the spelling.
    Action: Check that any custom tasks/types have been declared.
    Action: Check that any <presetdef>/<macrodef> declarations have taken place.


    Total time: 1 second

0 个答案:

没有答案