2017-07-07 54 views
0

我想在我的Ubuntu 14.04 LTS Linux计算机上编译OpenIMSCore的物理版本。我已按照指定here at cnd's website的指示进行操作。验证我拥有所有必需的程序和库,here is a text file outlining all of the different versions of the required programs I am using。这个问题似乎与this one类似,除了我的目录无法创建,他无法找到它们。Apache Ant无法为OpenIMSCore的FHoSS制作目录

为了确保我提供的信息可用的最佳量,这里是 调试信息我预制在终端的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文件: I put it on Google Drive due to its size and the fact that this post is already lengthy as is。 Apache Ant据说失败的地方在于第36行:mkdir命令:

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

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

回答

0

Apache Ant和build.xml没有什么问题。

按照this forum post的建议,我自己创建了一个目录。后来我意识到,我是在编译的文件夹:

[email protected]:/opt/OpenIMSCore/FHoSS$ 

由于我在“选择”文件夹,这要求我要么使用root帐户或使用“命令”启动时“ant编译”命令,特别是如果xml文件包含“mkdir”命令。我希望这对任何遇到OpenIMSCore或Ant问题的人都有帮助。

经验教训,在运行Ant之前,您总是知道您正在使用的文件夹的属性:您可能需要root权限才能执行某些任务。