Common Maven configurations

Source: Internet
Author: User
Install Maven plug-in eclipse

It is best to install it at Marketplace, which is not prone to problems. Of course, the biggest problem with this method is slow speed, and sometimes the network connection is often disconnected.

Help-open eclipse marketplace and search for Maven

Install the third one. To develop a web project, install the first one.


Configure the jetty Server

      <plugin>        <groupId>org.mortbay.jetty</groupId>        <artifactId>maven-jetty-plugin</artifactId>      </plugin> 

Add this to the project,

Then jetty: Run.

Add jstl support using Maven

The jstl label is quite useful.

Recent projects are built using Maven, and the following dependencies can be added:

<!-- jstl -->    <dependency>          <groupId>javax.servlet</groupId>          <artifactId>jstl</artifactId>          <version>1.1.2</version>          <type>jar</type>      </dependency>      <dependency>          <groupId>taglibs</groupId>          <artifactId>standard</artifactId>          <version>1.1.2</version>          <type>jar</type>      </dependency>

Add:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

So you can use:

For example:

<c:forEach items="${webpages}" var="webpage"><li><c:out value="${webpage.url}"></c:out><c:out value="${webpage.time}"></c:out><a href="<c:url value="main/delete/${webpage.id}.htm"/>"><B>delete</B></a></li></c:forEach>
Add quartz support using Maven

If it is used in spring, it is best to use 1. otherwise, the error "No setter found for property 'cronexexpression' in class ...... ", the adaptation class of spring is 1.x.

<dependency>    <groupId>org.quartz-scheduler</groupId>    <artifactId>quartz</artifactId>    <version>2.1.6</version></dependency><dependency>    <groupId>org.quartz-scheduler</groupId>    <artifactId>quartz-oracle</artifactId>    <version>2.1.6</version></dependency><dependency>    <groupId>org.quartz-scheduler</groupId>    <artifactId>quartz-weblogic</artifactId>    <version>2.1.6</version></dependency><dependency>    <groupId>org.quartz-scheduler</groupId>    <artifactId>quartz-jboss</artifactId>    <version>2.1.6</version></dependency>

Configure JDK 1.6

<build><plugins><plugin><artifactId>maven-compiler-plugin</artifactId><version>2.3.2</version><configuration><source>1.6</source><target>1.6</target></configuration></plugin></plugins></build>

Supported by jsoup, current version 1.7.1
<dependency><!-- jsoup HTML parser library @ http://jsoup.org/ --><groupId>org.jsoup</groupId><artifactId>jsoup</artifactId><version>${jsoup.version}</version></dependency>

[Error] cocould not get the value for parameter encoding for plugin execution default-Resources

Delete the contents in the user directory. m2 and re-use the plug-in update

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.