use of aQute.bnd.differ.DiffPluginImpl in project bndtools by bndtools.
the class DiffHelper method createBaseline.
public static Baseline createBaseline(Builder builder) {
try {
if (builder instanceof ProjectBuilder) {
ProjectBuilder projectBuilder = (ProjectBuilder) builder;
Jar jar = null;
Jar currentJar = null;
try {
jar = builder.build();
currentJar = projectBuilder.getBaselineJar();
if (currentJar == null) {
currentJar = projectBuilder.getLastRevision();
}
if (currentJar == null) {
//$NON-NLS-1$
currentJar = new Jar(".");
}
DiffPluginImpl differ = new DiffPluginImpl();
String diffignore = builder.getProperty(Constants.DIFFIGNORE);
if (diffignore != null)
differ.setIgnore(diffignore);
Baseline baseline = new Baseline(builder, differ);
baseline.baseline(jar, currentJar, null);
return baseline;
} finally {
if (jar != null)
jar.close();
if (currentJar != null)
currentJar.close();
}
}
} catch (Exception e1) {
e1.printStackTrace();
}
return null;
}
Aggregations