X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=src%2Forg%2Fargeo%2Fbuild%2FRepackage.java;h=037ddbd7cd26b2325d64126a34ececfc32370219;hb=ca2d551c67515082032aad2405f30a924468089a;hp=7aa26b9756811e027a5c7bc44d23fbfa70d071d1;hpb=c74c069af4612100592e3cb2bd33ea34f7f79449;p=cc0%2Fargeo-build.git diff --git a/src/org/argeo/build/Repackage.java b/src/org/argeo/build/Repackage.java index 7aa26b9..037ddbd 100644 --- a/src/org/argeo/build/Repackage.java +++ b/src/org/argeo/build/Repackage.java @@ -7,6 +7,7 @@ import static org.argeo.build.Repackage.ManifestConstants.EXPORT_PACKAGE; import static org.argeo.build.Repackage.ManifestConstants.SLC_ORIGIN_M2; import static org.argeo.build.Repackage.ManifestConstants.SLC_ORIGIN_M2_REPO; +import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; @@ -310,6 +311,10 @@ public class Repackage { mergeProps.put(ManifestConstants.BUNDLE_VERSION.toString(), m2Version); String artifactsStr = mergeProps.getProperty(ManifestConstants.SLC_ORIGIN_M2_MERGE.toString()); + if (artifactsStr == null) + throw new IllegalArgumentException( + mergeBnd + ": " + ManifestConstants.SLC_ORIGIN_M2_MERGE + " must be set"); + String repoStr = mergeProps.containsKey(SLC_ORIGIN_M2_REPO.toString()) ? mergeProps.getProperty(SLC_ORIGIN_M2_REPO.toString()) : null; @@ -976,7 +981,8 @@ public class Repackage { public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { if (file.getFileName().toString().equals("MANIFEST.MF")) return super.visitFile(file, attrs); - JarEntry entry = new JarEntry(bundleDir.relativize(file).toString()); + JarEntry entry = new JarEntry( + bundleDir.relativize(file).toString().replace(File.separatorChar, '/')); jarOut.putNextEntry(entry); Files.copy(file, jarOut); return super.visitFile(file, attrs);