tools-build

mpenet 2023-10-05T08:46:04.768999Z

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.

borkdude 2024-01-30T15:03:10.189159Z

I ran into this problem as well. What is the de facto solution for build.clj based deployments to add a license?

Alex Miller (Clojure team) 2024-01-30T15:05:41.395299Z

I added support for adding generic tags in :pom-data

Alex Miller (Clojure team) 2024-01-30T15:06:11.062299Z

https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-write-pom has an example in the docstring

borkdude 2024-01-30T15:06:49.815719Z

cool, so :pom-data is what I need then

borkdude 2024-01-30T15:13:35.213249Z

worked

souenzzo 2023-10-05T09:34:52.102679Z

you can add a pom.xml template like this https://github.com/seancorfield/next-jdbc/blob/develop/template/pom.xml#L7

mpenet 2023-10-05T09:35:12.397179Z

I want to avoid that

souenzzo 2023-10-05T09:35:14.237979Z

then you add this template to your build https://github.com/seancorfield/next-jdbc/blob/develop/build.clj#L45

souenzzo 2023-10-05T09:36:23.687109Z

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

mpenet 2023-10-05T09:39:38.323519Z

The clojars change was made on the 29th of September, I am not sure they’ll be able to deploy the next version

2023-10-05T11:01:29.773199Z

Why do you want to avoid using a pom template?

2023-10-05T11:02:36.356019Z

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.

mpenet 2023-10-05T11:03:26.091649Z

I don't think that's entiredly true, if you publish a new version of a lib you have to adapt

2023-10-05T11:05:33.621899Z

Yes, that is true. New projects must start with a license. Existing projects have the time to adjust.

mpenet 2023-10-05T11:05:34.774259Z

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

2023-10-05T11:06:07.293019Z

That's because the last version released had a license.

2023-10-05T11:06:32.703709Z

Only projects where the last released version did not have a license can continue to not send one.

mpenet 2023-10-05T11:06:34.710199Z

the release script didn't change

mpenet 2023-10-05T11:06:43.601429Z

I ll double check, but that seems odd

2023-10-05T11:07:52.316659Z

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

mpenet 2023-10-05T11:08:09.235349Z

I suspect somebody might have manually created a pom with the license to avoid this (got back from holidays today). I ll digg

mpenet 2023-10-05T11:08:17.725249Z

yes I just noticed

mpenet 2023-10-05T11:08:19.291539Z

in any case

mpenet 2023-10-05T11:08:31.159669Z

it would be nice if b/write-pom would support a :licenses key

mpenet 2023-10-05T11:08:44.597299Z

so that we don't have to put templates in every-one of our repos

mpenet 2023-10-05T11:08:51.357499Z

(public ones)

2023-10-05T11:08:56.173519Z

Yes, I agree.

mpenet 2023-10-05T11:46:04.215359Z

@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.

2023-10-05T11:50:52.426649Z

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

mpenet 2023-10-05T11:52:23.922739Z

voted

mpenet 2023-10-05T11:52:32.076689Z

I missed you already did post on ask

👍 1
Alex Miller (Clojure team) 2023-10-05T12:51:14.739479Z

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