Apache Ant 未能为 OpenIMSCore 的 FHoSS 制作目录



我正在尝试在我的Ubuntu 14.04 LTS Linux计算机上编译OpenIMSCore的物理版本。我已经按照 cnd 网站上指定的说明进行操作。为了验证我是否拥有所有必要的必需程序和库,这里有一个文本文件概述了我正在使用的所需程序的所有不同版本。这个问题似乎和这个问题很相似,只是我的目录没能做,他没能找到目录。

为了确保我提供最佳数量的可用信息,这里是 我在终端中预制ant clean操作后的调试信息:

/opt/OpenIMSCore/FHoSS$ ant compile -d
Apache Ant(TM) version 1.9.3 compiled on April 8 2014
Trying the default build file: build.xml
Buildfile: /opt/OpenIMSCore/FHoSS/build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.7 in: /usr/lib/jvm/java-7-openjdk-amd64/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file -> /opt/OpenIMSCore/FHoSS/build.xml
Setting ro project property: ant.file.type -> file
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /opt/OpenIMSCore/FHoSS/build.xml with URI = file:/opt/OpenIMSCore/FHoSS/build.xml
Setting ro project property: ant.project.name -> FHoSS Project
Adding reference: FHoSS Project
Setting ro project property: ant.project.default-target -> compile
Setting ro project property: ant.file.FHoSS Project -> /opt/OpenIMSCore/FHoSS/build.xml
Setting ro project property: ant.file.type.FHoSS Project -> file
Project base dir set to: /opt/OpenIMSCore/FHoSS
+Target: 
+Target: init
+Target: compile
+Target: jars
+Target: config
+Target: script
+Target: deploy
+Target: jdoc
+Target: example
+Target: clean
+Target: cleanall
+Target: deb
Adding reference: ant.LocalProperties
parsing buildfile jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
[property] Loading /opt/OpenIMSCore/FHoSS/build.properties
Setting project property: path.deploy -> deploy
Setting project property: path.src -> /opt/OpenIMSCore/FHoSS/src
Setting project property: path.srcweb -> /opt/OpenIMSCore/FHoSS/src-web
Setting project property: path.build -> /opt/OpenIMSCore/FHoSS/bin
Setting project property: path.doc -> /opt/OpenIMSCore/FHoSS/docs
Setting project property: path.webdest -> /opt/OpenIMSCore/FHoSS/deploy/webapps/hss.web.console
Setting project property: path.log -> /opt/OpenIMSCore/FHoSS/deploy/logs
Setting project property: path.config -> /opt/OpenIMSCore/FHoSS/deploy
Setting project property: path.script -> /opt/OpenIMSCore/FHoSS/deploy
Setting project property: path.example -> /opt/OpenIMSCore/FHoSS/deploy/examples
Setting project property: compile.debug -> true
Setting project property: compile.deprecation -> true
Setting project property: compile.optimize -> true
Adding reference: compile.classpath
Setting ro project property: ant.project.invoked-targets -> compile
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `compile' is [init, compile]
Complete build sequence is [init, compile, jars, config, script, deploy, example, jdoc, deb, cleanall, clean, ]
init:
Setting project property: DSTAMP -> 20170707
Setting project property: TSTAMP -> 1523
Setting project property: TODAY -> July 7 2017
BUILD FAILED
/opt/OpenIMSCore/FHoSS/build.xml:36: Directory /opt/OpenIMSCore/FHoSS/bin creation was not successful for an unknown reason
at org.apache.tools.ant.taskdefs.Mkdir.execute(Mkdir.java:70)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 0 seconds

这是cnd提供的build.xml文件:由于它的大小以及这篇文章已经很长的事实,我把它放在Google云端硬盘上。Apache Ant 应该失败的点是第 36 行,即 mkdir 命令:

<target name="init">
<tstamp/>
<mkdir dir="${path.build}" />
</target>

我希望这足够清楚,有人可以帮助我。我对 Apache Ant 相当陌生,所以请耐心等待,但我可以尽我所能提供调试此问题所需的任何其他内容。

Apache Ant和构建都没有错.xml。

按照这个论坛帖子的建议,我要自己创建一个目录。然后我意识到我正在编译的文件夹:

privateusername@privatecomputername-Dimension-E521:/opt/OpenIMSCore/FHoSS$
由于我在">

opt">文件夹中,这要求我在启动"ant compile"命令时使用 root 帐户或使用"sudo",特别是如果 xml 文件包含"mkdir"命令。我希望这对任何遇到OpenIMSCore或Ant问题的人都有帮助。

吸取的教训是,在运行 Ant 之前,请始终了解您正在使用的文件夹的属性:您可能需要 root 权限才能执行某些任务。

最新更新