saveManifest(manifestFile, manifest);
// Create the jar.
FileUtils.createZipFile(projectJarDir, projectJarFile);
CombineJars combineJars = new CombineJars();
List<File> jarFiles = new ArrayList<File>();
jarFiles.add(projectJarFile);
try {
EclipseMetafile[] dependencies = CreateJarUtils
.getProjectDependencies(eclipseProject, progress);
for (EclipseMetafile metafile : dependencies) {
if (metafile instanceof CompiledJar) {
jarFiles.add(metafile.getFile());
}
}
// Reverse jarFiles.
Collections.reverse(jarFiles);
File outputFile = getFatJarFile(eclipseProject);
combineJars.createCombinedJar(mainClass, jarFiles
.toArray(IConstants.ZERO_LENGTH_FILE_ARRAY),
outputFile, null, progress);
if (stripJars) {
progress.increment(0,
"Launching task to strip zip file");