ant-contrib

    0熱度

    1回答

    我希望能夠將一個可選參數傳遞給一個ant任務調用,以便在被調用目標被忽略時顯示爲未設置(在條件中很重要或在使用unless或if屬性時很重要)。我不知道是否設置了optArg,所以我無法對參數進行硬編碼。 示例:螞蟻目標someTarget需要強制參數mandatoryArg和支持可選的參數OPTARG。 我可以cludgy複製像這樣實現這一點: <if><equals arg1="${optAr

    1熱度

    3回答

    所以...我有build.xml,它從basedir加載屬性文件。 然後,作爲目標我執行以下操作: <var name="Var1" value="<property_from_**first**_loaded_property_file>" /> <var name="<property_from_**first**_loaded_property_file>" unset="true"/>

    3熱度

    1回答

    在長時間運行的Ant腳本中,我有一個每秒大概調用一次的目標。 (這可能不是一件好事,但讓我們暫時接受它。) 我只希望它在最後一次實際執行至少五分鐘前執行。 解決方案的一個想法是保持lastRunTimestamp屬性,並將當前時間與該時間進行比較。 問題:如何比較Ant中的時間戳? 另一個值得歡迎的解決方案是隻在指定的時間間隔執行目標的方法,這樣就不需要檢查。 我使用Ant 1.7.1和ant-c

    0熱度

    2回答

    大家好<var name="x" value="${toString:first}" /> <echo>${x}</echo>這個語句給了我作爲c:\prog\source....我想從源存儲文件的完整路徑,只有誰能幫助我,請

    0熱度

    2回答

    大家好,這是我的目標調用代碼。 <target name="abc"> <var name="x" value="10"/> <antcall target="def"/> <!--Again Access The value of x here and also change it here--> </target> <target name="def">

    1熱度

    2回答

    我試圖將一個屬性用作多個其他屬性的模板,但它僅在第一次運行。這可能比較容易通過例子來說明,所以我減少了我的代碼出現此行爲最少的情況下: <target name="test"> <property name="individual.template" value="[email protected]@"/> <propertyregex property="individua

    1熱度

    2回答

    我想在Ant文件中更改「變量」,在一個目標中看到另一個目標中的變化。 <variable name="foo" value="hello" /> <target name="print-me"> <echo message="${foo}" /> <antcall target="change-me" /> <echo message="${foo}" /> </

    1熱度

    2回答

    我想避免我的程序中有antcall,所以試圖將antcall目標移動到目標依賴項。現在我有一種情況: <target name="test" depends="a,b,c" /> <target name="a" depends="a1,a2,a3" /> <target name="b" depends="b1,b2,b3" /> <target name="c" depends="c1

    0熱度

    1回答

    我創建了一個具有依賴關係的jar文件(即wlclient.jar,wljmxclient.jar)添加到清單文件Class-Path屬性中。我得到錯誤說「不支持的協議:t3」,但是如果我將這些罐子放在C:\apache-ant-1.8.3\lib文件夾中,則執行時不會出錯。 我是新來的螞蟻請幫忙。 創建jar文件的ant任務如下所示。 <jar destfile="projectpoc.jar"

    2熱度

    1回答

    我試圖能夠使用ant-contrib遠程啓動一個ant任務。出於測試目的,我已經用以下文件定義了一個服務器和一個調用者。 <?xml version="1.0" encoding="ISO-8859-1"?> <project name="RMI" basedir="." default="start.ant.server"> <target name="start.ant.serv