ant4eclipse在解析类路径时出现异常

问题描述 投票:2回答:3

我正在尝试使用Ant在命令行上构建Eclipse Java项目。然后我将在Jenkins中使用它。我一直在使用ant4eclipse与相关的文档和示例,但无法通过以下错误。 stackoverflow中最接近的是ant4eclipse classpath problem,但我无法弄清楚如何适应我的情况。有任何想法吗?

BUILD FAILED
/home/phil/git/backend-testing/backend-tests/build.xml:31: 

The following error occurred while executing this line:
   /home/phil/git/backend-testing/backend-tests/a4e-jdt-macros.xml:77:
    org.ant4eclipse.lib.core.exception.Ant4EclipseException: 

Exception whilst resolving the classpath entry '[EclipseClasspathEntry: path:
    org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVM
    ype/JavaSE-1.7 entryKind: 0 outputLocation: null exported: false]' of project 
   'com.paralant.paravise.model': 'A precondition has been violated: The parameter 
   'javaProfile' is not supposed to be null.'
eclipse jenkins ant4eclipse
3个回答
2
投票

ant4eclipse不包含JDK 1.7的必要配置文件。以下是我解决问题的方法:在Eclipse的/ plugins目录中的org.eclipse.osgi _ * .jar中,可以找到新的JavaSE-1.7.profile和更新的profile.list。将它们复制到/ profiles下的ant4eclipse jar文件中,一切都应该没问题


1
投票

出于某种原因,Ant4Eclipse.org团队很长一段时间没有更新他们的分发二进制文件(从2010年开始!)。这很奇怪,因为它正在积极发展。

您可以在这里获得最新的成功构建:http://hudson.nilshartmann.net/job/ant4eclipse/lastSuccessfulBuild/

类路径解析在最新版本中得到修复。


0
投票

GitHub上有一个全新的版本A4E_2018-01-03:

https://github.com/ant4eclipse/ant4eclipse/releases

使用<installedJREs>定义运行时环境。但现在还有一个默认值对我有用。

© www.soinside.com 2019 - 2024. All rights reserved.