final Map<String, List<String>> mirrors = new HashMap<String, List<String>>();
/** Whether sources should be packaged separately */
final Map<String, List<String>> mirrors = new HashMap<String, List<String>>();
/** Whether sources should be packaged separately */
/** Constructor initialises the various variables */
public Repackage(Path a2Base, Path descriptorsBase) {
/** Constructor initialises the various variables */
public Repackage(Path a2Base, Path descriptorsBase) {
logger.log(INFO, "Sources will be packaged separately");
Objects.requireNonNull(a2Base);
logger.log(INFO, "Sources will be packaged separately");
Objects.requireNonNull(a2Base);
this.a2LibBase = a2Base.resolve("lib");
this.descriptorsBase = descriptorsBase;
if (!Files.exists(this.descriptorsBase))
this.a2LibBase = a2Base.resolve("lib");
this.descriptorsBase = descriptorsBase;
if (!Files.exists(this.descriptorsBase))
boolean doNotModify = Boolean
.parseBoolean(fileProps.getOrDefault(ARGEO_DO_NOT_MODIFY.toString(), "false").toString());
boolean doNotModify = Boolean
.parseBoolean(fileProps.getOrDefault(ARGEO_DO_NOT_MODIFY.toString(), "false").toString());
processNotModified(targetCategoryBase, downloaded, fileProps, artifact);
return;
}
processNotModified(targetCategoryBase, downloaded, fileProps, artifact);
return;
}
boolean doNotModify = Boolean
.parseBoolean(mergedProps.getOrDefault(ARGEO_DO_NOT_MODIFY.toString(), "false").toString());
boolean doNotModify = Boolean
.parseBoolean(mergedProps.getOrDefault(ARGEO_DO_NOT_MODIFY.toString(), "false").toString());
- if (doNotModify && sourceBundles) {
- processNotModified(targetCategoryBase, downloaded, fileProps, artifact);
+ if (doNotModify) {
+ processNotModified(targetCategoryBase, downloaded, mergedProps, artifact);
} else {
A2Origin origin = new A2Origin();
Path targetBundleDir = processBndJar(downloaded, targetCategoryBase, mergedProps, artifact, origin);
} else {
A2Origin origin = new A2Origin();
Path targetBundleDir = processBndJar(downloaded, targetCategoryBase, mergedProps, artifact, origin);
// When releasing (with separate sources), we just copy it
Path unmodifiedTarget = targetCategoryBase
.resolve(fileProps.getProperty(BUNDLE_SYMBOLICNAME.toString()) + "." + artifact.getBranch() + ".jar");
// When releasing (with separate sources), we just copy it
Path unmodifiedTarget = targetCategoryBase
.resolve(fileProps.getProperty(BUNDLE_SYMBOLICNAME.toString()) + "." + artifact.getBranch() + ".jar");
Files.copy(downloaded, unmodifiedTarget, StandardCopyOption.REPLACE_EXISTING);
Path bundleDir = targetCategoryBase
.resolve(fileProps.getProperty(BUNDLE_SYMBOLICNAME.toString()) + "." + artifact.getBranch());
Files.copy(downloaded, unmodifiedTarget, StandardCopyOption.REPLACE_EXISTING);
Path bundleDir = targetCategoryBase
.resolve(fileProps.getProperty(BUNDLE_SYMBOLICNAME.toString()) + "." + artifact.getBranch());
/** Integrate sources from a downloaded jar file. */
void processM2SourceJar(Path file, Path bundleDir, M2Artifact mergingFrom) throws IOException {
A2Origin origin = new A2Origin();
/** Integrate sources from a downloaded jar file. */
void processM2SourceJar(Path file, Path bundleDir, M2Artifact mergingFrom) throws IOException {
A2Origin origin = new A2Origin();
: bundleDir.resolve("OSGI-OPT/src");
try (JarInputStream jarIn = new JarInputStream(Files.newInputStream(file), false)) {
: bundleDir.resolve("OSGI-OPT/src");
try (JarInputStream jarIn = new JarInputStream(Files.newInputStream(file), false)) {
NameVersion nameVersion = new NameVersion(relatedBundle[0], version);
bundleDir = targetBase.resolve(nameVersion.getName() + "." + nameVersion.getBranch());
NameVersion nameVersion = new NameVersion(relatedBundle[0], version);
bundleDir = targetBase.resolve(nameVersion.getName() + "." + nameVersion.getBranch());
writer.append("\nA detailed list of changes is available under " + CHANGES + ".\n");
if (!jarDir.getFileName().endsWith(".src")) {// binary archive
writer.append("\nA detailed list of changes is available under " + CHANGES + ".\n");
if (!jarDir.getFileName().endsWith(".src")) {// binary archive
writer.append("Corresponding sources are available in the related archive named "
+ jarDir.toString() + ".src.jar.\n");
else
writer.append("Corresponding sources are available in the related archive named "
+ jarDir.toString() + ".src.jar.\n");
else