Skip to content

Commit

Permalink
[fix] java service plugins for jetty.HttpFieldPreEncoder is not inclu…
Browse files Browse the repository at this point in the history
…ded in jar
  • Loading branch information
funa-tk committed Jan 15, 2020
1 parent 52b9017 commit 7124ff3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,16 @@ jmh {
}

jar {
doFirst {
def serviceDir = file("${buildDir}/META-INF/services")
serviceDir.deleteDir()
serviceDir.mkdirs()
for (file in configurations.runtime) {
zipTree(file).matching{ include 'META-INF/services/*' }.each { f ->
new File(serviceDir, f.name) << f.getText("UTF-8") << "\n"
}
}
}
manifest {
attributes (
"Main-Class": project.mainClassName,
Expand All @@ -207,6 +217,11 @@ jar {
}
}
}
from {
fileTree(buildDir).matching {
include 'META-INF/services/*'
}
}
}

task prepareJPackage(dependsOn: "jar") {
Expand Down

0 comments on commit 7124ff3

Please sign in to comment.