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

Source: Internet
Author: User

With MyEclipse, you can easily create a simple MAVEN project for generating executable jar files:


(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 select Projrect name and location interface, each option, 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: Release number, groupid+artifactid+packaging+ The unique identity of the version constituent item Snapshot: Identifies a version that is being developed, that is updated frequently, but not yet published



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



6. Modify the JRE System library version

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

  <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:



For the build executable jar package in MyEclipse, refer to: http://blog.csdn.net/clementad/article/details/46622871

If you are creating 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)



Copyright NOTICE: This article is the original article, reprint please indicate the CSDN blog which is transferred from Clement-xu.

Instructions for creating a simple Maven project in MyEclipse (2015) (for generating executable 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.