It seems now clojars requires "<licenses>..." in pom.xml files, but tools.build doesn't support that just yet. I could provide a patch if there's interest.
I ran into this problem as well. What is the de facto solution for build.clj based deployments to add a license?
I added support for adding generic tags in :pom-data
https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-write-pom has an example in the docstring
cool, so :pom-data is what I need then
worked
you can add a pom.xml template like this
https://github.com/seancorfield/next-jdbc/blob/develop/template/pom.xml#L7
I want to avoid that
then you add this template to your build https://github.com/seancorfield/next-jdbc/blob/develop/build.clj#L45
https://github.com/walmartlabs/lacinia it built with #tools-build, don't use this XML trick and it published into clojars. you can try to reproduce what lacinia does
The clojars change was made on the 29th of September, I am not sure they’ll be able to deploy the next version
Why do you want to avoid using a pom template?
Vote here: https://ask.clojure.org/index.php/13341/is-tools-build-considering-adding-a-license-argument
Note: if a project does not provide a license in a pom currently and already has releases, it can continue to release w/o a license until the end of the year, so you have time to adjust.
I don't think that's entiredly true, if you publish a new version of a lib you have to adapt
Yes, that is true. New projects must start with a license. Existing projects have the time to adjust.
I just tried to push a new version of https://clojars.org/exoscale/blueprint-core and I get cution error (AuthorizationException) at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon/put (AbstractHttpClientWagon.java:806). Authorization failed for https://repo.clojars.org/exoscale/blueprint-core/maven-metadata.xml 403 Forbidden - the POM file does not include a license. See https://bit.ly/3PQunZU
That's because the last version released had a license.
Only projects where the last released version did not have a license can continue to not send one.
the release script didn't change
I ll double check, but that seems odd
The pom for 0.2.80 has MIT/ISC as the license: https://repo.clojars.org/exoscale/blueprint-core/0.2.80/blueprint-core-0.2.80.pom
I suspect somebody might have manually created a pom with the license to avoid this (got back from holidays today). I ll digg
yes I just noticed
in any case
it would be nice if b/write-pom would support a :licenses key
so that we don't have to put templates in every-one of our repos
(public ones)
Yes, I agree.
@alexmiller. https://github.com/clojure/tools.build/commit/df75a6c3f9d2297f27da572836d004fd66b8d894 Let me know if that's ok, in that case I'd create a jira and follow the usual process.
I posted the Ask which is where such questions should go first and get voted on to indicate the level of community desire, which should happen before any Jira tickets are opened
voted
I missed you already did post on ask
I saw the post, will take a look when I have a chance. I’m not too inclined to add a :license attribute but want to consider a few other options