我尝试用我的ant脚本构建一个eclipse项目。我还使用ant4eclipse导入项目。它工作得很好,直到它尝试从我的.classpath文件中解析以下条目:
…
<classpathentry kind="con"path="at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER"/>
…错误:
BUILD FAILED
C:\Users\bob\.jenkins\jobs\BuildTest\workspace\trunk\build.xml:159: The following error occurred while executing this line:
C:\Users\bob\.jenkins\jobs\BuildTest\workspace\trunk\build.xml:70: org.ant4eclipse.lib.core.exception.Ant4EclipseException: Exception whilst resolving the classpath entry '[EclipseClasspathEntry: path: at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER entryKind: 0 outputLocation: null exported: false]' of project 'test123': '
No 'jdtClassPathLibrary' defined for library entry 'at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER'.
To resolve this problem, please define a 'jdtClassPathLibrary' element inside your ant build file:
<ant4eclipse:jdtClassPathLibrary name="at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER">
<fileset dir="..."/>
</ant4eclipse:jdtClassPathLibrary >如果我遵循这个建议,使用
C:\Program Files\Java\jdk1.7.0_55\jre\lib作为fileset dir,我得到了上面的错误。而jfxrt.jar是存在的。
有没有人有办法解决这个问题?
发布于 2014-05-27 16:19:28
该错误是因为ant4eclipse可以找到at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER的classpath条目,但无法找到该容器的定义
现在,您必须指定fileset标记,以便定义组成容器的jar文件。在本例中,jfxrt.jar与错误消息中所说的完全相同
<ant4eclipse:jdtClassPathLibrary name="at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER">
<fileset dir="..."/> // the location to the jar
</ant4eclipse:jdtClassPathLibrary >https://stackoverflow.com/questions/23883728
复制相似问题