From bf42913c236ece25559afbfd7b9c184cb110c0e0 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Fri, 29 Jan 2016 17:01:33 -0800 Subject: [PATCH] Fix artifact upload for compiler check-artifact.sh was broken by the update to Gradle 2.10. We think the update to Gradle 2.8 caused the POM to start being generated, but this now fixes it to have the correct contents. Using addFilter _disables_ the normal POM, so we use setFilter instead. Fixes #1360 --- compiler/build.gradle | 15 ++++++++++++++- compiler/check-artifact.sh | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/compiler/build.gradle b/compiler/build.gradle index b65e058f57..a48799297e 100644 --- a/compiler/build.gradle +++ b/compiler/build.gradle @@ -194,7 +194,7 @@ artifacts { [ install.repositories.mavenInstaller, uploadArchives.repositories.mavenDeployer, -]*.addFilter('all') {artifact, file -> +]*.setFilter {artifact, file -> ! (file.getName().endsWith('jar') || file.getName().endsWith('jar.asc')) } @@ -210,6 +210,19 @@ artifacts { } } +[ + install.repositories.mavenInstaller, + uploadArchives.repositories.mavenDeployer, +]*.pom*.whenConfigured { pom -> + pom.project { + // This isn't any sort of Java archive artifact, and OSSRH doesn't enforce + // javadoc for 'pom' packages. 'exe' would be a more appropriate packaging + // value, but it isn't clear how that will be interpreted. In addition, + // 'pom' is typically the value used when building an exe with Maven. + packaging = "pom" + } +} + test.dependsOn('testGolden', 'testNanoGolden') def configureTestTask(Task task, String suffix, String extraPackage) { diff --git a/compiler/check-artifact.sh b/compiler/check-artifact.sh index 7dbd259204..a915e2acba 100755 --- a/compiler/check-artifact.sh +++ b/compiler/check-artifact.sh @@ -125,5 +125,5 @@ checkDependencies () echo } -FILE="build/artifacts/java_pluginExecutable/protoc-gen-grpc-java.exe" +FILE="build/artifacts/java_plugin/protoc-gen-grpc-java.exe" checkArch "$FILE" && checkDependencies "$FILE"