Fix various Windows related issues
Fixes gh-1168
This commit is contained in:
@@ -33,6 +33,7 @@ import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Used to match resources for inclusion in a CLI application's jar file
|
||||
@@ -186,8 +187,8 @@ class ResourceMatcher {
|
||||
}
|
||||
|
||||
private MatchedResource(File rootFolder, File file) {
|
||||
this.name = file.getAbsolutePath().substring(
|
||||
rootFolder.getAbsolutePath().length() + 1);
|
||||
this.name = StringUtils.cleanPath(file.getAbsolutePath().substring(
|
||||
rootFolder.getAbsolutePath().length() + 1));
|
||||
this.file = file;
|
||||
this.root = false;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.codehaus.groovy.control.CompilerConfiguration;
|
||||
import org.codehaus.groovy.control.SourceUnit;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Extension of the {@link GroovyClassLoader} with support for obtaining '.class' files as
|
||||
@@ -222,6 +223,7 @@ public class ExtendedGroovyClassLoader extends GroovyClassLoader {
|
||||
}
|
||||
|
||||
private boolean isGroovyJar(String entry) {
|
||||
entry = StringUtils.cleanPath(entry);
|
||||
for (String jarPrefix : GROOVY_JARS_PREFIXES) {
|
||||
if (entry.contains("/" + jarPrefix + "-")) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user