Introduction
In order to be able to quickly install maven environment on the system, ready for such a small notebook.
Steps
- From maven official website to download maven;
- I want to extract the directory store, and create your own repository directory;
- Configuring environment variables maven, maven directly to the bin directory in the path to the configuration (Configuration Maven_Path feel no need), console runs mvn -version to see if the installation was successful;
- Modify the configuration file (maven directory /conf/settings.xml).
- Modify warehouse storage path. modify
In the path. - Add as Ali cloud image repository.
<mirror> <id>alimaven-central</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror>
- Modified version of the jdk compiled maven
<profile> <id>jdk18</id> <activation> <jdk>1.8</jdk> <activeByDefault>true</activeByDefault> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile>
- Configuring maven in the IDEA. Modify the path to: File> Setting> Build, Execution, Deployment> Build Tools> Maven.
- Set the installation path maven, maven of setting the file path
- Configuring the Options = Runer in the VM
-DarchetypeCatalog=internal
. Dependent on local action is preferred exist. - Configuring importing, check what Automaticlly download the Source and Documentation. It is easy to see the source code.
- Set the installation path maven, maven of setting the file path
- Create a new maven project, add guava rely on, and then see whether the warehouse download the corresponding package in the pom file.
<!-- https://mvnrepository.com/artifact/com.google.guava/guava --> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>28.1-jre</version> </dependency>
- Modify warehouse storage path. modify