Maven study notes and use IDEA

Acquaintance Maven

1. What is Maven?

Maven in the United States is a colloquial term meaning "experts, specialists." More formal definition of Maven are: Maven is a project management tool, it contains a project object model (POM: Project Object Model) , a set of standards, a project lifecycle (Project Lifecycle), a dependency management system (Dependency Management System), and define the logic used to run plug-ins (plugin) target (goal) in the life cycle stage (phase).

Ant: is a scripting tool.
Maven: manage dependencies jar package [Import], [project management to compile, test, package, release]

2.Maven can solve any problem?

You can use a more popular way to illustrate. We know that project development is not just writing code for it, accompanied by a variety of things to do during essential, here are a few feel:

1, we need to refer to a variety of jar package, especially large projects, often cited jar package there are dozens or even hundreds, each use one kind of jar package, you need to manually introduced into the project directory, and often encounter jar package conflicts of various people crazy, version conflicts.

2, we worked so hard to write a Java file, but only know how to 0 and 1 is completely idiot computer can not read, it needs to be compiled into a binary byte code. Anyhow, now this work can help us from a variety of integrated development tools to complete, Eclipse, IDEA and so can be the code-time compilation. Of course, if you think life long, why not extravagant, you can also use Notepad to knock code, and then use the javac command to compile one by one, funny computer to play.

3, bug-free code does not exist in the world, like a computer bug on and people always like the same beautiful guy. In order to reduce the pursuit of beauty bug, and therefore the code is finished, we have to write some unit tests, and then run one by one to verify code quality.

4, another elegant code is to be sold out. We also need to back the code and various configuration files, resource integration together, stereotypes package, if it is web project, you also need to publish it to the server, for people devastated.

Just think, if there is now a tool that frees you from the tedious work out of the above, can help you build the project, management jar package, compiled code, but also help you to automatically run the unit test, package, report generation, and even help you deploy the project to generate Web site, you heart it? Maven can solve the problems mentioned above.

Published 19 original articles · won praise 4 · Views 1563

Guess you like

Origin blog.csdn.net/DATANGguanjunhou/article/details/101748743