Fork me on GitHub
#clojars
<
2020-02-19
>
Bjagg06:02:18

Hi folks, I am trying to create my first clojar. Getting an error on the maven-metadata.xml file. It’s not being found in the repo (obviously), but it fails with a 400 Bad Request when attempting to upload. Anyone run into something similar? Anyway to see the server logs?

tcrawley13:02:37

Can you share the full output of your deploy attempt?

Bjagg16:02:26

$ lein deploy
Created /Users/bgonzalez/src/eve-api-client/target/eve-api-client-1.3.8-SNAPSHOT.jar
Wrote /Users/bgonzalez/src/eve-api-client/pom.xml
Could not find metadata org.clojars.bjagg:eve-api-client:1.3.8-SNAPSHOT/maven-metadata.xml in snapshots ()
Sending org/clojars/bjagg/eve-api-client/1.3.8-SNAPSHOT/eve-api-client-1.3.8-20200219.163650-1.jar (44k)
    to 
Sending org/clojars/bjagg/eve-api-client/1.3.8-SNAPSHOT/eve-api-client-1.3.8-20200219.163650-1.pom (3k)
    to 
Could not transfer metadata org.clojars.bjagg:eve-api-client/maven-metadata.xml from/to snapshots (): Failed to transfer file: . Return code is: 400 , ReasonPhrase:Bad Request.
Failed to retrieve remote metadata org.clojars.bjagg:eve-api-client/maven-metadata.xml: Could not transfer metadata org.clojars.bjagg:eve-api-client/maven-metadata.xml from/to snapshots (): Failed to transfer file: . Return code is: 400 , ReasonPhrase:Bad Request.

Bjagg16:02:00

Github repo is [email protected]:bjagg/eve-api-client.git

Bjagg16:02:21

lein install works and creates a maven-metadata.xml file in my local repo

tcrawley01:02:30

Thanks! Sorry for not getting back to you sooner, the day job has kept me busy. I haven't been able to recreate this. From looking in the logs on the server, I can see all of the artifacts making it there except the maven-metadata.xml - I don't see the request making it to the server for your failed deploys. That makes me think there is a problem at the fastly CDN level and that is what is returning the 400. But when I try it locally with a brand new artifact or a new snapshot version, it succeeds. What version of lein are you using (what is the output of lein version)? What version of java (output of java -version)?

👍 4
Bjagg02:02:09

No worries 🙂

Bjagg02:02:35

$ lein -version
Leiningen 2.9.1 on Java 1.8.0_231 Java HotSpot(TM) 64-Bit Server VM

Bjagg02:02:49

$ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

Bjagg02:02:03

I’ll try deploying from Linux next chance I get

Bjagg17:02:14

Getting the same issue in Linux. I ran lein deploy file:///tmp and found all the files expected under /tmp/org/clojars/bjagg/eve-api-client

tcrawley17:02:24

Can you try deploying to https://clojars.org/repo/ and see if you get the same result? That will eliminate the CDN from the PUT requests at least

Bjagg17:02:39

W00t! That did it

tcrawley17:02:40

Great! That also helps me narrow down what's happening. I plan to spend some time this evening on it to see if I can recreate it.

Bjagg17:02:54

Good luck -- let me know if you need some assistance.

tcrawley17:02:10

Thanks! Will do.