2015-10-05 57 views
1

我試圖讓UMLGraph在我的MacBook Pro(OSX 10.9.5)上編譯,並在嘗試運行'ant build.xml'時出現錯誤。有沒有人有這個問題?以下是錯誤:在Mac上安裝UMLGraph

UMLGraph-5.7_2.3-SNAPSHOT$ ant build.xml 
Buildfile: /Users/jeremy/UMLGraph-5.7_2.3-SNAPSHOT/build.xml 
[echo] git describe --abbrev=6 => 'version' 

BUILD FAILED 
/Users/jeremy/UMLGraph-5.7_2.3-SNAPSHOT/build.xml:50: The following error occurred while executing this line: 
/Users/jeremy/UMLGraph-5.7_2.3-SNAPSHOT/build.xml:27: exec returned: 128 

Total time: 1 second 

這裏是線50的剪斷和幾行它從上面的build.xml:

23 <sequential> 
24  <echo message="git describe --abbrev=6 => '@{outputproperty}'"/> 
25 <exec executable="git" 
26  failonerror="true" 
27  outputproperty="@{outputproperty}"> 
28  <arg value="describe"/> 
29  <arg value="--abbrev=6"/> 
30  <arg value="HEAD"/> 
31  <redirector> 
32  <outputfilterchain> 
33  <tokenfilter> 
34   <replaceregex pattern="R" replace=""/> 
35   <replaceregex pattern="_" replace="."/> 
36   <replaceregex pattern="-" replace="."/> 
37   <replaceregex pattern="(-.*)$" replace="-SNAPSHOT"/> 
38  </tokenfilter> 
39  </outputfilterchain> 
40  </redirector> 
41  </exec> 
42  <echo message="gitversion returned '${@{outputproperty}}'"/> 
43 </sequential> 
44 </macrodef> 
45 
46 <!-- define Maven coordinates; see https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-7c.DeploySnaps hotsandStageReleaseswithAnt --> 
47 <property name="groupId" value="org.umlgraph" /> 
48 <property name="artifactId" value="UmlGraph" /> 
49 <!-- <property name="version" value="1.0-SNAPSHOT" /> --> 
50 <gitversion outputproperty="version"/> 

這裏在的README.txt的說明:

UMLGraph - Declarative Drawing of UML Diagrams 

UMLGraph allows the declarative specification and drawing of 
UML class and sequence diagrams. You can browse the system's 
documentation from the doc/index.html page, or print it from 
doc/indexw.html. 

To install the elements required to run UMLGraph, simply copy 
the contents of the lib directory to a location consistent with 
your installation's conventions (for example to /usr/local/lib). 

To compile the Java doclet from the source code run ant on the 
build.xml file. 

If you change the source code, you can run regression tests by 
executing "ant test". 

Project home page: http://www.umlgraph.org 
GitHub page: [email protected]:dspinellis/UMLGraph.git 

Diomidis Spinellis - November 2005, August 2008, April 2012 

我將文件從lib /複製到/ usr/local/lib,就像說明中所說的那樣,但是看起來我沒有正確地構建它。

感謝您的任何幫助。

+0

- 是否安裝了Git? - git命令是否在PATH中? - 你在用Git克隆過的目錄中運行ant嗎? –

+0

是的,Git已安裝並位於我的路徑中。我在解壓項目時創建的目錄中運行ant。所以不,我沒有從github克隆。 – bean2461

回答

0

爲了獲得編譯的項目,你必須從GitHub中克隆它。這是獲取版本字符串所必需的。