"Itoo-Tools" cross-platform project management tools--maven

Source: Internet
Author: User


Maven is a Apache one of the most successful open source projects in the organization , The main service is based on Java Project Building of the platform , Dependency Management and project information management .

in theItooDuring the project development process,We've all learned the process of packaging a deployment.UseMavencan help us automate the build process ,from Cleanup,compiling,test to generate report,and then to the package deployment,we don't have to enter commands over and over again .,Click and place the mouse over and over again,with theMAvenjust give it to him.,This is the automatic build.and, Mavenis a cross-platform,whether it is inWindowson orLinuxup orMaccan use the same command on both .,it provides a consistent operating interface to the external,It 's an important reason for its popularity..

MavenIn addition to being a build tool,is also a dependency management tool .specifically,,is that it provides a central warehouse,we can get the components we want.,and these components are alsoMavenAutomatically download the.in our project,to borrow some third-party open source class libraries,These class libraries are introduced into the project in a way that relies on them,but relying too much will create a series of problems.,like,inconsistent version,Version Conflict,dependent on bloated etc..At this, Mavenprovides a particularly good solution,It accurately locates a component through a coordinate system.,in other words, find the only one with a set of coordinates.JavaClass Library,with the coordinate management component, we have an orderly dependency..

Mavenor the Project Information management tool ,management includes project description,List of developers and other information,help us get the test report,project information such as Journal reports. Maventhere are established rules for project directory structure and test case naming methods, etc.,follow these rules,no additional learning costs when users switch between projects,This can be said to be better than the contract configuration.

Maven the specific installation and use is not repeated here. , more project developers. , there will be an environment building manual and quick-start guidance documentation , Maven is an essential part of the installation and use of . Skilled Configuration Maven It's our basic skill. .

Maventhe core of the project isPom.xml. POM (Project Object Model),Project Object Model,defines the basic information of the project,used to describe how a project is built,declaring project dependencies, etc..asItooof thePom.xmlfile as,The following code example:


<dependencies><dependency><groupid>com.tgb</groupid><artifactid>itoo-base</ Artifactid><version>${itoo-base.version}</version></dependency><dependency><span Style= "White-space:pre" ></span><groupid>com.tgb</groupid><artifactid>itoo-tool</ Artifactid><version>${itoo-tool.version}</version></dependency></dependencies>


This code defines the basic coordinates of a project . , GroupId defines which group the project belongs to , This group is often associated with the organization or company in which the project exists . Artifactid defines the current Maven The item is unique within the group ID , Version is the current version of the project. .

this isPOMCode,we didn't write a real line.JavaThe code defines aMavenof the projectPOM,This meansPOMand theJavaThe code is decoupled,this avoids as much as possible.Javacode, andPOMInter-code interaction.

The above is only introduced from the macroscopic Maven , During the project development process, the Maven the use of skills need to be carefully understood , I will also organize my experience to share with you. .



"Itoo-Tools" cross-platform project management tools--maven

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.