Installing and Configuring Maven

Maven is a Java tool for project management. In Java, you can using Maven to conveniently manage collaborative projects and libraries, making it easier for team members to build java project.

Download Maven.

you can download Maven in page: http://maven.apache.org/download.html. It contains various versions of Maven download files.

System Requirements:

  • Java Development Kit (JDK): Maven 3.9+ requires JDK 8 or above to execute. It still allows you to build against JDK 1.3 and other versions using toolchains.
  • Memory: No minimum requirement.
  • Disk Space: Approximately 10MB is required for the Maven installation itself. Additionally, disk space will be used for your local Maven repository. The size of the local repository may vary depending on usage, but expect at least 500MB.
  • Operating System: No minimum requirement. Start-up scripts are included as shell scripts (tested on various Unix flavors) and Windows batch files.

I downloaded: apache-maven-3.9.6-bin.tar.gz for example

Extract the Maven archive.

Extract the apache-maven-3.9.6-bin.tar.gz file and move the extracted apache-maven folder to like :D:\Maven. If the Maven folder does not exist, you should create it.

Set the Maven environment variables.

Windows example

Right-click on “Computer” and select “Properties”.

Click on “Advanced system settings” and then “Environment Variables” to set the environment variables.

Configure the following system variables:

Create a new system variable: MAVEN_HOME with the value

D:\Maven\apache-maven

Edit the Path system variable and add the following value: ;

%MAVEN_HOME%\bin

Configure the settings file.

Open the settings file located at D:\Maven\apache-maven.

Find the <localRepository>/path/to/local/repo</localRepository> line, uncomment it, and modify the content between the tags to the desired path. For example: <localRepository>D:/repository</localRepository>.

Lastly, configure the JDK by placing it between the two <profiles> tags (I’m using JDK 21.0.2 for example):

<!-- JDK version --> <profile> <id>jdk-21.0.2</id> <activation> <activeByDefault>true</activeByDefault> <jdk>21.0.2</jdk> </activation> <properties> <maven.compiler.source>21.0.2</maven.compiler.source> <maven.compiler.target>21.0.2</maven.compiler.target> <maven.compiler.compilerVersion>21.0.2</maven.compiler.compilerVersion> </properties> </profile>

Verify the installation.

Once the configuration is complete, open the command line and enter mvn help:system to test Maven. Alternatively, you can press Win+R to open the Run dialog, type “cmd” to open the command prompt, and enter mvn --version. If the Maven version is displayed, it indicates a successful installation.

If you need historical versions, you can download them from the following link:
Maven Historical Versions:
http://maven.apache.org/download.cgi (scroll down to the bottom and click on “archives”)

No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
:D
Emoji
picure
black!
Previous
Next