Search code examples
javamavengentoo

How to link to maven source jar from an ebuild


I am trying to create an ebuild for gentoo. The ebuild is supposed to download sources using this string

SRC_URI="http://search.maven.org/remotecontent?filepath=com/github/moaxcp/${PN}/${PN}/${PV}/${P}-sources.jar"

When I run the ebuild the url is translated to

http://search.maven.org/remotecontent?filepath=com/github/moaxcp/recMD5/recMD5/1.0.1/recMD5-1.0.1-sources.jar

The link is not correct and returns 404.

What is the standard for creating a link to an artifact in maven central?


Solution

  • Link directly to the resource:

    SRC_URI="https://repo1.maven.org/maven2/com/github/moaxcp/${PN}/${PV}/${P}-sources.jar"