I. Pre-conditionsThe system environment is:[Email protected] application]# cat/etc/redhat-releaseCentOS Release 6.7 (Final)[Email protected] application]# uname-r2.6.32-573.el6.x86_64The installation package that needs to be prepared is:Subversion-1.6.1.tar.gzSubversion-deps-1.6.1.tar.gzApache-maven-3.3.3-bin.tar.gzSecond, SVN part[Email protected] application]# pwd/application#上传subversion -1.6.1.tar.gz and subversion-deps-1.6.1.tar.gz to this direct
, maven2.0 was born.
Copyright Disclaimer: Any website authorized by matrix must retain the following author information and links for reprinting.Author: Chris Hardin; mycj (author's blog: http://blog.matrix.org.cn/page/mycj)Original article: http://www.onjava.com/pub/a/onjava/2006/03/29/maven-2-0.htmlMatrix: http://www.matrix.org.cn/resource/article/44/44475_Maven2.htmlKeyword: maven2
Advantages of maven2.
1. What is Maven
Apache Maven is a project management and integration tool. Based on the concept of engineering object Model (POM), through a central information management module, Maven is able to manage project builds, reports, and documentation.
The MAVEN engineering structure and content is defined in an XML file-
Java class library required by the MAVEN runtime
LICENSE.txt, NOTICE.txt, README.txt a brief introduction to the MAVEN version, third-party software, etc.
Third, MAVEN installation1, first of all to ensure that the computer has installed JDK(to JDK 1.6+ version), configure the JDK environment variables, using the following two commands to check the JDK
creation of a [maven] Java project 3) Operation premise: Need to network, must download a small file on the Internet 4) After successful operation A Mavenjava file is generated under D:\MavenProject, which is our Maven Java project 1.2. Create a MAVEN Web project 1) Command: mvn archetype:generate-dgroupid=com.zyh.maven.quickstart-dartifactid=mywebapp-
Java class library required by the MAVEN runtime
LICENSE.txt, NOTICE.txt, README.txt a brief introduction to the MAVEN version, third-party software, etc.
Third, MAVEN installation1, first of all to ensure that the computer has installed JDK(to JDK 1.6+ version), configure the JDK environment variables, using the following two commands to check the JDK
Java class library required by the MAVEN runtime
LICENSE.txt, NOTICE.txt, README.txt a brief introduction to the MAVEN version, third-party software, etc.
Third, MAVEN installation1, first of all to ensure that the computer has installed JDK(to JDK 1.6+ version), configure the JDK environment variables, using the following two commands to check the JDK
Maven an excellent build tool.2) Maven is not just a build tool, but also a dependency management tool and project information management tool. MAVEN provides a central repository through which you can automatically download class libraries and solve dependency problems. In addition,
default Maven-Archetype-Quickstart type is used. You do not need to enter the Enter key, and then select this type of version, we recommend Maven-Archetype-Quickstart to use 1.1. You must enter some configuration information of the project, such as groupid, artifactid, version, and package. A basic Archetype is used here. If many projects have similar custom project structures and configuration files, you
Maven needs to compile with JDK, so the default is to modify Eclipse's JRE path to JDK.There are several ways to create a MAVEN project, using the command line, manually creating, Ecelipse. Suggestions are tried, the overall grasp will be better. 2. We understand the core concept of maven: POM
First of all, this pom r
custom configuration, whether to download the source code, whether to download the Javadoc file, according to the need to tick the application can be.
Configuration Complete! The next step is to build the MAVEN project.
Start building a MAVEN project
1. Create a new Maven Project in Eclipse, and use the default tick to click Next to
1. Define archetype build a custom Maven project
Reference Document : Create a custom archetype using Maven3.
resolution ProcessI based on the above process, in the "mvn archetype:create-from-project" times wrong, the error content is as follows:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:create-from-project (DEFAULT-CLI) onProject Shiro_learn2:error Configuring command-line. Rea
1: Configure the Tomcat Manager User: Re-unzipped a new TOMCAT7, open Tomcat_user.xml in the Conf directory under the Tomcat root directory, add Manager roles and users under Adding Tomcat Server to the 2:maven configuration Open maven's settings.xml file, if it is a locally installed version of MAVEN, the file is installed in the root directory conf/settin
Installing and configuring MAVEN environment variables
Requires a Java environment already in the computer
In the console, enter: echo %JAVA_HOME% See if you can display the path information of Java home;
In the control bar input: java -version See if Java version information is displayed;
Download official website: http://maven.apache.org/download.cgi
Download the compiled version apache-maven-
Maven Learning Summary (ii)--maven project building process ExercisesThe previous article was just a brief introduction to MAVEN's knowledge of getting started, this article is about the process of building a project with MAVEN's highly automatedI. Create a MAVEN project 1.1, build a Hello Project1. First build the Hello Project, and set up the directory structur
\Maven
C. Configure Environment VariablesSystem variable:maven_home = D:\Program Files\mavenUser variable:path =%maven_home%\bin. Open cmd, knocking inside: mvn-version If you can print the information above, it means that Maven3 has been installed on your PC. MVN is a maven instruction,mvn-version is to view the version information, my operating system is 32-bit WIN7, the installation of
configure the project reports you need, such as test case reports, to help you push the information to the developer's eyes.Ant and maven? (If you don't know ant you can look directly at the next article, this is an extension of the knowledge node, for beginners do not need to see) 1. Ant is procedural, and we have to tell ant exactly what to do and when to do it. Tell him to compile, and then copy the compression.
; % M2_HOME % \ bin ---- add the number after path;
Start cmd and enter mvm-v to view the version.
2. Modify the location of the local repository
The default local repository location of maven is/. m2/repository in the current user directory. We can configure it to another disk.
E:/m2/repository is configured here.
Open cmd and run a simple maven command: mvn
Install maven on Mac and maven on Mac
1. Install maven
1. Check the jdk version on the local machine first.
$ java -versionjava version "9.0.4"Java(TM) SE Runtime Environment (build 9.0.4+11)Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)$
2. Download the corresponding
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.