MAVEN Environment builds process "old"

Source: Internet
Author: User
Tags change settings
a MAVEN environment to build 1 Download the following software:

1 maven Software: apache-maven-3.1.0-alpha-1-bin.tar.gz

Download Address: http://maven.apache.org/download.cgi

2 and Eclipse integrated Plug-ins: eclipse-maven3-plugin.7z

Download Address: http://115.com/file/dpk80gj0#eclipse-maven3-plugin.7z

2 Configuration Environment

1 configuration Java_home,maven will use this, do not configure the words will be the following error.

2 Configure MAVEN to the environment variable

Extract apache-maven-3.1.0-alpha-1-bin.tar.gz Files

Add in Environment variables:

; E:\mavon\apache-maven-3.1.0-alpha-1-bin\apache-maven-3.1.0-alpha-1\bin

Remember to have a semicolon in front.

3 See if the environment variable tests successfully

CMD to enter the command

Mvn–v

The following message appears:

4 Set up warehouse and change the file settings.xml in conf directory

Add warehouse location and name Repo first, then set warehouse location, change settings.xml file

The warehouse location for this example is placed in:

E:/mavon/apache-maven-3.1.0-alpha-1-bin/repo

This example is configured as follows:

5 View Java System environment variables

Enter the following command:mvn help:system, as shown in the following figure

6 Creating a project

Enter command

mvn archetype:create-dgroupid=com.chongshi.test

-dartifactid=hello-dpackagename=com.chongshi.test-dversion=1.0

This will generate the Hello project, in My computer is placed in the directory of C:\Documents and SETTINGS\CHAIGW 7 compile

The pom.xml file under the Hello project needs to be copied to C:\Documents and SETTINGS\CHAIGW before compiling

Otherwise, the compile time will not find the Pom.xml file and error.

Enter the command to purge (before compiling the files that were compiled before compilation) and compile

mvn Clean Compile (for compilation),

mvn eclipse:eclipse (This command allows the project hello to be added to eclipse)

Note: The above document mainly refers to the following linked documents, because this document is more detailed, if there are unknown please see the original document

http://www.cnblogs.com/fnng/archive/2011/12/02/2272610.html two eclipse integrated maven

1 Installing eclipse-maven3-plugin.7z plugin

First extract this plugin, there will be two files features and plugins,

Take the features and plugins directory files into the Eclipse directory under the features and plugins (other plug-ins can also be installed)

2 Restart Eclipse, if you encounter a problem, see the FAQ 3 configuring Eclipse maven

After the reboot, the ECLISPE will have a maven directory in Window->proferencesà.

The following two-step configuration is required

1) Click Mavenàinstallation-àadd Add Maven Path

As shown in the following illustration:

2) Configure the settings path

Select a path under Mavenàuser settings:

After two steps, the MAVEN plugin is completely installed.

Note: Here is the main reference to the following documents, if unknown, please see the original document

http://www.blogjava.net/fancydeepin/archive/2012/07/13/eclipse_maven3_plugin.html III: Use of MAVEN Four FAQ FAQ 1 Configure the plugin will prompt the following warning

This indicates that the plug-in relies on a jar file that is not found because the JDK path is not set

The solution requires the following two steps

1 Configure JDK, (run with JRE, develop JDK, here to configure JDK path, because the MAVEN plug-in package to the JDK jar file

2 Under the Eclipse development tool, open the Eclipse.ini

Add the following selected sentence,

Restart Eclipse so the problem is solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.