Skip to content

Commit 1e6b99d

Browse files
authored
Publish to maven using pom only with jar packaging (#228)
1 parent 0ac0c0b commit 1e6b99d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

otelagent/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ tasks {
100100
attributes.put("Implementation-Version", implementationVersion)
101101
}
102102
}
103+
104+
// Since we are reconfiguring the publishing procedure to only include the shadow jar, the Gradle metadata file
105+
// generated is no longer valid. Instead we should rely only on the pom generated.
106+
withType<GenerateModuleMetadata>().configureEach {
107+
enabled = false
108+
}
103109
}
104110

105111
val shadowJar = tasks.named("shadowJar")
@@ -114,6 +120,10 @@ tasks {
114120
publications {
115121
named<MavenPublication>("maven") {
116122
artifact(archiveFile)
123+
pom {
124+
// Force packaging in the POM.
125+
packaging = "jar"
126+
}
117127
}
118128
}
119129
}

0 commit comments

Comments
 (0)