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, unmodified);
logger.log(TRACE, () -> "Processed source " + sourcesDownloaded);
} catch (Exception e) {
processM2SourceJar(sourcesDownloaded, targetBundleDir, merging ? artifact : null, unmodified);
logger.log(TRACE, () -> "Processed source " + sourcesDownloaded);
} catch (Exception e) {
- writer.append("The original component has M2 coordinates:\n" + originDesc.replace(',', '\n') + "\n"
- + (m2Repo != null ? "\nin M2 repository " + m2Repo + "\n" : ""));
+ writer.append("\nThe original component comes from " + originDesc + ".\n");
- writer.append("The original component comes from " + originDesc + ".\n");
+ writer.append("\nThe original component has M2 coordinates:\n" + originDesc.replace(',', '\n')
+ + "\n" + (m2Repo != null ? "\nin M2 repository " + m2Repo + "\n" : ""));
else
logger.log(ERROR, "Cannot find origin information in " + jarDir);
}
String originSources = ARGEO_ORIGIN_SOURCES_URI.get(mapping);
if (originSources != null)
else
logger.log(ERROR, "Cannot find origin information in " + jarDir);
}
String originSources = ARGEO_ORIGIN_SOURCES_URI.get(mapping);
if (originSources != null)
if (separateSources)
writer.append("Corresponding sources are available in the related archive named "
+ jarDir.toString() + ".src.jar.\n");
if (separateSources)
writer.append("Corresponding sources are available in the related archive named "
+ jarDir.toString() + ".src.jar.\n");
/** Append changes to the A2-ORIGIN/changes file. */
void appendChanges(Path baseDirectory) throws IOException {
/** Append changes to the A2-ORIGIN/changes file. */
void appendChanges(Path baseDirectory) throws IOException {
Path changesFile = baseDirectory.resolve(CHANGES);
Files.createDirectories(changesFile.getParent());
try (BufferedWriter writer = Files.newBufferedWriter(changesFile, APPEND, CREATE)) {
Path changesFile = baseDirectory.resolve(CHANGES);
Files.createDirectories(changesFile.getParent());
try (BufferedWriter writer = Files.newBufferedWriter(changesFile, APPEND, CREATE)) {