Installation and configuration of the eclipse maven plugin

 1 eclipse installation

    Go to the official website to download and install http://www.eclipse.org/downloads/eclipse-packages/

 

maven installation:

    Before installing Maven, you need to make sure that your JDK has been installed and configured. Maven is a project under Apache, and the latest version is 3.0.4, which I also use.

    First go to the official website to download Maven: http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz

    After the download is complete, unzip it, I will rename the unzipped folder to maven, and put it in the D:\Server directory, that is, the final path of maven is: D:\Server\maven


   Configure maven environment variables:

    System variable: MAVEN_HOME = D:\Server\maven

    User variable: path = %MAVEN_HOME%\bin

    I believe that everyone has already configured environment variables, so I won't go into the detailed steps, but it's OK to match the attribute name and attribute value.

    Open cmd and type in: mvn -version

 


    If the above information can be printed, it means that Maven3 has been installed on your computer.
    mvn is an instruction of mavn, mvn -version is to view version information, my operating system is 32-bit WIN7, and the installed maven is 3.0.4

    If the above information can be printed, it means that Maven3 has been installed on your computer.


   Modify the location of the maven repository:

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"  

         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  

         xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0  

            http://maven.apache.org/xsd/settings-1.0.0.xsd">  

     <localRepository>D:/tool/.m2/repository</localRepository> 

    <!-- This is to configure Ali Maven mirror -->  

    <mirrors>  

        <mirror>  

          <id>aliyun</id>  

          <name>aliyun</name>  

          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  

          <mirrorOf>central</mirrorOf>  

        </mirror>  

    </mirrors>  

      

    <profiles>  

        <profile>  

            <id>nexus</id>  

            <repositories>  

                <repository>  

                    <id>central</id>  

                    <url>http://repo.maven.apache.org/maven2</url>  

                    <snapshots>  

                        <enabled>false</enabled>  

                    </snapshots>  

                </repository>  

                <repository>  

                    <id>ansj-repo</id>  

                    <name>ansj Repository</name>  

                    <url>http://maven.nlpcn.org/</url>  

                    <snapshots>  

                        <enabled>false</enabled>  

                    </snapshots>  

                </repository>  

            </repositories>  

        </profile>  

    </profiles>  

  

    <activeProfiles>  

        <activeProfile>nexus</activeProfile>  

    </activeProfiles>  

</settings>  

 

 3   maven insert eclipse 

     

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326395911&siteId=291194637