// regular processing
A2Origin origin = new A2Origin();
Path bundleDir = processBndJar(downloaded, targetCategoryBase, fileProps, artifact, origin);
// regular processing
A2Origin origin = new A2Origin();
Path bundleDir = processBndJar(downloaded, targetCategoryBase, fileProps, artifact, origin);
- downloadAndProcessM2Sources(fileProps, artifact, bundleDir, false);
+ downloadAndProcessM2Sources(fileProps, artifact, bundleDir, false, false);
createJar(bundleDir, origin);
} catch (Exception e) {
throw new RuntimeException("Cannot process " + bndFile, e);
createJar(bundleDir, origin);
} catch (Exception e) {
throw new RuntimeException("Cannot process " + bndFile, e);
} 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);
- downloadAndProcessM2Sources(mergedProps, artifact, targetBundleDir, false);
+ downloadAndProcessM2Sources(mergedProps, artifact, targetBundleDir, false, false);
- downloadAndProcessM2Sources(mergeProps, artifact, bundleDir, true);
+ downloadAndProcessM2Sources(mergeProps, artifact, bundleDir, true, false);
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());
- downloadAndProcessM2Sources(fileProps, artifact, bundleDir, false);
+ downloadAndProcessM2Sources(fileProps, artifact, bundleDir, false, true);
Manifest manifest;
try (JarInputStream jarIn = new JarInputStream(Files.newInputStream(unmodifiedTarget))) {
manifest = jarIn.getManifest();
Manifest manifest;
try (JarInputStream jarIn = new JarInputStream(Files.newInputStream(unmodifiedTarget))) {
manifest = jarIn.getManifest();
- void downloadAndProcessM2Sources(Properties props, M2Artifact artifact, Path targetBundleDir, boolean merging)
- throws IOException {
+ void downloadAndProcessM2Sources(Properties props, M2Artifact artifact, Path targetBundleDir, boolean merging,
+ boolean unmodified) throws IOException {
try {
String repoStr = props.containsKey(ARGEO_ORIGIN_M2_REPO.toString())
? props.getProperty(ARGEO_ORIGIN_M2_REPO.toString())
try {
String repoStr = props.containsKey(ARGEO_ORIGIN_M2_REPO.toString())
? props.getProperty(ARGEO_ORIGIN_M2_REPO.toString())
URL sourcesUrl = alternateUri != null ? new URL(alternateUri)
: M2ConventionsUtils.mavenRepoUrl(repoStr, sourcesArtifact);
Path sourcesDownloaded = downloadMaven(sourcesUrl, sourcesArtifact);
URL sourcesUrl = alternateUri != null ? new URL(alternateUri)
: M2ConventionsUtils.mavenRepoUrl(repoStr, sourcesArtifact);
Path sourcesDownloaded = downloadMaven(sourcesUrl, sourcesArtifact);
- processM2SourceJar(sourcesDownloaded, targetBundleDir, merging ? artifact : null);
+ processM2SourceJar(sourcesDownloaded, targetBundleDir, merging ? artifact : null, unmodified);
logger.log(TRACE, () -> "Processed source " + sourcesDownloaded);
} catch (Exception e) {
logger.log(ERROR, () -> "Cannot download source for " + artifact);
logger.log(TRACE, () -> "Processed source " + sourcesDownloaded);
} catch (Exception e) {
logger.log(ERROR, () -> "Cannot download source for " + artifact);
- void processM2SourceJar(Path file, Path bundleDir, M2Artifact mergingFrom) throws IOException {
+ void processM2SourceJar(Path file, Path bundleDir, M2Artifact mergingFrom, boolean unmodified) throws IOException {
: 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)) {