Leave module-info.class in root of archive when repackaging

Closes gh-15810
This commit is contained in:
Andy Wilkinson
2019-02-01 13:46:22 +00:00
parent c84a0f530b
commit 2650a07dc9
5 changed files with 51 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -381,7 +381,8 @@ public class Repackager {
}
if ((entry.getName().startsWith("META-INF/")
&& !entry.getName().equals("META-INF/aop.xml"))
|| entry.getName().startsWith("BOOT-INF/")) {
|| entry.getName().startsWith("BOOT-INF/")
|| entry.getName().equals("module-info.class")) {
return entry;
}
JarArchiveEntry renamedEntry = new JarArchiveEntry(