-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<scm><tag> value in pom.xml is overwritten with incorrect value #841
Comments
Is there a way to tell Clojars not to mess with any values that I provide in the `pom.xml` I deploy to it? I'm comfortable for Clojars to augment the data that's there with anything that's missing that Clojars considers mandatory, but overwriting data that I provide seems quite problematic, especially (as in this case) when the Clojars-generated value is invalid.
Hi @pmonks! Clojars does not do any rewriting of the pom on deploy (or ever); the pom that your deploy client sends is the one we use. So you will need to look at your build tooling.
Looking at the pom.xml that was embedded in the [deployed jar](https://repo.clojars.org/com/github/pmonks/clj-wcwidth/1.0.64/clj-wcwidth-1.0.64.jar), the pom file in it (under `META-INF/maven/com.github.pmonks/clj-wcwidth/pom.xml`) also has the v-prefixed tag, so your tooling is generating the pom before building the jar (if that helps track it down).
…On Mon, Jul 25, 2022, at 21:57, Peter Monks wrote:
I have a project <https://github.com/pmonks/clj-wcwidth/> that publishes artifacts to Clojars, and those artifacts include a `pom.xml` file that (amongst other things) contains this element:
<scm>
<url>https://github.com/pmonks/clj-wcwidth</url>
<connection>scm:git:git://github.com/pmonks/clj-wcwidth.git</connection>
***@***.***/pmonks/clj-wcwidth.git</developerConnection>
<tag>1.0.64</tag>
</scm>
However after deployment, the `pom.xml` file hosted by Clojars <https://repo.clojars.org/com/github/pmonks/clj-wcwidth/1.0.64/clj-wcwidth-1.0.64.pom> contains this element instead:
<scm>
<url>https://github.com/pmonks/clj-wcwidth</url>
<connection>scm:git:git://github.com/pmonks/clj-wcwidth.git</connection>
***@***.***/pmonks/clj-wcwidth.git</developerConnection>
<tag>v1.0.64</tag>
</scm>
Note the letter 'v' added as a suffix to the value of the `<tag>` nested element.
This value is invalid, as there is no tag `v1.0.64` in the source repository <https://github.com/pmonks/clj-wcwidth/tree/v1.0.64>, and this causes some downstream tooling to fail <https://cljdoc.org/builds/59944>. There is a `1.0.64` tag in that repository however <https://github.com/pmonks/clj-wcwidth/tree/1.0.64>, so if the original value that was deployed had been preserved, the downstream tooling would function as expected.
Is there a way to tell Clojars not to mess with any values that I provide in the `pom.xml` I deploy to it? I'm comfortable for Clojars to augment the data that's there with anything that's missing that Clojars considers mandatory, but overwriting data that I provide seems quite problematic, especially (as in this case) when the Clojars-generated value is invalid.
—
Reply to this email directly, view it on GitHub <#841>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAAUR3TXEE23P2LHYHQMLTVV5AY5ANCNFSM54UHPZIQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Thanks @tobias! I'm at quite a loss then, as another project I checked (not written by me, but one that I've used in some other projects of mine) also has some strange But if it's not Clojars, the only other possibility I can think of is that both tools.build/deps-deploy and Leiningen use some shared underlying code for building and/or deploying |
Not sure if it helps but the v prefix sounds likes the default behaviour of lein release. |
Thanks @danielcompton! Yeah my project (which I have more visibility into / control over, obvs) uses tools.build+deps-deploy, so in theory Leiningen shouldn't be a factor. But perhaps deps-deploy uses some of the same code as lein release? My current lines of investigation:
|
Ok I think I've found the root cause of the problem. I'll raise an issue against build-clj. |
I have a project that publishes artifacts to Clojars, and those artifacts include a
pom.xml
file that (amongst other things) contains this element:However after deployment, the
pom.xml
file hosted by Clojars contains this element instead:Note the letter 'v' added as a suffix to the value of the
<tag>
nested element.This value is invalid, as there is no tag
v1.0.64
in the source repository, and this causes some downstream tooling to fail. There is a1.0.64
tag in that repository however, so if the original value that was deployed had been preserved, the downstream tooling would function as expected.Is there a way to tell Clojars not to mess with any values that I provide in the
pom.xml
I deploy to it? I'm comfortable for Clojars to augment the data that's there with anything that's missing that Clojars considers mandatory, but overwriting data that I provide seems quite problematic, especially (as in this case) when the Clojars-generated value is invalid.The text was updated successfully, but these errors were encountered: