Skip to content

Commit 189f2c9

Browse files
authored
Revert "Workaround shadowJar bug" (vert-x3#771)
This reverts commit 27eaa62. This is no longer required as we build the project with Maven. Signed-off-by: Thomas Segismont <[email protected]>
1 parent c735478 commit 189f2c9

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/main/java/io/vertx/starter/service/GeneratorService.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ private void createProject(VertxProject project, TempDir tempDir) throws IOExcep
140140
if (project.getLanguage() == KOTLIN) {
141141
copy(tempDir, "files/gradle", "gradle.properties");
142142
}
143-
copy(tempDir, "files/gradle", "gradle/wrapper/gradle-wrapper.jarr");
143+
copy(tempDir, "files/gradle", "gradle/wrapper/gradle-wrapper.jar");
144144
copy(tempDir, "files/gradle", "gradle/wrapper/gradle-wrapper.properties");
145145
render(tempDir, ctx, ".", "build.gradle.kts");
146146
render(tempDir, ctx, ".", "settings.gradle.kts");
147147
} else if (project.getBuildTool() == MAVEN) {
148148
copy(tempDir, "files/maven", "mvnw");
149149
copy(tempDir, "files/maven", "mvnw.cmd");
150-
copy(tempDir, "files/maven", "_mvn/wrapper/maven-wrapper.jarr");
150+
copy(tempDir, "files/maven", "_mvn/wrapper/maven-wrapper.jar");
151151
copy(tempDir, "files/maven", "_mvn/wrapper/maven-wrapper.properties");
152152
render(tempDir, ctx, ".", "pom.xml");
153153
} else {
@@ -223,7 +223,7 @@ private void generateArchive(TempDir tempDir, ArchiveOutputStream stream) throws
223223
private void addFile(Path rootPath, Path filePath, ArchiveOutputStream stream) throws IOException {
224224
String relativePath = rootPath.relativize(filePath).toString();
225225
if (relativePath.length() == 0) return;
226-
String entryName = jarFileWorkAround(leadingDot(relativePath));
226+
String entryName = leadingDot(relativePath);
227227
ArchiveEntry entry = stream.createArchiveEntry(filePath.toFile(), entryName);
228228
if (EXECUTABLES.contains(entryName)) {
229229
if (entry instanceof ZipArchiveEntry zipArchiveEntry) {
@@ -245,11 +245,6 @@ private String leadingDot(String s) {
245245
return s.charAt(0) == '_' ? '.' + s.substring(1) : s;
246246
}
247247

248-
private String jarFileWorkAround(String s) {
249-
// See https://github.com/johnrengelman/shadow/issues/111
250-
return s.endsWith(".jarr") ? s.substring(0, s.length() - ".jarr".length()) + ".jar" : s;
251-
}
252-
253248
@FunctionalInterface
254249
private interface ArchiveOutputStreamFactory {
255250
ArchiveOutputStream create(ByteArrayOutputStream baos) throws IOException;

0 commit comments

Comments
 (0)