Skip to content
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

deploying jars with classifiers appears to be broken #511

Closed
cprice404 opened this issue Mar 8, 2016 · 17 comments
Closed

deploying jars with classifiers appears to be broken #511

cprice404 opened this issue Mar 8, 2016 · 17 comments

Comments

@cprice404
Copy link

Many of our projects include 2 jars; a 'main' jar and a second jar with a 'test' classifier that contains test utility code for use by downstream libraries.

Historically we've had no troubles with this approach and it's worked fine with clojars. Here's an example of an artifact that was successfully published with this pattern:

https://clojars.org/repo/puppetlabs/trapperkeeper-webserver-jetty9/1.5.2/

However, we tried to do another release of this library today and, although lein reported a successful deploy and logged information about sending up the test jar, the repo directory does not contain the test jar:

https://clojars.org/repo/puppetlabs/trapperkeeper-webserver-jetty9/1.5.3/

Subsequently, I tried to do a deploy of a 1.5.4-SNAPSHOT artifact for the same project. It also showed the test jar being sent up to clojars in the lein output, but it ended up in an even weirder state:

https://clojars.org/repo/puppetlabs/trapperkeeper-webserver-jetty9/1.5.4-SNAPSHOT/

in this deployment it appears that the test jar was uploaded but the filename it was given is the filename of the main jar; so, the main jar has the test content, and the "real" main jar just doesn't seem to be in the repo.

Has anything changed lately that would affect the deployment of jars with classifiers?

@danielcompton
Copy link
Member

Yep, we just had a deploy which changed validation of uploads https://groups.google.com/forum/#!topic/clojars-maintainers/Y4ToszKujDU, this is almost certainly the issue. Paging @tobias.

@cprice404
Copy link
Author

Any chance that could be rolled back? We're working on a release of some downstream projects that are blocked by this, so we're starting to consider some drastic options that will make us sad :)

@tobias
Copy link
Member

tobias commented Mar 8, 2016

@cprice404 - sorry for the trouble - I'll take a look right now to see if this would be a straightforward fix before considering rolling back.

@cprice404
Copy link
Author

@tobias thanks! much appreciated.

@tobias
Copy link
Member

tobias commented Mar 8, 2016

@cprice404 I'm trying to recreate locally. What's the lein command you would use to deploy with the classifier jar included?

@tobias
Copy link
Member

tobias commented Mar 8, 2016

Nevermind - I have built a simpler app that demonstrates the issue. Working on a fix now.

tobias added a commit that referenced this issue Mar 8, 2016
We were ignoring classifiers when building the artifact-map for aether,
so the classified jars were left in the tmp repo, and whatever jar was
last in the list was used as the primary (nil-classified) jar.
@tobias
Copy link
Member

tobias commented Mar 8, 2016

@cprice404 - I've deployed a fix to production - can you deploy 1.5.4-SNAPSHOT again? If that works, a release deploy will work, and I can then delete 1.5.3 for you if you like and let you redeploy it as well.

@cprice404
Copy link
Author

@tobias awesome, thanks so much, will test now.

@cprice404
Copy link
Author

I redeployed 1.5.4-SNAPSHOT but it's hard to tell at a glance if that worked because there are a lot of files in there now.

So I did a deploy of a 1.5.4-testclojarsfix-SNAPSHOT:

https://clojars.org/repo/puppetlabs/trapperkeeper-webserver-jetty9/1.5.4-testclojarsfix-SNAPSHOT/

It still appears to just have one jar, the pom, and the checksum files, unfortunately.

@tobias
Copy link
Member

tobias commented Mar 8, 2016

Ah, darn. My fix won't work for SNAPSHOTS, since the version in the pom doesn't match the version of the file (since it's timestamp-based). Let me take another crack at it.

tobias added a commit that referenced this issue Mar 9, 2016
The previous fix wasn't enough, since it used the version from the pom
to split filenames when determining the classifier, and the version in
the filename doesn't match the version from the pom for snapshots, since
the former will be a timestamp-based version.
@tobias
Copy link
Member

tobias commented Mar 9, 2016

Alright, another fixed deployed, and I was able to deploy both snapshot and non-snapshot releases that have classifiers of a test app. @cprice404 - can you try another snapshot please to confirm?

@cprice404
Copy link
Author

yep, testing now

@cprice404
Copy link
Author

@tobias that looks like it worked for the SNAPSHOT. I'm going to just try doing a 1.5.4 release now.

@cprice404
Copy link
Author

My 1.5.4 release looks clean. Thanks a ton for the quick turnaround!!

@tobias
Copy link
Member

tobias commented Mar 9, 2016

Sure thing, sorry for the bug, and thanks for your patience. Do you want me to remove those test snapshot releases (cpricetest1, testclojarsfix*)?

@cprice404
Copy link
Author

Sure, that'd be great. You can remove 1.5.4-SNAPSHOT as well if it's easy.

@tobias
Copy link
Member

tobias commented Mar 9, 2016

1.5.4-SNAPSHOT, 1.5.4-cpricetest1-SNAPSHOT, 1.5.4-testclojarsfix-SNAPSHOT, and 1.5.4-testclojarsfix2-SNAPSHOT have been deleted.

Closing, feel free to reopen or open a new issue if you see any more issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants