boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 180 forks source link

Include classifier when deploying artifacts, fixes #623 #625

Closed arichiardi closed 6 years ago

arichiardi commented 7 years ago

This patch fixes bug #623.

This also refactors the code so that if a classifier is found in the artifact definition, we don't sign the pom. The pom is signed only for the main .jar artifact.

With :classifier correctly set to either javadoc and sources, we can deploy signed artifact for Maven Central/Sonatype. Before, the artifacts were rejected by their automated "quality assurance" system.

The necessary steps for adding sources and javadoc are just a few. Specifically, you need to use the jar task with :file options and append :classifier to the pom task:

(comp
   ...
    (pom :classifier "sources")
    (jar :project 'group-id/project-name
           :file (str/join "-" [artifact-name artifact-version "sources.jar"]))
   ...)
arichiardi commented 6 years ago

Ok done :wink: