Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

255
Views
Elimine el sufijo "-all" en el nombre de JAR, cuando se publica mediante el complemento maven-publish gradle

El complemento maven-publish publica JAR con el nombre en formato "project-1.0-all.jar"

Usé Maven, todo estuvo bien. Ahora he migrado a Gradle con el complemento maven-publish.

Aquí está mi sección de script de compilación Gradle de publishing

 publishing { publications { create<MavenPublication>("mavenJava") { artifact(this@run["shadowJar"]) pom { artifactId = project.name groupId = project.group.toString() packaging = "jar" name.set(project.name) description.set(project.description) url.set("https://gitlab.com/otherwise.su/config") inceptionYear.set("2018") licenses { license { comments.set("Open-source license") distribution.set("repo") name.set("Лицензия") url.set("https://gitlab.com/otherwise.su/config/blob/master/LICENSE.md") } } developers { developer { email.set("postovalovya@gmail.com") id.set("CMDR_Tvis") name.set("Commander Tvis") roles.set(listOf("architect", "developer")) timezone.set("Russian Federation/Novosibirsk") url.set("https://gitlab.com/CMDR_Tvis") } } } } } repositories { maven("https://gitlab.com/api/v4/projects/10077943/packages/maven") { credentials(HttpHeaderCredentials::class) { name = "Job-Token" value = System.getenv("CI_JOB_TOKEN") } authentication { register("header", HttpHeaderAuthentication::class) } } } }

Aquí está mi script de compilación completo.

Esperado:

Se publica JAR con nombre por formato "project-1.0.jar".

Actual:

Se publica JAR con nombre por formato "project-1.0-all.jar.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Para cambiar el clasificador JAR para el artefacto publicado, reemplace

 artifact(this@run["shadowJar"])

con

 artifact(this@run["shadowJar"]) { classifier = null }

Esto debería eliminar el sufijo all que el complemento Shadow establece como clasificador.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!