This section describes the dependency scope of Maven:
In the scope of the Pom. xml dependency label. In eclipse, there are compiling paths, Maven paths for compiling, running, and testing.
1. Scope is test, which is the test path. Most of them are JUnit jar packages.
2. the scope is compile, which is the default level and is effective during compilation and testing.
3
Apache Maven released the official version last October in 3.0. On the 22nd of last month, the eclipse Foundation announced the release of eclipse 3.7 (indigo, one of the biggest new features of this version of eclipse is the integration of Maven. Users who download the Eclipse IDE for Java developers version will find that eclipse can automatically identify Maven
dialog box, and click Next again (do not select create a simple project, so that we can use archetype to build the skeleton). In the dialog box that appears, select archetype, select Maven-Archetype-quicksort, and click Next. A new dialog box is displayed, asking us to enter information such as groupid, artifactid, version, and package. After entering the information, click Finish to create the maven proje
means Project object model.2, Pom.xml contains the project construction information, including the project information, project dependencies and so on.3, Pom.xml files can be inherited, large projects, sub-modules Pom.xml generally inherit from the parent module Pom.xmlThe contents of the Pom.xml file are as follows: 1 Description of the node element of the Pom.xml file:Name of the Address of the Where the GroupID, Artifactid, and version uniquely de
I. Configuring the MAVEN Environment1. Download the Apache-maven file, select the version you need, address: Apache official is http://maven.apache.org/download.cgi2. Download and file, I extract to: D:\xxmp\apache-maven-3.2.23. Configure MAVEN Environment variablesA. maven_home:d:\xxmp\apache-
Maven (3)-use intellij idea to create a maven web project, intellijmaven
This article uses an example to describe how to use maven to build a web project. Development Tool: intellij idea.
1. Create a maven Project
Select Create from archetype. Create a project from an exist
is install/uninstall Nexus for Windows service, if necessary set Nexus can be installed for automatic boot to Windows The service then sets the startup mode to Automatic.
Nexus.bat is to start Nexus directly on the command line, and if you do not want to install Nexus as Windows service, you can use this file to manually control the Nexus startup exit.
3. Configure Nexus
Login first, default address http://localhost:8081/nexus/, default username p
Note The Goals parameter settings Tomcat6---> Tomcat:deploy or Tomcat:redeploy, TOMCAT7-----> Tomcat7:deploy or Tomcat7:redeployOperation Result:Note: Before you run MAVEN build, you must first start TomcatThen go to the Tomcat Management page to view the project and its operational status:You can then enter Http://localhost:8080/mavenDemo in the browser to access the deployed project.SPRINGMVC+MAVEN+TOMCAT
Above is the configuration of my Maven war plugin.By wart filter after the appearance of the Chaos Mom, start error. Malformedbytesequenceexception:invalid byte 3 of 3-byte UTF-8 sequence.The point of general attention is:1, check whether the file is Fitler with Utf-8 BOM head, remove BOM head, with the possibility of error2, Windows
a standard MAVEN project, but for now Maven just helped us generate the Src/main/java (the source code for the project) and the Src/test/java (which stores the test source), However, in the actual project development we will generally have configuration files, such as log4j.properties, so we also need to manually create src/main/resources (for storing the configuration files used in the project development
repository and run MVN clean install
Now, go to the local warehouse directory to view the project, and we can understand the structure of coordinates in the warehouse.
For example:
Note: The coordinates of Maven refer not only to a corresponding JAR file, but also to its Dependencies. Through the coordinates, we can precisely locate this Maven project.
Install Maven and its Eclipse plug-in m2eclipse
(This article references Maven practices)
Check JDK installation and environment variable configuration
Open cmd
Echo % java_home %
Java-version
For example
Download Maven
Http://maven.apache.org/download.html
The latest version 3.03 is installed here.
Install on Local Mach
automatically directed to this host after being downloaded by team members (high mobility) on svn, I need to configure it in pom. xml.
Finally, the most important step (not mentioned in many online articles) is to modify the configuration in MyEclipse (the default path does not have the setting file ):
Change to the actual path:
Then, the update project will be updated:
After the update, your local maven repository will download this package. If
Plexus-classworlds
--a class Loader Framework
http://plexus.codehaus.org/plexus-classworlds/
3. conf| The configuration file for Maven. It can specified at levels:|| 1.User Level. This settings.xml file provides the configuration for a single user,| and is normally provided in${user.home}/.m2/settings.xml.|| Note:this location can is overridden with the CLI option:|| -s/path/to/user/s
[工欲善其事, its prerequisite]
In this article, we'll demonstrate using MAVEN to write a simplest application and use this program to illustrate how the basic commands commonly used by MAVEN are used.
Preparatory work:
A. Operating system: Win7 x64
B. Development tools: Eclipse Mars Java EE version, Maven3.3.2,jdk7-------------------------------------------------------------------- -----------------------------
Instance:
1. Create a Maven project simple-weather
C:/> MVN archetype: Create-dgroupid = cn. vicky. maven. ch04-dartifactid = simple-weather-dpackagename = cn. vicky. maven-dversion = 1.0 (overwrite the default 1.0-Snapshot)
2. What we want to do is to add some information about the project license, organization, and project-related developers.
(high mobility) on SVN, I need to configure it in POM. xml.
Finally, the most important step (not mentioned in many online articles) is to modify the configuration in myeclipse (the default path does not have the setting file ):
Change to the actual path:
Then, the update project will be updated:
After the update, your local Maven repository will download this package. If there is not a jar package downloaded, there is only one Update file, such
according to the MAVEN project directory structure Convention, we adopt this set Src/main/webapp directory for our JSP and other files of the storage pathHere, a project with MAVEN dependencies has been completed. Next, we follow some conventions to standardize the development and testing of our programs.1. Create a new Java folder under the main folderCreate a new folder under the 2.src folder test and cr
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.