2012-08-28 64 views
0

我正在尝试通过shell运行ANT,而无需在NetBeans IDE中导入我的项目。它会抛出以下错误:通过Netbeans使用Ant脚本问题构建

/trunk/nbproject/build-impl.xml:377: The libs.CopyLibs.classpath property is not set up. This property must point to org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part of NetBeans IDE installation and is usually located at /java/ant/extra folder. Either open the project in the IDE and make sure CopyLibs library exists or setup the property manually. For example like this: ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar

是因为我的构建是NetBeans特定还是其他内容?

回答

0

您是否尝试以错误消息建议的方式运行ANT?设置libs.CopyLibs.classpath属性指向缺少的jar文件?

这里的问题是由Netbeqns生成的ANT构建被设计为在IDE中运行。从命令行运行时,需要确保设置相同的环境属性。

更新

要使用环境变量,你可以尝试这样的:

<property environment="env"/> 
<property name="libs.CopyLibs.classpath" value="${env.COPY_LIBS_CLASSPATH}"/> 
+0

Yeah..I了解that..I想知道同样是我们如何,如果设置环境我们想通过shell运行没有IDE。 – user1442170

+0

@ user1442170不理解您的请求。 –