search
HomeJavajavaTutorialDetailed graphic and text explanation of Maven configuration in Windows and project creation in IDE

Maven configuration under Windows


2. Extract to D drive:

3 .Modify the configuration file settings.xml.

a) Change it to the Alibaba Cloud image. The domestic image download speed will be much faster.


<mirrors>
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
     <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
    </mirror></mirrors>

b) Configure the address of the local warehouse, that is, the storage address of the jar package when downloading the code from the warehouse to the local area.

 4. Next, add the Maven path to the environment variable and create a new system variable.

 5. Add to the Path variable.

6. Open the command line console and enter "mvn -version". You can see that Maven has been configured successfully.

Configure Maven in IDEA and create a Maven Web project

 1. Open IDEA, File->Settings.

 2. Configure as follows in Settings.

 3. Create a new Project.

4. Select the Maven type Project, where you can select the JDK version of the project.

 5. Determine the project name.

6. Click Next until completed. At this time, the following prompt will appear in the lower right corner of Idea. Click "Enable Auto-Import ".

7. Wait for a while and you will see that the project has been created. At this time, the project is not complete and lacks some directories. We need to create these directories manually.

7. Wait for a while and you will see that the project has been created. At this time, the project is not complete and lacks some directories. We need to create these directories manually.

 8. Click Project Structure, File->Project Structure.

 9. Configure the project as follows.

10. Click OK to complete the creation of the Maven project in Idea.

Configure Maven in Eclipse (Oxygen) and create a Maven Web project

1. Similar to IDEA, open eclipse, Windows->Preferences.

 2. Make the following configuration in Preferences.

3. After configuring the Maven installation directory, you also need to configure the Maven configuration file Location.

 4. Create a new Project.

5. Select the Maven Project.

 6. Next step, just default.

7. Similar to IDEA, select the Web type Maven template.

 8. Click Finish to create a Maven project.

9. Wait for a while and you will see that the project has been created. Also at this time, there are some directories missing from the IDEA project. We need to create these directories manually.

 10. We also need src/main/java, src/test/java, src/test/resources. In fact, the first two directories exist, but I don’t know why they cannot be displayed. In fact, we can just modify the JRE. Right-click the item and make selections as shown below.

 11. Select Libraries, select JRE, and apply OK.

 12. After completion, you will see two directories displayed.

13. Let’s manually add a src/test/resources directory, select the project, right-click, configure as shown below, click OK to complete the Maven project in eclipse of establishment.


The above is the detailed content of Detailed graphic and text explanation of Maven configuration in Windows and project creation in IDE. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do I use Maven or Gradle for advanced Java project management, build automation, and dependency resolution?How do I use Maven or Gradle for advanced Java project management, build automation, and dependency resolution?Mar 17, 2025 pm 05:46 PM

The article discusses using Maven and Gradle for Java project management, build automation, and dependency resolution, comparing their approaches and optimization strategies.

How do I create and use custom Java libraries (JAR files) with proper versioning and dependency management?How do I create and use custom Java libraries (JAR files) with proper versioning and dependency management?Mar 17, 2025 pm 05:45 PM

The article discusses creating and using custom Java libraries (JAR files) with proper versioning and dependency management, using tools like Maven and Gradle.

How do I implement multi-level caching in Java applications using libraries like Caffeine or Guava Cache?How do I implement multi-level caching in Java applications using libraries like Caffeine or Guava Cache?Mar 17, 2025 pm 05:44 PM

The article discusses implementing multi-level caching in Java using Caffeine and Guava Cache to enhance application performance. It covers setup, integration, and performance benefits, along with configuration and eviction policy management best pra

How can I use JPA (Java Persistence API) for object-relational mapping with advanced features like caching and lazy loading?How can I use JPA (Java Persistence API) for object-relational mapping with advanced features like caching and lazy loading?Mar 17, 2025 pm 05:43 PM

The article discusses using JPA for object-relational mapping with advanced features like caching and lazy loading. It covers setup, entity mapping, and best practices for optimizing performance while highlighting potential pitfalls.[159 characters]

How does Java's classloading mechanism work, including different classloaders and their delegation models?How does Java's classloading mechanism work, including different classloaders and their delegation models?Mar 17, 2025 pm 05:35 PM

Java's classloading involves loading, linking, and initializing classes using a hierarchical system with Bootstrap, Extension, and Application classloaders. The parent delegation model ensures core classes are loaded first, affecting custom class loa

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor