diff --git a/spring-boot-samples/spring-boot-sample-simple/application.properties b/spring-boot-samples/spring-boot-sample-simple/application.properties new file mode 100644 index 00000000000..4dfe84cedc6 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-simple/application.properties @@ -0,0 +1 @@ +name: Phil \ No newline at end of file diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/ExecutableArchiveLauncher$1.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/ExecutableArchiveLauncher$1.class new file mode 100644 index 00000000000..584c005f483 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/ExecutableArchiveLauncher$1.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/ExecutableArchiveLauncher.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/ExecutableArchiveLauncher.class new file mode 100644 index 00000000000..2bca1062284 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/ExecutableArchiveLauncher.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/InputArgumentsJavaAgentDetector$1.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/InputArgumentsJavaAgentDetector$1.class new file mode 100644 index 00000000000..7977b39a491 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/InputArgumentsJavaAgentDetector$1.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/InputArgumentsJavaAgentDetector.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/InputArgumentsJavaAgentDetector.class new file mode 100644 index 00000000000..99b6ba19416 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/InputArgumentsJavaAgentDetector.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/JarLauncher.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/JarLauncher.class new file mode 100644 index 00000000000..86df3f18504 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/JarLauncher.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/JavaAgentDetector.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/JavaAgentDetector.class new file mode 100644 index 00000000000..45c61eaab60 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/JavaAgentDetector.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/LaunchedURLClassLoader$1.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/LaunchedURLClassLoader$1.class new file mode 100644 index 00000000000..619cefc3e68 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/LaunchedURLClassLoader$1.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/LaunchedURLClassLoader$2.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/LaunchedURLClassLoader$2.class new file mode 100644 index 00000000000..f5891550333 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/LaunchedURLClassLoader$2.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/LaunchedURLClassLoader.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/LaunchedURLClassLoader.class new file mode 100644 index 00000000000..260c754bee2 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/LaunchedURLClassLoader.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/Launcher.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/Launcher.class new file mode 100644 index 00000000000..75c6d66de2c Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/Launcher.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/MainMethodRunner.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/MainMethodRunner.class new file mode 100644 index 00000000000..c7c9329a330 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/MainMethodRunner.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher$1.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher$1.class new file mode 100644 index 00000000000..473c5b5b78f Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher$1.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher$ArchiveEntryFilter.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher$ArchiveEntryFilter.class new file mode 100644 index 00000000000..6bb40cc7ce2 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher$ArchiveEntryFilter.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher$PrefixMatchingArchiveFilter.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher$PrefixMatchingArchiveFilter.class new file mode 100644 index 00000000000..9ef957abf05 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher$PrefixMatchingArchiveFilter.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher.class new file mode 100644 index 00000000000..2c78f63072f Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/PropertiesLauncher.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/WarLauncher$1.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/WarLauncher$1.class new file mode 100644 index 00000000000..b29412e9c5a Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/WarLauncher$1.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/WarLauncher.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/WarLauncher.class new file mode 100644 index 00000000000..da1f7c037ba Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/WarLauncher.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive$Entry.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive$Entry.class new file mode 100644 index 00000000000..478454a22b7 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive$Entry.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive$EntryFilter.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive$EntryFilter.class new file mode 100644 index 00000000000..b01a6337ef0 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive$EntryFilter.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive$EntryRenameFilter.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive$EntryRenameFilter.class new file mode 100644 index 00000000000..fb90d00e643 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive$EntryRenameFilter.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive.class new file mode 100644 index 00000000000..0b1cba8d4fc Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/Archive.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive$FileEntry.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive$FileEntry.class new file mode 100644 index 00000000000..740ef37a6de Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive$FileEntry.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive$FileNotFoundURLConnection.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive$FileNotFoundURLConnection.class new file mode 100644 index 00000000000..293ebfa45c6 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive$FileNotFoundURLConnection.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive$FilteredURLStreamHandler.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive$FilteredURLStreamHandler.class new file mode 100644 index 00000000000..19a1fb0111b Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive$FilteredURLStreamHandler.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive.class new file mode 100644 index 00000000000..4ee050a9a2e Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/ExplodedArchive.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/FilteredArchive$1.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/FilteredArchive$1.class new file mode 100644 index 00000000000..54407081ae2 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/FilteredArchive$1.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/FilteredArchive$2.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/FilteredArchive$2.class new file mode 100644 index 00000000000..4d162dec69c Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/FilteredArchive$2.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/FilteredArchive.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/FilteredArchive.class new file mode 100644 index 00000000000..f8c4d1e2e49 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/FilteredArchive.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/JarFileArchive$1.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/JarFileArchive$1.class new file mode 100644 index 00000000000..a90cb0bc728 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/JarFileArchive$1.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/JarFileArchive$JarFileEntry.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/JarFileArchive$JarFileEntry.class new file mode 100644 index 00000000000..6c5bf9f07e8 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/JarFileArchive$JarFileEntry.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/JarFileArchive.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/JarFileArchive.class new file mode 100644 index 00000000000..b9c39810ba5 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/archive/JarFileArchive.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/ByteArrayRandomAccessData.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/ByteArrayRandomAccessData.class new file mode 100644 index 00000000000..989982018c1 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/ByteArrayRandomAccessData.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessData$ResourceAccess.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessData$ResourceAccess.class new file mode 100644 index 00000000000..008788eda5f Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessData$ResourceAccess.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessData.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessData.class new file mode 100644 index 00000000000..9149938348b Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessData.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessDataFile$DataInputStream.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessDataFile$DataInputStream.class new file mode 100644 index 00000000000..b015904914d Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessDataFile$DataInputStream.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessDataFile$FilePool.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessDataFile$FilePool.class new file mode 100644 index 00000000000..29ac05fb0e1 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessDataFile$FilePool.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessDataFile.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessDataFile.class new file mode 100644 index 00000000000..d849de8028e Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/data/RandomAccessDataFile.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/Bytes.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/Bytes.class new file mode 100644 index 00000000000..9e1d26b288f Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/Bytes.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/CentralDirectoryEndRecord.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/CentralDirectoryEndRecord.class new file mode 100644 index 00000000000..f4366d339d4 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/CentralDirectoryEndRecord.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/Handler.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/Handler.class new file mode 100644 index 00000000000..7ca7691bf16 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/Handler.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarEntry.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarEntry.class new file mode 100644 index 00000000000..666b43434ca Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarEntry.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarEntryData.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarEntryData.class new file mode 100644 index 00000000000..98f9c6e65f7 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarEntryData.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarEntryFilter.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarEntryFilter.class new file mode 100644 index 00000000000..72878c90ec4 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarEntryFilter.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarFile$1.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarFile$1.class new file mode 100644 index 00000000000..24a06cc9177 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarFile$1.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarFile$2.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarFile$2.class new file mode 100644 index 00000000000..15d4aaa1d8d Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarFile$2.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarFile.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarFile.class new file mode 100644 index 00000000000..59c19f6cb2e Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarFile.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarURLConnection$1.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarURLConnection$1.class new file mode 100644 index 00000000000..9b051e7f27b Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarURLConnection$1.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarURLConnection$JarEntryName.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarURLConnection$JarEntryName.class new file mode 100644 index 00000000000..ee09110096b Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarURLConnection$JarEntryName.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarURLConnection.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarURLConnection.class new file mode 100644 index 00000000000..5f4f0134804 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/JarURLConnection.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/ZipInflaterInputStream.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/ZipInflaterInputStream.class new file mode 100644 index 00000000000..c6f9b607f9e Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/jar/ZipInflaterInputStream.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/util/AsciiBytes.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/util/AsciiBytes.class new file mode 100644 index 00000000000..f3aa984c827 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/util/AsciiBytes.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/util/SystemPropertyUtils.class b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/util/SystemPropertyUtils.class new file mode 100644 index 00000000000..60a020b10b8 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/org/springframework/boot/loader/util/SystemPropertyUtils.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/sample/simple/SampleSimpleApplication.class b/spring-boot-samples/spring-boot-sample-simple/sample/simple/SampleSimpleApplication.class new file mode 100644 index 00000000000..aded20abd7f Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/sample/simple/SampleSimpleApplication.class differ diff --git a/spring-boot-samples/spring-boot-sample-simple/sample/simple/service/HelloWorldService.class b/spring-boot-samples/spring-boot-sample-simple/sample/simple/service/HelloWorldService.class new file mode 100644 index 00000000000..8566069ee75 Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-simple/sample/simple/service/HelloWorldService.class differ diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/repackage/ProjectLibraries.java b/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/repackage/ProjectLibraries.java index b0ea449a1a9..dc74f3ed303 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/repackage/ProjectLibraries.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/repackage/ProjectLibraries.java @@ -75,18 +75,18 @@ class ProjectLibraries implements Libraries { @Override public void doWithLibraries(LibraryCallback callback) throws IOException { - Set custom = getLibraries(this.customConfigurationName, + Set custom = getLibraries(this.customConfigurationName, LibraryScope.CUSTOM); if (custom != null) { libraries(custom, callback); } else { - Set compile = getLibraries("compile", LibraryScope.COMPILE); + Set compile = getLibraries("compile", LibraryScope.COMPILE); - Set runtime = getLibraries("runtime", LibraryScope.RUNTIME); + Set runtime = getLibraries("runtime", LibraryScope.RUNTIME); runtime = minus(runtime, compile); - Set provided = getLibraries(this.providedConfigurationName, + Set provided = getLibraries(this.providedConfigurationName, LibraryScope.PROVIDED); if (provided != null) { compile = minus(compile, provided); @@ -99,13 +99,13 @@ class ProjectLibraries implements Libraries { } } - private Set getLibraries(String configurationName, LibraryScope scope) { + private Set getLibraries(String configurationName, LibraryScope scope) { Configuration configuration = (configurationName == null ? null : this.project .getConfigurations().findByName(configurationName)); if (configuration == null) { return null; } - Set libraries = new LinkedHashSet(); + Set libraries = new LinkedHashSet(); for (ResolvedArtifact artifact : configuration.getResolvedConfiguration() .getResolvedArtifacts()) { libraries.add(new ResolvedArtifactLibrary(artifact, scope)); @@ -115,14 +115,14 @@ class ProjectLibraries implements Libraries { return libraries; } - private Set getLibrariesForFileDependencies(Configuration configuration, + private Set getLibrariesForFileDependencies(Configuration configuration, LibraryScope scope) { - Set libraries = new LinkedHashSet(); + Set libraries = new LinkedHashSet(); for (Dependency dependency : configuration.getIncoming().getDependencies()) { if (dependency instanceof FileCollectionDependency) { FileCollectionDependency fileDependency = (FileCollectionDependency) dependency; for (File file : fileDependency.resolve()) { - libraries.add(new Library(file, scope)); + libraries.add(new GradleLibrary(fileDependency.getGroup(), file, scope)); } } else if (dependency instanceof ProjectDependency) { @@ -134,16 +134,16 @@ class ProjectLibraries implements Libraries { return libraries; } - private Set minus(Set source, Set toRemove) { + private Set minus(Set source, Set toRemove) { if (source == null || toRemove == null) { return source; } Set filesToRemove = new HashSet(); - for (Library library : toRemove) { + for (GradleLibrary library : toRemove) { filesToRemove.add(library.getFile()); } - Set result = new LinkedHashSet(); - for (Library library : source) { + Set result = new LinkedHashSet(); + for (GradleLibrary library : source) { if (!filesToRemove.contains(library.getFile())) { result.add(library); } @@ -151,24 +151,63 @@ class ProjectLibraries implements Libraries { return result; } - private void libraries(Set libraries, LibraryCallback callback) + private void libraries(Set libraries, LibraryCallback callback) throws IOException { if (libraries != null) { - for (Library library : libraries) { + Set duplicates = getDuplicates(libraries); + for (GradleLibrary library : libraries) { + library.setIncludeGroupName(duplicates.contains(library.getName())); callback.library(library); } } } + private Set getDuplicates(Set libraries) { + Set duplicates = new HashSet(); + Set seen = new HashSet(); + for (GradleLibrary library : libraries) { + if (library.getFile() != null && !seen.add(library.getFile().getName())) { + duplicates.add(library.getFile().getName()); + } + } + return duplicates; + } + + private class GradleLibrary extends Library { + + private final String group; + + private boolean includeGroupName; + + public GradleLibrary(String group, File file, LibraryScope scope) { + super(file, scope); + this.group = group; + } + + public void setIncludeGroupName(boolean includeGroupName) { + this.includeGroupName = includeGroupName; + } + + @Override + public String getName() { + String name = super.getName(); + if(this.includeGroupName && this.group != null) { + name = this.group + "-" + name; + } + return name; + } + + } + /** * Adapts a {@link ResolvedArtifact} to a {@link Library}. */ - private class ResolvedArtifactLibrary extends Library { + private class ResolvedArtifactLibrary extends GradleLibrary { private final ResolvedArtifact artifact; public ResolvedArtifactLibrary(ResolvedArtifact artifact, LibraryScope scope) { - super(artifact.getFile(), scope); + super(null, artifact.getFile(), scope); this.artifact = artifact; } diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java index 11baac4cd5e..ef35fc47376 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java @@ -128,7 +128,7 @@ public class JarWriter { public void writeNestedLibrary(String destination, Library library) throws IOException { File file = library.getFile(); - JarEntry entry = new JarEntry(destination + file.getName()); + JarEntry entry = new JarEntry(destination + library.getName()); if (library.isUnpackRequired()) { entry.setComment("UNPACK:" + FileUtils.sha1Hash(file)); } diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Library.java b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Library.java index 2da78f84e23..9d5443ef65a 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Library.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Library.java @@ -27,6 +27,8 @@ import java.io.File; */ public class Library { + private final String name; + private final File file; private final LibraryScope scope; @@ -49,11 +51,31 @@ public class Library { * @param unpackRequired if the library needs to be unpacked before it can be used */ public Library(File file, LibraryScope scope, boolean unpackRequired) { + this(null, file, scope, unpackRequired); + } + + /** + * Create a new {@link Library}. + * @param name the name of the library as it should be written or {@code null} to use + * the file name + * @param file the source file + * @param scope the scope of the library + * @param unpackRequired if the library needs to be unpacked before it can be used + */ + public Library(String name, File file, LibraryScope scope, boolean unpackRequired) { + this.name = (name == null ? file.getName() : name); this.file = file; this.scope = scope; this.unpackRequired = unpackRequired; } + /** + * @return the name of file as it should be written + */ + public String getName() { + return this.name; + } + /** * @return the library file */ diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java index 146ef0ae6e5..de3dddc09ce 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java @@ -20,6 +20,8 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.util.HashSet; +import java.util.Set; import java.util.jar.JarFile; import java.util.jar.Manifest; @@ -153,17 +155,22 @@ public class Repackager { throws IOException { final JarWriter writer = new JarWriter(destination); try { + final Set seen = new HashSet(); writer.writeManifest(buildManifest(sourceJar)); writer.writeEntries(sourceJar); - libraries.doWithLibraries(new LibraryCallback() { @Override public void library(Library library) throws IOException { File file = library.getFile(); if (isZip(file)) { String destination = Repackager.this.layout - .getLibraryDestination(file.getName(), library.getScope()); + .getLibraryDestination(library.getName(), + library.getScope()); if (destination != null) { + if (!seen.add(destination + library.getName())) { + throw new IllegalStateException("Duplicate library " + + library.getName()); + } writer.writeNestedLibrary(destination, library); } } diff --git a/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java b/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java index 7dc224ca3e7..377c7c44fb6 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java @@ -299,6 +299,25 @@ public class RepackagerTests { assertThat(entry.getComment().length(), equalTo(47)); } + @Test + public void duplicateLibraries() throws Exception { + TestJarFile libJar = new TestJarFile(this.temporaryFolder); + libJar.addClass("a/b/C.class", ClassWithoutMainMethod.class); + final File libJarFile = libJar.getFile(); + this.testJarFile.addClass("a/b/C.class", ClassWithMainMethod.class); + File file = this.testJarFile.getFile(); + Repackager repackager = new Repackager(file); + this.thrown.expect(IllegalStateException.class); + this.thrown.expectMessage("Duplicate library"); + repackager.repackage(new Libraries() { + @Override + public void doWithLibraries(LibraryCallback callback) throws IOException { + callback.library(new Library(libJarFile, LibraryScope.COMPILE, false)); + callback.library(new Library(libJarFile, LibraryScope.COMPILE, false)); + } + }); + } + @Test public void customLayout() throws Exception { TestJarFile libJar = new TestJarFile(this.temporaryFolder); diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/acme-lib/pom.xml b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/acme-lib/pom.xml new file mode 100644 index 00000000000..1959bcb58df --- /dev/null +++ b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/acme-lib/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + acme-lib + + + org.springframework.boot.maven.it + jar-lib-name-conflict + 0.0.1.BUILD-SNAPSHOT + + + + + org.springframework + spring-context + 4.0.5.RELEASE + + + diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/another-acme-lib/pom.xml b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/another-acme-lib/pom.xml new file mode 100644 index 00000000000..455e4714ecd --- /dev/null +++ b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/another-acme-lib/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + org.springframework.boot.maven.it.another + acme-lib + + + org.springframework.boot.maven.it + jar-lib-name-conflict + 0.0.1.BUILD-SNAPSHOT + + + diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/pom.xml b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/pom.xml new file mode 100644 index 00000000000..9e4f3a7284e --- /dev/null +++ b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/pom.xml @@ -0,0 +1,19 @@ + + + 4.0.0 + org.springframework.boot.maven.it + jar-lib-name-conflict + 0.0.1.BUILD-SNAPSHOT + pom + + UTF-8 + + + + acme-lib + another-acme-lib + test-project + + + diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/test-project/pom.xml b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/test-project/pom.xml new file mode 100644 index 00000000000..d15c97663be --- /dev/null +++ b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/test-project/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + org.springframework.boot.maven.it + test-project + 0.0.1.BUILD-SNAPSHOT + + UTF-8 + + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + + + + repackage + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.4 + + + + Foo + + + + + + + + + + org.springframework.boot.maven.it + acme-lib + 0.0.1.BUILD-SNAPSHOT + + + org.springframework.boot.maven.it.another + acme-lib + 0.0.1.BUILD-SNAPSHOT + + + javax.servlet + javax.servlet-api + 3.0.1 + provided + + + diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/test-project/src/main/java/org/test/SampleApplication.java b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/test-project/src/main/java/org/test/SampleApplication.java new file mode 100644 index 00000000000..0b3b431677d --- /dev/null +++ b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/test-project/src/main/java/org/test/SampleApplication.java @@ -0,0 +1,8 @@ +package org.test; + +public class SampleApplication { + + public static void main(String[] args) { + } + +} diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/verify.groovy b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/verify.groovy new file mode 100644 index 00000000000..18782c40193 --- /dev/null +++ b/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-lib-name-conflict/verify.groovy @@ -0,0 +1,14 @@ +import java.io.*; +import org.springframework.boot.maven.*; + +File f = new File(basedir, "test-project/target/test-project-0.0.1.BUILD-SNAPSHOT.jar") +new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) { + @Override + protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception { + super.verifyZipEntries(verifier) + verifier.assertHasEntryNameStartingWith("lib/org.springframework.boot.maven.it-acme-lib-0.0.1.BUILD-SNAPSHOT.jar") + verifier.assertHasEntryNameStartingWith("lib/org.springframework.boot.maven.it.another-acme-lib-0.0.1.BUILD-SNAPSHOT.jar") + } +}.verify(); + + diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/ArtifactsLibraries.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/ArtifactsLibraries.java index 7796158b48c..50280ea7c86 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/ArtifactsLibraries.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/ArtifactsLibraries.java @@ -20,11 +20,13 @@ import java.io.IOException; import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Dependency; +import org.apache.maven.plugin.logging.Log; import org.springframework.boot.loader.tools.Libraries; import org.springframework.boot.loader.tools.Library; import org.springframework.boot.loader.tools.LibraryCallback; @@ -51,22 +53,44 @@ public class ArtifactsLibraries implements Libraries { private final Collection unpacks; - public ArtifactsLibraries(Set artifacts, Collection unpacks) { + private final Log log; + + public ArtifactsLibraries(Set artifacts, Collection unpacks, + Log log) { this.artifacts = artifacts; this.unpacks = unpacks; + this.log = log; } @Override public void doWithLibraries(LibraryCallback callback) throws IOException { + Set duplicates = getDuplicates(this.artifacts); for (Artifact artifact : this.artifacts) { LibraryScope scope = SCOPES.get(artifact.getScope()); if (scope != null && artifact.getFile() != null) { - callback.library(new Library(artifact.getFile(), scope, + String name = artifact.getFile().getName(); + if (duplicates.contains(name)) { + this.log.debug("Duplicate found: " + name); + name = artifact.getGroupId() + "-" + name; + this.log.debug("Renamed to: " + name); + } + callback.library(new Library(name, artifact.getFile(), scope, isUnpackRequired(artifact))); } } } + private Set getDuplicates(Set artifacts) { + Set duplicates = new HashSet(); + Set seen = new HashSet(); + for (Artifact artifact : artifacts) { + if (artifact.getFile() != null && !seen.add(artifact.getFile().getName())) { + duplicates.add(artifact.getFile().getName()); + } + } + return duplicates; + } + private boolean isUnpackRequired(Artifact artifact) { if (this.unpacks != null) { for (Dependency unpack : this.unpacks) { @@ -78,4 +102,5 @@ public class ArtifactsLibraries implements Libraries { } return false; } + } diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index 0bfd9edacb7..df39e6c4073 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -153,7 +153,8 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { Set artifacts = filterDependencies(this.project.getArtifacts(), getFilters()); - Libraries libraries = new ArtifactsLibraries(artifacts, this.requiresUnpack); + Libraries libraries = new ArtifactsLibraries(artifacts, this.requiresUnpack, + getLog()); try { repackager.repackage(target, libraries); } diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ArtifactsLibrariesTests.java b/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ArtifactsLibrariesTests.java index b18c13006b9..24fb2972f6b 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ArtifactsLibrariesTests.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/ArtifactsLibrariesTests.java @@ -17,11 +17,14 @@ package org.springframework.boot.maven; import java.io.File; +import java.util.Arrays; import java.util.Collections; +import java.util.LinkedHashSet; import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Dependency; +import org.apache.maven.plugin.logging.Log; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; @@ -35,6 +38,8 @@ import org.springframework.boot.loader.tools.LibraryScope; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; /** @@ -63,7 +68,7 @@ public class ArtifactsLibrariesTests { public void setup() { MockitoAnnotations.initMocks(this); this.artifacts = Collections.singleton(this.artifact); - this.libs = new ArtifactsLibraries(this.artifacts, null); + this.libs = new ArtifactsLibraries(this.artifacts, null, mock(Log.class)); given(this.artifact.getFile()).willReturn(this.file); } @@ -88,9 +93,31 @@ public class ArtifactsLibrariesTests { Dependency unpack = new Dependency(); unpack.setGroupId("gid"); unpack.setArtifactId("aid"); - this.libs = new ArtifactsLibraries(this.artifacts, Collections.singleton(unpack)); + this.libs = new ArtifactsLibraries(this.artifacts, Collections.singleton(unpack), + mock(Log.class)); this.libs.doWithLibraries(this.callback); verify(this.callback).library(this.libraryCaptor.capture()); assertThat(this.libraryCaptor.getValue().isUnpackRequired(), equalTo(true)); } + + @Test + public void renamesDuplicates() throws Exception { + Artifact artifact1 = mock(Artifact.class); + Artifact artifact2 = mock(Artifact.class); + given(artifact1.getType()).willReturn("jar"); + given(artifact1.getScope()).willReturn("compile"); + given(artifact1.getGroupId()).willReturn("g1"); + given(artifact1.getFile()).willReturn(new File("a")); + given(artifact2.getType()).willReturn("jar"); + given(artifact2.getScope()).willReturn("compile"); + given(artifact2.getGroupId()).willReturn("g2"); + given(artifact2.getFile()).willReturn(new File("a")); + this.artifacts = new LinkedHashSet(Arrays.asList(artifact1, artifact2)); + this.libs = new ArtifactsLibraries(this.artifacts, null, mock(Log.class)); + this.libs.doWithLibraries(this.callback); + verify(this.callback, times(2)).library(this.libraryCaptor.capture()); + assertThat(this.libraryCaptor.getAllValues().get(0).getName(), equalTo("g1-a")); + assertThat(this.libraryCaptor.getAllValues().get(1).getName(), equalTo("g2-a")); + } + }