diff --git a/buildSrc/src/main/groovy/org/opensearch/hadoop/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/opensearch/hadoop/gradle/BuildPlugin.groovy index f64437f06..d39e73f0c 100644 --- a/buildSrc/src/main/groovy/org/opensearch/hadoop/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/opensearch/hadoop/gradle/BuildPlugin.groovy @@ -679,7 +679,7 @@ class BuildPlugin implements Plugin { // Set the pom's destination to the distribution directory project.tasks.withType(GenerateMavenPom).all { GenerateMavenPom pom -> if (pom.name == "generatePomFileFor${publication.name.capitalize()}Publication") { - pom.destination = project.provider({"${project.buildDir}/poms/${project.base.archivesName}-${project.getVersion()}.pom"}) + pom.destination = project.provider({"${project.buildDir}/poms/${project.base.archivesName.get()}-${project.getVersion()}.pom"}) } } @@ -738,7 +738,7 @@ class BuildPlugin implements Plugin { private static void updateVariantPomLocationAndArtifactId(Project project, MavenPublication publication, SparkVariant variant) { // Add variant classifier to the pom file name if required String classifier = variant.shouldClassifySparkVersion() && variant.isDefaultVariant() == false ? "-${variant.getName()}" : '' - String filename = "${project.base.archivesName}_${variant.scalaMajorVersion}-${project.getVersion()}${classifier}" + String filename = "${project.base.archivesName.get()}_${variant.scalaMajorVersion}-${project.getVersion()}${classifier}" // Fix the pom name project.tasks.withType(GenerateMavenPom).all { GenerateMavenPom pom -> if (pom.name == "generatePomFileFor${publication.name.capitalize()}Publication") { @@ -749,7 +749,7 @@ class BuildPlugin implements Plugin { publication.getPom().withXml { XmlProvider xml -> Node root = xml.asNode() Node artifactId = (root.get('artifactId') as NodeList).get(0) as Node - artifactId.setValue("${project.base.archivesName}_${variant.scalaMajorVersion}") + artifactId.setValue("${project.base.archivesName.get()}_${variant.scalaMajorVersion}") } } diff --git a/dist/build.gradle b/dist/build.gradle index d73ce7ddb..ef7269159 100644 --- a/dist/build.gradle +++ b/dist/build.gradle @@ -145,7 +145,7 @@ publishing { repository.appendNode('url', 'https://clojars.org/repo') // Correct the artifact Id, otherwise it is listed as 'dist' - root.get('artifactId').get(0).setValue(project.base.archivesName) + root.get('artifactId').get(0).setValue(project.base.archivesName.get()) } } }