* Same code than in the ProductExportMojo. Needed to get the launcher binaries.
*/
// TODO implement at eclipse: have product publisher take the executables from the context repositories
private File getEquinoxExecutableFeature() throws MojoExecutionException, MojoFailureException {
TargetPlatform targetPlatform = TychoProjectUtils.getTargetPlatform(getProject());
ArtifactDescriptor artifact = targetPlatform.getArtifact(ArtifactKey.TYPE_ECLIPSE_FEATURE,
"org.eclipse.equinox.executable", null);
if (artifact == null) {
throw new MojoExecutionException("Unable to locate the equinox launcher feature (aka delta-pack)");
}
File equinoxExecFeature = artifact.getLocation();
if (equinoxExecFeature.isDirectory()) {
return equinoxExecFeature.getAbsoluteFile();
} else {
File unzipped = new File(getProject().getBuild().getOutputDirectory(), artifact.getKey().getId() + "-"
+ artifact.getKey().getVersion());
if (unzipped.exists()) {
return unzipped.getAbsoluteFile();
}
try {
// unzip now then: