我們用這種方法解決了這個問題。假設你自己的Ant構建腳本被稱爲「myBuild.xml」,並放置在同一文件夾中的build.xml - 打開你的build.xml文件,並替換其內容:
<?xml version="1.0" encoding="UTF-8"?>
<project name="payroll_web_ice_jq" default="default" basedir=".">
<condition property="import.path" value="myBuild.xml">
<not><isset property="netbeans.user"/></not>
</condition>
<condition property="import.path" value="nbproject/build-impl.xml">
<isset property="netbeans.user"/>
</condition>
<!-- conditional import. If triggered from NetBeans, use old build script
if triggered from shell, user new build script -->
<import file="${import.path}" />
</project>
正如你所看到的,我們檢查Netbeans中是否存在「netbeans.user」屬性,而不是在命令行上。這對我們很有用。
鏈接丟失/損壞? – 2014-12-25 18:55:56