2

I'm new to working with Java and have questions regarding the Maven Central Repository. I am much more familiar with Python and PyPI, so I will provide the equivalent in PyPI that I would like to find in Maven.

  1. How can I find the source code for the artifacts in Maven Central? Typically, I see the JAR file and prefer not to decompile these files. Typically, PyPI packages have the source file type in the "Download files" tab.

  2. How can I find the associated project URL to a maven artifact? In PyPI, the package page has a set of project links and generally provides a repository link (e.g., Github, Bitbucket)

  3. How can I identify open-source projects in the Maven central repository? The license for PyPI projects is tagged directly in the meta-reference on the sidebar of a project page.

I appreciate any insight into these questions. Thanks!

travis5879
  • 35
  • 3
  • You can configure maven to download the sources and javadocs. See this other question: [Maven – Always download sources and javadocs](https://stackoverflow.com/questions/5780758/maven-always-download-sources-and-javadocs) - Also you can configure your IDE (intellij or eclipse?) to download these, so you can naviagate to the code rather than decompiling the code. – Augusto Dec 09 '21 at 23:35

1 Answers1

2
  1. When a distributor decides to provide them, you can find -sources.jar and a -javadoc.jar files in the artifacts folder. (common IDE's are aware of that&provide buttons/menus, "Maven>Download XXX";)

  2. In the pom:

    • project.url tag provides:

      The project's home page.

    • project.scm element provides (should provide!) "source control" related (multiple) urls (read-only, contributer, public-browsing).

    • besides that many other things(and sub-things) can have url in a maven project/pom (distributionManagement(i.e repository), organisation, developer,...).

  3. project.licenses element!

You can be sure to find all of these three (- four) in all (at least latest) artifacts in maven central, due to:

Their Publishing Requirements!;

xerx593
  • 12,237
  • 5
  • 33
  • 64