I am attempting to build an Eclipse Java project at the command-line using Ant. I will then use this within Jenkins. I have been using ant4eclipse with the associated documentation and examples, but cannot get past the below error. The closest thing in stackoverflow is ant4eclipse classpath problem but I cannot figure out how to adapt this to my situation. Any ideas?
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.'
ant4eclipse doesn't include the necessary profile for JDK 1.7. Here's how I solved the problem: Inside the org.eclipse.osgi_*.jar in the /plugins directory of Eclipse the new JavaSE-1.7.profile and the updated profile.list can be found. Copy those into the ant4eclipse jar file under /profiles and everything should be fine