Ensure there won't be the same classpath entries in the resulting classpath

This commit is contained in:
Yan Zhulanow
2017-08-01 20:27:13 +03:00
parent 9a40e9b96d
commit 3d7d1b20ab
@@ -470,9 +470,11 @@ public abstract class KotlinCompileMojoBase<A extends CommonCompilerArguments> e
arguments.pluginClasspaths = pluginClassPaths.toArray(new String[pluginClassPaths.size()]); arguments.pluginClasspaths = pluginClassPaths.toArray(new String[pluginClassPaths.size()]);
} else { } else {
for (String path : pluginClassPaths) { for (String path : pluginClassPaths) {
if (ArrayUtil.indexOf(arguments.pluginClasspaths, path) < 0) {
arguments.pluginClasspaths = ArrayUtil.append(arguments.pluginClasspaths, path); arguments.pluginClasspaths = ArrayUtil.append(arguments.pluginClasspaths, path);
} }
} }
}
if (getLog().isDebugEnabled()) { if (getLog().isDebugEnabled()) {
getLog().debug("Plugin classpaths are: " + Joiner.on(", ").join(arguments.pluginClasspaths)); getLog().debug("Plugin classpaths are: " + Joiner.on(", ").join(arguments.pluginClasspaths));