When you work with Java Projects using build tools such as Gradle or Maven, you would have to make use of the Central Repository to add and download the Java libraries and dependencies.
One such repository is the Maven Central Repositiory that host and distributes Java artifacts, jars, and plugins.
Let's take a look at the URL for this repository,
Maven Central Repository URL:
https://repo.maven.apache.org/maven2/

You can set the Maven Central Repository as default for your Java Maven project by adding the below in your pom.xml file.
pom.xml<project>
...
<repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>
...
</project>
Similarly, if you make use of the Gradle build tool for your Java projects, you can set the Maven Central repository as follows,
build.gradlerepositories {
mavenCentral()
}
-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Java,
- Java equals method - Tutorial
- Unbound classpath container: JRE System Library [JavaSE-1.7]
- Spring Boot: @RequestBody not applicable to method
- Java 8: Steam map with Code Examples
- Java Program: Random Number Generator
- Java java.time.Clock class code examples [Java Date Time API]
- Fix: type argument is not within bounds of type-variable T
- [Fix] java.net.MalformedURLException: unknown protocol
- Java 7 addSuppression() and getSuppression() Exception Handling
- Convert Java Array to ArrayList Code Example
- How to Word-Warp Console logs in IntelliJ
- Ways Compare Dates in Java Programming with Examples
- Remove Trailing zeros BigDecimal Java
- CRUD operations in Spring Boot + JDBC
- [Java Threads] Should we extend Thread Class or implement Runnable interface
- Json Serialization and Deserialization using Java Jackson
- Create simple struts2 project using maven commands
- How to install Java OpenJDK 11 on Alpine Linux
- Unsupported major.minor version 52.0 in java
- Error: Can not find the tag library descriptor for
- Java: Convert String to Binary
- How to run Java Unit Test cases with Apache Maven?
- Java: Testing Private Methods in JUnit using reflection API Example
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting
- Java Join Strings with Comma Separator
More Posts:
- Fibonacci series from 1 to 500 table - Html
- Convert Java Object to JSON using Jackson Library - Java
- How to Gzip a file directory on Mac OS X using Terminal Command - Mac-OS-X
- MacBook - Time Limit - You have reached your time limit, Ignore Limit - MacOS
- Delete Android Studio Projects - Android-Studio
- bash: cls: command not found - Linux
- How to Freeze Top Row in Excel for Mac - Windows
- Change Sublime Text 3 white background color theme - Sublime-Text