Merge branch '2.5.x' into 2.6.x
Closes gh-28904
This commit is contained in:
@@ -29,6 +29,7 @@ import java.util.Map;
|
||||
* @author Dave Syer
|
||||
* @author Andy Wilkinson
|
||||
* @author Madhura Bhave
|
||||
* @author Scott Frederick
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public final class Layouts {
|
||||
@@ -160,11 +161,6 @@ public final class Layouts {
|
||||
return "WEB-INF/classes/";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClasspathIndexFileLocation() {
|
||||
return "WEB-INF/classpath.idx";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLayersIndexFileLocation() {
|
||||
return "WEB-INF/layers.idx";
|
||||
|
||||
@@ -516,15 +516,15 @@ public abstract class Packager {
|
||||
writtenPaths.add(path);
|
||||
}
|
||||
}
|
||||
if (getLayout() instanceof RepackagingLayout) {
|
||||
writeClasspathIndex(writtenPaths, (RepackagingLayout) getLayout(), writer);
|
||||
}
|
||||
writeClasspathIndexIfNecessary(writtenPaths, getLayout(), writer);
|
||||
}
|
||||
|
||||
private void writeClasspathIndex(List<String> paths, RepackagingLayout layout, AbstractJarWriter writer)
|
||||
private void writeClasspathIndexIfNecessary(List<String> paths, Layout layout, AbstractJarWriter writer)
|
||||
throws IOException {
|
||||
List<String> names = paths.stream().map((path) -> "- \"" + path + "\"").collect(Collectors.toList());
|
||||
writer.writeIndexFile(layout.getClasspathIndexFileLocation(), names);
|
||||
if (layout.getClasspathIndexFileLocation() != null) {
|
||||
List<String> names = paths.stream().map((path) -> "- \"" + path + "\"").collect(Collectors.toList());
|
||||
writer.writeIndexFile(layout.getClasspathIndexFileLocation(), names);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user