我正在尝试使用Ant在命令行构建一个Eclipse Java项目。然后我将在Jenkins中使用它。我一直在使用带有相关文档和示例的ant4eclipse,但无法通过下面的错误。堆栈溢出中最接近的是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.'发布于 2013-03-11 16:44:23
ant4eclipse没有包含JDK1.7所需的配置文件。下面是我如何解决这个问题的:在Eclipse的/plugins目录中的org.eclipse.osgi_*.jar中,可以找到新的JavaSE-1.7.profile和更新后的profile.list。将这些文件复制到/profiles下的ant4eclipse jar文件中,一切都会很顺利
发布于 2018-01-05 23:26:11
GitHub上有一个全新的版本A4E_2018-01-03:
https://github.com/ant4eclipse/ant4eclipse/releases
使用<installedJREs>定义您的运行时环境。但现在也有一个对我有效的默认设置。
https://stackoverflow.com/questions/13532133
复制相似问题