+bpInfo.getProvidedPackageVersionSource(packageName)
+") states '" +piVersion.toString()
+"' but the <exportpackage> element says '"
+epVersion.toString() +"'.";
log(msg, Project.MSG_ERR);
throw new BuildException(msg);
}
} catch (IllegalArgumentException iae) {
final String msg = "Invalid version '" +epVersionS
+"' in <exportpackage name=\""+packageName +"\" ...>: "
+iae.getMessage();
log(msg, Project.MSG_ERR);
throw new BuildException(msg, iae);
}
}
}
}
}
final SortedSet privatePackages = bpInfo.getProvidedPackages();
privatePackages.removeAll(publicPackages);
final SortedSet referencedPackages = bpInfo.getReferencedPackages();
referencedPackages.removeAll(privatePackages);
for (Iterator iterator = referencedPackages.iterator();
iterator.hasNext();) {
final String packageName = (String) iterator.next();
if (!isStandardPackage(packageName) &&
!importPackage.containsKey(packageName)) {
if (packageAnalysis == PACKAGE_ANALYSIS_AUTO) {
final String version = (String) exportPackage.get(packageName);
try {
importPackage.put(packageName, toImportRange(version));
} catch (IllegalArgumentException iae) {
final String msg = "Invalid version value, '" +version
+"' for exported package \""+packageName
+"\" can not derive version range for auto-import. "
+iae.getMessage();
log(msg, Project.MSG_ERR);
throw new BuildException(msg, iae);
}
} else if (packageAnalysis == PACKAGE_ANALYSIS_WARN) {
log("Referenced package not found in bundle or imports: "
+packageName,
Project.MSG_WARN);