我正在尝试将Apache Ivy整合到Netbeans web应用程序项目中。netbeans中ivy的build.xml
我build.xml
文件遵循的NetBeans教程: http://wiki.netbeans.org/FaqIvy
具体做法是:
<target name="-ivy-retrieve">
<ivy:retrieve/> <!-- Load dependencies to the project -->
<pathconvert property="ivy.classpath.computed" dirsep="/" pathsep=":">
<path>
<fileset dir="lib" includes="*.jar"/>
</path>
<map from="${basedir}${file.separator}" to=""/>
</pathconvert>
<propertyfile file="nbproject/project.properties">
<entry operation="=" key="ivy.classpath" value="${ivy.classpath.computed}"/>
</propertyfile>
</target>
<target name="-pre-compile" depends="-ivy-retrieve"/>
<target name="-pre-compile-single" depends="-ivy-retrieve"/>
<target name="-post-clean">
<delete dir="lib"/>
</target>
奇怪的是,这将更新ivy.classpath
在nbprojects.project.properties
文件,但我似乎无法得到构建的WEB-INF/lib
文件夹来获得填充作为依赖关系列出的.jar
。
奇怪的是,我有这个工作在前一天,并能够填充构建的WEB-INF/lib
文件夹,现在当我删除依赖,相同的jar文件包含在构建(而不是删除它们)。
关于如何更改build.xml
文件的任何建议?或其他任何能够将艾维成功整合到我的构建过程中的东西(检测到常春藤:在构建过程中,我会在输出中看到“解决方案报告”和“检索”)。
有些事情我已经试过:
要考虑的另一个优化是使用** cachpath **任务,而不是**检索**:http://ant.apache.org/ivy/history/latest-milestone/use/cachepath.html –