IntelliJ idea 2017 Creating a Maven Java Web program

Source: Internet
Author: User

The first step is to create a MAVEN-based Java Web project

Note that we are going to use a webapp template, which is a template that Maven provides to create a Java Web project

This I just started not to pay attention to a closer look, the original web app skeleton has 2,

I always chose the first one, because the search, always thought the match result is one,

Later found that the following is what I want.

So, you have to pay attention.

Step Two

Attention:

The properties of the interface add a parameter archetypecatalog=internal, without this parameter, will be very slow when Maven builds the skeleton, and sometimes will be directly stuck.

Archetypecatalog represents the plug-in uses the archetype metadata, does not add this parameter when the default is Remote,local, that is, the central warehouse archetype metadata, because the central warehouse archetype too much, so the result is very slow, Specify internal to indicate that only internal metadata is used.

Shan Xu: https://www.zhihu.com/question/51153784/answer/135799897 Source: The copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.

Step Three

Selecting the Import Changes option indicates that a new dependency is added to the project

The Enable Auto-import represents a new change in the Pom file, which automatically adjusts the dependencies in the project and does not prompt each change.

Fourth Step directory structure

Fifth Step Flie-->project structure


Then modify the Pom.xml file to add

<Plugins>
<Plugin>
<groupid>org.apache.maven.plugins</GROUPID>
< artifactid>maven-compiler-plugin</ARTIFACTID>
<version>2.3.2</< Span style= "color: #000080; Font-weight:bold ">VERSION>
<CONFIGURATION>
< source>1.8</ SOURCE>
< target>1.8</ TARGET>
</ CONFIGURATION>
</PLUGIN>
</PLUGINS>

IntelliJ idea 2017 creating a Maven Java Web program

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.