Now the latest Eclipse Luna Release has built-in Maven plugin, which makes our work a lot more concise, as long as the project directly into the can, regardless of the plug-in problems, but after the import of the project can be deployed in Tomcat can also be deployed on the jetty server , the following is the debugging process.I. Development environmentJava:jdk7Eclipse:eclipse Java EE IDE for Web developers, Version:luna Release (4.4.0)
1. PrefaceWhy should I study maven? It is because the company is currently working in a company that needs to use MAVEN, so that only Maven can learn it well enough to work better!
Maven, pronunciation is [' meivin], ' expert ' means. It is a good project management tool , very early into the ranks of my essential too
-and/application/apache-tomcat-7.0.692, 3, 3 configure Tomcat environment variables[Email protected] application]# echo "Export Tomcat_home=/application/tomcat" >>/etc/profile#查看 new additions to the/etc/profile file[Email protected] application]# tail-1/etc/profileExport Tomcat_home=/application/tomcat2, 3, 4 make the environment variable effective#保存之后, execute the following command to make the configured environment variable effective[Email protected] application]# Source/etc/profileThird,
Add self-developed dependency packages to the Maven local repository
Maven adds self-developed dependency packages to the pom file, which are certainly not in the Maven repository (http://repo.maven.apache.org/maven2. So how can we add packages that are not in the Maven repository to the local
Maven getting started ---- introduction and environment setup (1), maven ----
Knowledge point:Maven introduction:
Baidu Encyclopedia:
It is a project management tool.
Build a Maven environment on the local machine:
The Maven environment must be supported by the jdk environment. First, ensure that the jdk environment a
1. According to Maven's agreement, we manually create the following directory and file structure in the D packing directory:2. Open the Pom.xml file and add the following:Projectxmlns= "http://maven.apache.org/POM/4.0.0"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> modelversion>4.0.0modelversion>
First, a MAVEN project was built today, and after the introduction of dependencies in the Pom.xml file, it was found that there was no Maven dependencies file in the project structure (below), but Maven was found in the Java Build path Dependencies file (pictured below),
However, the dependency jar package added in the Pom.xml file is not automatically downloade
I found that the plug-in from the eclipse market is still quite useful and installedAfter the m2eclipse-wtp, added support for eclipse web projects, good to use.
The installation sequence should be noted:
InstallM2e, and then installM2eclipse-wtp.
First install the second m2e, and then install the m2eclipse-wtp
Otherwise, errors such as the following are continuously reported:
No plugin found for prefix 'war 'in the current project and in the plugin groups [] available from the
next step is to build the MAVEN project.
Start building a MAVEN project
1. Right-click New maven Project in eclipseClick Next Next: Use the default check box to2, Filter Filter Select QuickStart, click Next to proceed to the next(You can also enter the Web keyword filter, select the Web to create the project, he is not in the creation of the direct
1. Install M2eclipse PluginTo build the MAVEN project with Eclipse, we need to first install the Meeclipse pluginClick on the Eclipse menu bar help->eclipse Marketplace Search the plugin Maven integration for Eclipse and click Install, as shown below:
Once installed, we click File->new->other in the Eclipse menu bar and you will see the following image in the pop-up dialog box:
In this tutorial, we will learn how to use the Maven Tomcat plugin to package and deploy a war file to Tomcat (Tomcat 6 and 7.To use the tool:
Maven 3
Tomcat 6.0.37
Tomcat 7.0.53
Tomcat 7Publish URL =Http://localhost:8080/manager/textCommand = MVN Tomcat7:deployTomcat 6Publish URL = http://localhost:8080/manager/Command = MVN Tomcat6:deploy1. Tomcat 7 ExampleThis example shows how to p
1. Using Maven in Eclipse:A, the Maven plugin in Eclipse is built-in.b, settings for the Maven plugin, set two items in Windows----Preferences----Maven:650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/95/CD/wKiom1kZwl7RldyAAABFu7sQnRg701.png "title=" 00. PNG "alt=" Wkiom1kzwl7rldyaaabfu7sqnrg701.png "/>650)
0x7f070001, but the main module 0x7f070001 the corresponding resource is not a layout, so there will be an error.2) Idea Package: The value of MyView in the two R files is the same, so the resources can be found correctly, the program will not be wrong.So you know the problem, but how does the problem arise?After reviewing the MAVEN print log, a package process is organized as follows:1) Copy all dependen
To run unit tests from MAVEN, issue this command:MVN testThis will run the entire unit test in your project.Case studyCreate a two unit test and run it through Maven. See a simple Java test class:Package Com.yiibai.core;public class App {public static void main (string[] args) {System.out.println (Gethelloworld ());} public static String Gethelloworld () {return ' Hello world ';} public static String GetHel
1. Overview:MAVEN is managing the jar package through its configuration file Pom.xml, so it is necessary to understand the Pom.xml file structure, and this article describes pom.xml related knowledge.2. References:1)Maven official website Documentation,pom (English document) On this website, documentation describes the following:
One: Maven official1, https://maven.apache.org/download.cgi2. Unzip the directory structure as followsTwo: Add MAVEN environment variables1. Add Maven_home2, add maven_home under PathThird, test whether the installation is successful1, enter mvn-version at the command line, the following prompt indicates successIv. myeclipse Add maven Plugin1. Select the preferen
This tutorial shows you how to create a generic Java/maven project from a MyEclipse Web project, or any other MAVEN project. These steps include the creation of the foundation and the use of MAVEN dependencies. You will learn to:Create a MAVEN utility project to add dependencies for a Project add utility as a dependenc
Some preliminary understandings about Maven:1, the word maven can be translated as: "Accumulation of knowledge", "experts", professionals, etc.;2, one of the uses of MAVEN is to build, it is a powerful build tool that can help us to automate the build process, from cleaning, compiling, testing, to generating reports, t
tight, the problem will not be taken seriously. Wait for time to solve the problem.
Now, we have time to start solving the problem. I found a lot of methods and found that it can be solved simply by adding a version number/timestamp:
In the above Code,? Ver =$ {sysVersion}
Note: The project uses velocity, so $ {sysVersion} refers to the variable in velocity.New Problems
However, a new problem arises. We use hudsun + maven to construct, automatically
store the binaries, eg:unix-b ased operating Systems (Linux, Solaris and Mac OS X) tar zxvf apache-maven-3.x.y.tar.gz Windows unzip APAC
He-maven-3.x.y.zip 2) A directory called "Apache-maven-3.x.y" would be created. 3) Add The bin directory to your PATH, eg:unix-based operating systems (Linux, Solaris and Mac OS
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.