Public Maven Repositories: Maven Central and More
Serving developers since 2016 Founder-run, no venture capital MFA, SSO and audit log on every plan
Every feature on every plan, with unlimited users. 14 days free. No credit card required.
Start free trialLeaving Nexus? cloudrepo-migrate copies your hosted Maven, npm, PyPI and Docker repositories (Nexus 3; Maven and npm from Nexus 2) into CloudRepo and checks every file against the original. Read the Nexus 3 migration guide
Leaving Artifactory? cloudrepo-migrate copies your local Maven and Generic repositories into CloudRepo and checks every file against the original. Read the JFrog Artifactory migration guide
pipx install cloudrepo-migratePublic Maven repositories are essential infrastructure for Java developers worldwide. They provide free access to millions of open-source libraries, frameworks, and tools. Here are the public Maven repositories worth knowing, and the XML to add each.
Public repositories are for open-source libraries. For proprietary artifacts, CloudRepo hosts private Maven repositories at one flat price for the whole team. Start free trial: 14 days free. No credit card required.
Understanding Apache Maven
Apache Maven is the de facto build tool for Java Virtual Machine (JVM) projects. It revolutionized dependency management by introducing:
- Standardized project structure
- Declarative dependency management
- Consistent build lifecycle
- Repository-based artifact distribution
Maven’s power lies in its ability to automatically download and manage project dependencies from repositories, eliminating the need to manually download and manage JAR files.
CloudRepo, JFrog Artifactory and Sonatype Nexus, side by side
| Question | CloudRepo Essentials | JFrog Artifactory Cloud Pro | Sonatype Nexus Pro Cloud |
|---|---|---|---|
| Included each month | 10 GB storage and 250 GB transfer | 25 GB, then $1.25/GB storage and transfer counted together [1] | 25 GB, then $1.10/GB of consumption [2] |
| Users | Unlimited, on every plan | Typically up to 50 users how JFrog sizes Pro [1] | New contracts are priced by consumption [3] |
| Support | Human support, on every plan | Community support: public documentation, a knowledge base and Stack Overflow [4] | Pro lists enterprise support, SLA and migration services as available [2] |
Every feature on every plan
Start free trial Or compare your Sonatype or JFrog quote with ours
14 days free. No credit card required.
Sources (4): each vendor's own pages, read 2026-10-06 to 2026-10-21. Prices as each vendor listed them on the date shown.
- JFrog pricing, read (archived)
- Sonatype pricing, read (archived)
- Sonatype pricing, read
- JFrog pricing, read
(archived)
Community Support - Available for Free solutions and Pro subscriptions - JFrog maintains public documentation, knowledge base, and engages in conversations on Stack Overflow.
What Are Public Maven Repositories?
Public Maven repositories are servers that host software artifacts (JARs, POMs, sources, javadocs) that are freely downloadable. For a comprehensive overview of how Maven repositories work, including the differences between local, remote, and central repositories, see our complete guide to Maven repositories.
These public repositories serve as distribution points for:
- Open-source libraries
- Framework releases
- Development tools
- Community-contributed projects
Key Characteristics
- No Authentication Required: Most public repositories allow anonymous access
- Free to Use: No cost for downloading artifacts
- Globally Distributed: Often use CDNs for fast worldwide access
- Immutable Artifacts: Once published, artifacts typically cannot be modified
Important: Always check the license agreement of any artifacts you use before adding them to your project’s dependencies. Open source doesn’t always mean free for commercial use.
Maven Central: The Primary Repository
Maven Central is the default and largest public repository, hosting over 10 million unique artifacts. It’s automatically configured in every Maven installation and serves as the primary source for most Java dependencies.
Key Features
- Size: Over 10 million unique artifacts and growing
- Security: HTTPS-only access, checksum verification
- Search: Advanced search at search.maven.org
Using Maven Central
Maven Central is configured by default, but you can explicitly reference it:
<repositories> <repository> <id>central</id> <url>https://repo.maven.apache.org/maven2</url> </repository></repositories>Publishing to Maven Central
Publishing to Maven Central requires:
- Verified domain ownership (via OSSRH)
- Signed artifacts with GPG
- Complete POM with required metadata
- Sources and Javadoc JARs
Other Notable Public Repositories
1. Clojars (Clojure Community)
The go-to repository for Clojure libraries:
<repository> <id>clojars</id> <url>https://repo.clojars.org/</url></repository>2. Spring Repositories
Spring Framework maintains several repositories:
Release Repository:
<repository> <id>spring-releases</id> <url>https://repo.spring.io/release</url></repository>Milestone Repository:
<repository> <id>spring-milestones</id> <url>https://repo.spring.io/milestone</url></repository>3. Atlassian Public Repository
For Atlassian SDK and plugins:
<repository> <id>atlassian-public</id> <url>https://maven.artifacts.atlassian.com/</url></repository>4. JBoss Repository
Red Hat’s JBoss community artifacts:
<repository> <id>jboss-public</id> <url>https://repository.jboss.org/nexus/content/groups/public/</url></repository>5. Google’s Android Repository
For Android development dependencies:
<repository> <id>google</id> <url>https://maven.google.com/</url></repository>Best Practices for Using Public Repositories
1. Always Use HTTPS
Ensure all repository URLs use HTTPS to prevent man-in-the-middle attacks:
<!-- Good --><url>https://repo.maven.apache.org/maven2</url>
<!-- Avoid --><url>http://repo.maven.apache.org/maven2</url>2. Implement Repository Mirroring
For enterprise environments, set up a repository manager to:
- Cache artifacts locally
- Reduce external network traffic
- Improve build performance
- Add security scanning
3. Version Pinning
Always specify exact versions in production:
<!-- Good: Exact version --><version>2.5.3</version>
<!-- Avoid: Version ranges --><version>[2.0,3.0)</version>4. Keep Verification On
Maven checks artifact checksums and verifies the TLS certificate of every repository it contacts. Leave both switched on, but know what each one actually does.
A TLS verification failure stops the download. A checksum mismatch, by default, does
not: Maven’s default policy is warn, so it logs Checksum validation failed and
installs the artifact anyway, under a green BUILD SUCCESS. To make it fail the build,
pass -C (--strict-checksums) or set <checksumPolicy>fail</checksumPolicy> on the
repository.
And neither tells you who published the artifact. They are a floor, not a guarantee.
-Dmaven.wagon.http.ssl.insecure=true and -Dmaven.wagon.http.ssl.allowall=true
disable certificate and hostname verification for every repository in the build,
not just the one you were troubleshooting. If a corporate proxy intercepts TLS, import
its CA into the JVM truststore rather than switching verification off. The keystore path
differs by Java version: 9+ uses $JAVA_HOME/lib/security/cacerts, 8 uses
$JAVA_HOME/jre/lib/security/cacerts. keytool will happily CREATE a keystore at a
wrong path and report success, so resolve it before importing. The
CloudRepo troubleshooting guide covers certificate errors.
5. Monitor Repository Health
- Check repository status pages
- Have fallback repositories configured
- Monitor for deprecated artifacts
Security Considerations
License Compliance
Create a policy for acceptable licenses:
- Apache 2.0, MIT: Generally safe for commercial use
- GPL: May require open-sourcing your code
- Commercial: May require licensing fees
Vulnerability Scanning
Implement automated scanning:
<plugin> <groupId>org.owasp</groupId> <artifactId>dependency-check-maven</artifactId> <version>8.0.0</version></plugin>Supply Chain Security
- Verify artifact signatures when available
- Monitor for compromised dependencies
- Use tools like Dependabot or Snyk
Performance Optimization
Local Repository
Maven caches artifacts in ~/.m2/repository. Optimize by:
- Regular cleanup of old versions
- Using SSD storage
- Implementing proper backup strategies
Parallel Downloads
Enable parallel artifact downloads:
mvn -Dmaven.artifact.threads=10 clean installRepository Order
Order repositories by reliability and speed:
- Local repository manager
- Maven Central
- Specialized repositories
Troubleshooting Common Issues
Repository Blocked
Some corporate networks block public repositories. Solutions:
- Use corporate repository manager
- Configure proxy settings
- Request firewall exceptions
Artifact Not Found
When artifacts aren’t found:
- Verify the artifact exists (check search.maven.org)
- Check repository configuration
- Clear local repository cache
- Verify network connectivity
Slow Downloads
Improve download speeds by:
- Using geographically closer mirrors
- Implementing local caching
- Upgrading network infrastructure
The Case for Private Repositories
While public repositories are excellent for open-source dependencies, private repositories are essential for:
- Proprietary code protection
- Internal library sharing
- Snapshot version management
- Access control and auditing
CloudRepo provides private Maven repositories, with:
- Unlimited repositories
- MFA, an Audit Log, and repository tokens scoped to the repositories you pick, on every plan
Conclusion
Public Maven repositories are the backbone of the Java ecosystem, providing free access to millions of artifacts. By following best practices for security, performance, and reliability, you can use these resources effectively while maintaining a secure and efficient build process.
For your own code you need a private repository. CloudRepo is one, at a fair price.
Quick Reference
Essential Repository URLs
- Maven Central:
https://repo.maven.apache.org/maven2 - Spring Releases:
https://repo.spring.io/release - Clojars:
https://repo.clojars.org/ - Google Android:
https://maven.google.com/
Useful Commands
# Search for dependenciesmvn dependency:search -Dartifact=groupId:artifactId
# Analyze dependenciesmvn dependency:tree
# Check for updatesmvn versions:display-dependency-updates
# Purge local repositorymvn dependency:purge-local-repositoryStart free trial. 14 days free. No credit card required.
Every feature on every plan, with unlimited users
14 days free. No credit card required.
Founder-run since 2016, with no venture capital. A real person answers within one business day. Usually it's me.
Chris, founder of CloudRepo