X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=src%2Forg%2Fargeo%2Fbuild%2FRepackage.java;h=d67a6759ee0f812e7d3551b62c8573a7ea911ca7;hb=064a618a071f7f4105b17a571dc58a4f555fdc6d;hp=b637666c9b4f9d5aa070ac10287b7328436b1016;hpb=6a97fe72628b0f1664efea436d3df49fcf59ef45;p=cc0%2Fargeo-build.git diff --git a/src/org/argeo/build/Repackage.java b/src/org/argeo/build/Repackage.java index b637666..d67a675 100644 --- a/src/org/argeo/build/Repackage.java +++ b/src/org/argeo/build/Repackage.java @@ -40,6 +40,7 @@ import java.nio.file.Path; import java.nio.file.PathMatcher; import java.nio.file.Paths; import java.nio.file.SimpleFileVisitor; +import java.nio.file.StandardCopyOption; import java.nio.file.StandardOpenOption; import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; @@ -245,15 +246,21 @@ public class Repackage { Path downloaded = downloadMaven(url, artifact); // some proprietary artifacts do not allow any modification + // when releasing (with separate sources) we just copy it boolean doNotModify = Boolean.parseBoolean( fileProps.getOrDefault(ManifestConstants.ARGEO_DO_NOT_MODIFY.toString(), "false").toString()); - if (doNotModify) { + if (doNotModify && sourceBundles) { Path unmodifiedTarget = targetCategoryBase.resolve( fileProps.getProperty(BUNDLE_SYMBOLICNAME.toString()) + "." + artifact.getBranch() + ".jar"); - Files.copy(downloaded, unmodifiedTarget); + Files.copy(downloaded, unmodifiedTarget, StandardCopyOption.REPLACE_EXISTING); + downloadAndProcessM2Sources(repoStr, artifact, + targetCategoryBase.resolve( + fileProps.getProperty(BUNDLE_SYMBOLICNAME.toString()) + "." + artifact.getBranch()), + false); return; } - + + // normal processing A2Origin origin = new A2Origin(); Path targetBundleDir = processBndJar(downloaded, targetCategoryBase, fileProps, artifact, origin);