2012-11-28 79 views
0

的build.xml螞蟻RPM構建失敗,由於未知的選項 '-bs'

<?xml version="1.0"?> 
<project default="main" basedir="."> 
<echo message="pulling in property files" /> 
<property file="axis_bujava.properties" /> 

<echo message="calling the RPM Build Ant" /> 
<target name="main"> 
    <rpm specfile="example.spec" topdir="${basedir}" command="-bs" /> 
</target> 
</project> 

example.spec

Summary: xxx 

Name: cdplayer 

Version: 1.0 

Release: 1 

Copyright: xxx 

Group: Applications/Sound 

Source: xxx.tgz 

URL: http://xxx.html 

Distribution: xxxx 

Vendor:xxx. 

Packager: xxx 

%description 
xxxx 
%build 
make 
%install 
make install 

輸出:

Buildfile: /home/user1/workspace/antdemo/build.xml 
    [echo] pulling in property files 

    [echo] calling the RPM Build Ant 

main: 

     [rpm] Building the RPM based on the example.spec file 

     [rpm] -bs: unknown option 

     [rpm] 'rpm' failed with exit code 1 

BUILD SUCCESSFUL 

Total time: 848 milliseconds 
+0

聽起來像是它發送到'rpm'可執行文件而不是'rpmbuild'? –

回答

3

我有這個問題了。在我的情況下,操作系統沒有安裝'rpmbuild'命令,所以螞蟻的任務是按照Aaron的建議調用'rpm'。

+1

yum install rpm-build會安裝所需的rpm。 – praveen