Home > Net >  Maven Central Repository Artifact Source Code / Project URL / License Identification
Maven Central Repository Artifact Source Code / Project URL / License Identification

Time:12-10

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!

CodePudding user response:

  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 three (- four) in all (at least latest) artifacts in maven central, due to:

Their Publishing Requirements!;

  • Related