Instructions for creating a simple Maven project in MyEclipse (2015) (for generating runnable jar files)

Source: Internet
Author: User

With the guidance of MyEclipse, it is very convenient to create a simple MAVEN project that can be used to generate a runnable jar file:


(original article, reprint please specify the blog from Clement-xu:http://blog.csdn.net/clementad/article/details/46954277)


1, New Project ... Select Maven Project, click Next >


2, in the Select Projrect name and location interface, each option for example, click Next >



3. In select an Archetype interface, choose Maven-archetype-quickstart, click Next >


4, in specify Archetype parameters interface. Fill in the group ID, Artifact ID, Version. Click Finish

related nouns:GroupId: Typically a company name or organization name Artifactid: typically project name version: versions, groupid+artifactid+packaging+ The unique identity of the version constituent item Snapshot: Identifies a version number that is being developed, often updated, but not yet published



5, so, a simple MAVEN structure of the app project is generated, the default also generated an app class. Includes a print "Hello world!" The main () method.



6. Change the JRE System library version number

You may notice that the JRE System library version number in is j2se-1.5 and the project has an exclamation point. The workaround is to specify the JRE version number (using Maven-compiler-plugin) in the Pom.xml file:

  <build>  <plugins><plugin><groupId>org.apache.maven.plugins</groupId>< Artifactid>maven-eclipse-plugin</artifactid><version>2.9</version><configuration> <downloadsources>true</downloadsources><downloadjavadocs>true</downloadjavadocs></ configuration></plugin><plugin><groupid>org.apache.maven.plugins</groupid>< Artifactid>maven-compiler-plugin</artifactid><version>2.3.2</version><configuration ><source>1.7</source><target>1.7</target></configuration></plugin>< Plugin><groupid> org.apache.maven.plugins</groupid><artifactid>maven-resources-plugin</ Artifactid><version>2.7</version></plugin></plugins></build>


In this way, it is perfect:



About generating a runnable jar package in MyEclipse. Please refer to: http://blog.csdn.net/clementad/article/details/46622871

Suppose you want to create a WebApp project. Please refer to: http://blog.csdn.net/clementad/article/details/46592557

(Original article, reprint please specify the blog from Clement-xu: http://blog.csdn.net/clementad/article/details/46954277)



Instructions for creating a simple Maven project in MyEclipse (2015) (for generating runnable jar files)

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.