Maven in Action (iii) Hello World maven

Source: Internet
Author: User

Learn about the features of MAVEN build projects with a simple MAVEN project.

Select New in MyEclipse, find Maven Project, and click Next as shown.




If there is no "skeleton" information in the archetype,maven skeleton, we can execute mvnarchtype:generate in the DOS command window to generate skeleton information. Then select Maven-archetype-quickstart again (which can be understood as a Java project) and click Finish to finish.


we're going to see this structure.


We select the project right-click Execute run as maven build ... Enter clean install in goals, F5 refresh our project, you will see a Helloworld-0.0.1-snapshot.jar file exists in target, this is HelloWorld Java The jar package generated by the project module can be called by other projects or modules.

Next we select the project right-click Execute run as maven build ... When you enter clean Test,f5 refresh our project in goals, you will see that there is a file in target that is generated in a Surefire-reports folder, a test report in a simple text format, a test report in XML format, Double-click Open in MyEclipse to see JUnit's execution report as shown in.



of course, every time you run Maven build ... MyEclipse will automatically record the commands we have run, and we can manage these used commands in the run Configuration.

Do you notice the output of the first Run command? There are some download information, and other output information, in the later chapters will tell about MAVEN plug-in content, whether we notice that our new project will automatically add the previous Pom.xml file? Some of the tags in the pom.xml file are God horses?

next maven coordinates and dependencies






Maven in Action (iii) Hello World 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.