Ant 如何将buildroot从spec文件传递到build.xml文件

Ant 如何将buildroot从spec文件传递到build.xml文件,ant,specifications,rpm-spec,Ant,Specifications,Rpm Spec,*有人能帮忙吗,在spec文件中使用ant命令将参数作为buildroot或dynamicdirectory传递 *在build.xml中提到ant安装目标 <target name="install"/> <copy todir="${build-root}/some_location > <fileset dir="lib/*.jar"/> </copy> </target> 将所有jar文件复制到位置bu

*有人能帮忙吗,在spec文件中使用ant命令将参数作为buildroot或dynamicdirectory传递

*在build.xml中提到ant安装目标

<target name="install"/>
   <copy todir="${build-root}/some_location >
      <fileset dir="lib/*.jar"/>
   </copy>
</target>
将所有jar文件复制到位置build root/some\u位置

这里构建根目录必须从规范文件中获取

等级库文件:

%安装
ant install

如果要从命令行设置${build root}属性,请使用:

或者创建一个文件,表示key=value,f.e.:

并从命令行使用它:

也可能是多个-Dkey=value和-propertyfile参数的组合:

我不知道什么规格,但从你的张贴它看起来像线

表示[%install=spec参数?]ant-f build.xml安装=build.xml中的targetname -当文件名build.xml位于当前目录中时,f build.xml已过时

这样做可能会奏效:

或:

ant -f build.xml -Dbuild-root=/some/path
foo=bar
somevalue=somekey
build-root=/some/path
...
ant -f build.xml -propertyfile yourfile.properties
ant -f build.xml -Dfoo=bar -Dfooo=baz -propertfile foo.properties -propertyfile foo.properties
%install ant install
%install ant install -Dbuild-root=/some/path
%install ant install -propertyfile foo.properties