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

sources-jar lacks source code on jitpack.io #493

Open
fsudau opened this issue May 27, 2024 · 0 comments
Open

sources-jar lacks source code on jitpack.io #493

fsudau opened this issue May 27, 2024 · 0 comments

Comments

@fsudau
Copy link

fsudau commented May 27, 2024

Bug Description

Hi, I noticed that the db-scheduler-14.0.0-sources.jar from jitpack.io does not actually contain the sources (it only contains sources of two shaded dependencies). However, the sources-jar from the official repo contains the sources as expected.

This can be a bit annoying since maven does not really allow you to specify which dependency to load from which repository. Once jitpack is listed as one of your repositories, chances are maven will load the sources-jar from there and db-scheduler's source code will not load into your IDE automatically.

Background

Looking into this, I noticed that jitpack relies on a very proactive approach: Once someone uses your library for the first time, they will checkout your code and build it for their repo. They have a log of the build available here. As evident from the log, they just run mvn clean install -DskipTests and store the resulting jars. The install command does indeed generate a sources-jar that does not contain the sources. I assume this has to do with the shade-plugin and how it interacts with the other plugins.

Severity

This is of course very specific (aka minor), but if someone could optimize the maven lifecycles so that the sources-build works for both repositories, I am sure this will save some developers some time in the future :)

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

No branches or pull requests

2 participants