【问题标题】:insert file on bar using ant使用 ant 在栏上插入文件
【发布时间】:2015-06-21 23:09:24
【问题描述】:

我正在尝试制作一个构建、覆盖和部署 bar 文件的 ANT XML。它工作正常,但我需要在 META-INF 文件夹(service.bar > service.appzip > META-INF)中插入一个文件,我真的不知道如何使用 ANT。

这是我的 ANT XML:

<project name="service" default="run">
    <target name="run">
        <antcall target="build" />
        <antcall target="override" />
        <antcall target="deploy" />
    </target>

    <target name="build" >
        <loadfile property="toolkit.home" srcfile="toolkit_home.txt" />
        <loadfile property="workspace.dir" srcfile="workspace_dir.txt" />
        <loadfile property="broker.home" srcfile="broker_home.txt" />
        <exec executable="${toolkit.home}\mqsicreatebar.exe" spawn="false">
            <arg value="-data" />
            <arg value="${workspace.dir}" />
            <arg value="-b" />
            <arg value="${workspace.dir}\GeneratedBarFiles\service.ANT.bar" />
            <arg value="-p" />
            <arg value="service" />
            <arg value="-a" />
            <arg value="service\" />
            <arg value="-deployAsSource" />
        </exec>

    </target>

    <target name="override">
        <loadfile property="toolkit.home" srcfile="toolkit_home.txt" />
        <loadfile property="workspace.dir" srcfile="workspace_dir.txt" />
        <loadfile property="broker.home" srcfile="broker_home.txt" />
        <exec executable="${toolkit.home}\mqsiapplybaroverride.exe" spawn="false">
            <arg value="-b" />
            <arg value="${workspace.dir}\GeneratedBarFiles\service.ANT.bar" />
            <arg value="-p" />
            <arg value="${workspace.dir}\Scripts\build\properties\service.properties" />
            <arg value="-k" />
            <arg value="service" />
            <arg value="-r" />
        </exec>
    </target>

    <target name="deploy">
        <loadfile property="toolkit.home" srcfile="toolkit_home.txt" />
        <loadfile property="workspace.dir" srcfile="workspace_dir.txt" />
        <loadfile property="broker.home" srcfile="broker_home.txt" />
        <exec executable="${broker.home}\mqsideploy.exe" spawn="false">
            <arg value="-i" />
            <arg value="10.0.0.1" />
            <arg value="-p" />
            <arg value="2424" />
            <arg value="-q" />
            <arg value="QM_01" />
            <arg value="-e" />
            <arg value="EG_06" />
            <arg value="-a" />
            <arg value="${workspace.dir}\GeneratedBarFiles\service.ANT.bar" />
        </exec>
    </target>
</project>

感谢您的帮助!

【问题讨论】:

    标签: xml ant build broker


    【解决方案1】:

    我解决了我的问题解压缩 bar 文件,解压缩 appzip,将 txt 文件复制到文件夹,压缩 appzip,然后 zip bar 文件。

    我尝试使用该命令,但它没有按我的意愿工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-30
      • 2015-09-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多