diff --git a/biz.aQute.launcher/src/aQute/launcher/plugin/ProjectLauncherImpl.java b/biz.aQute.launcher/src/aQute/launcher/plugin/ProjectLauncherImpl.java index 92f3e97d1a..19950ec258 100644 --- a/biz.aQute.launcher/src/aQute/launcher/plugin/ProjectLauncherImpl.java +++ b/biz.aQute.launcher/src/aQute/launcher/plugin/ProjectLauncherImpl.java @@ -357,19 +357,24 @@ public Jar executable() throws Exception { } } - List bcpList = new ArrayList<>(); - bcpList.add("."); - bcpList.addAll(classpath); - bcpList.addAll(actualPaths); - - builder.setProperty(BUNDLE_CLASSPATH, bcpList.stream() - .collect(joining(","))); - builder.setProperty(EXPORT_CONTENTS, "aQute.launcher.pre"); - - // Ignore common warnings resulting from the Bundle-ClassPath which - // are irrelevant in this use case - builder.setProperty(FIXUPMESSAGES, - "Classes found in the wrong directory, private references, Export-Package duplicate package name, Invalid package name: * in Export-Package"); + String moduleProperty = builder.getProperty(JPMS_MODULE_INFO); + if (moduleProperty != null) { + + List bcpList = new ArrayList<>(); + bcpList.add("."); + bcpList.addAll(classpath); + bcpList.addAll(actualPaths); + + builder.setProperty(BUNDLE_CLASSPATH, bcpList.stream() + .collect(joining(","))); + builder.setProperty(EXPORT_CONTENTS, "aQute.launcher.pre"); + + // Ignore common warnings resulting from the Bundle-ClassPath + // which + // are irrelevant in this use case + builder.setProperty(FIXUPMESSAGES, + "Classes found in the wrong directory, private references, Export-Package duplicate package name, Invalid package name: * in Export-Package"); + } LauncherConstants lc = getConstants(actualPaths, true); lc.embedded = true;