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,7 +470,9 @@ public abstract class KotlinCompileMojoBase<A extends CommonCompilerArguments> e
arguments.pluginClasspaths = pluginClassPaths.toArray(new String[pluginClassPaths.size()]);
} else {
for (String path : pluginClassPaths) {
arguments.pluginClasspaths = ArrayUtil.append(arguments.pluginClasspaths, path);
if (ArrayUtil.indexOf(arguments.pluginClasspaths, path) < 0) {
arguments.pluginClasspaths = ArrayUtil.append(arguments.pluginClasspaths, path);
}
}
}