Maven Common Configuration

Source: Internet
Author: User

[+]

Eclipse Install Maven Plugin

Preferably installed in the marketplace, not prone to problems, of course, the biggest problem in this way is slow, and sometimes network connection is often broken off

Help-eclipse Marketplace Open, search maven

Install the third, if you want to develop a Web project, you will also need to install the first one.

Configuring the Jetty Server [HTML]View Plaincopy print?
    1. <plugin>
    2. <groupId>org.mortbay.jetty</groupId>
    3. <artifactid>maven-jetty-plugin</artifactid>
    4. </plugin>

Add this in the project,

And then the jetty:run will be gone.

Adding JSTL support with Maven

Jstl This tag is still quite useful.

Recent projects have been built with Maven, with the following dependencies:

[HTML]View Plaincopy print?
  1. <!--Jstl--
  2. <dependency>
  3. <groupId>javax.servlet</groupId>
  4. <artifactid>jstl</artifactid>
  5. <version>1.1.2</version>
  6. <type>jar</type>
  7. </Dependency>
  8. <dependency>
  9. <groupId>taglibs</groupId>
  10. <artifactid>standard</artifactid>
  11. <version>1.1.2</version>
  12. <type>jar</type>
  13. </Dependency>

In the JSP page, add:

[Plain]View Plaincopy print?
    1. <%@ taglib prefix= "C" uri= "Http://java.sun.com/jstl/core"%>

So you can use it:

For example:

[Plain]View Plaincopy print?
  1. <c:foreach items= "${webpages}" var= "webpage" >
  2. <li>
  3. <c:out value= "${webpage.url}" ></c:out>
  4. <c:out value= "${webpage.time}" ></c:out>
  5. <a href= "<c:url value=" main/delete/${webpage.id}.htm "/>" ><B>delete</B></a>
  6. </li>
  7. </c:forEach>
Adding quartz support with Maven

If used in spring, it is best to use the 1.x series, otherwise you will get an error "no Setter found for property ' Cronexpression ' in class ...", Spring's adaptation class is suitable for 1.X

[HTML]View Plaincopy print?
  1. <dependency>
  2. <groupId>org.quartz-scheduler</groupId>
  3. <artifactid>quartz</artifactid>
  4. <version>2.1.6</version>
  5. </Dependency>
  6. <dependency>
  7. <groupId>org.quartz-scheduler</groupId>
  8. <artifactid>quartz-oracle</artifactid>
  9. <version>2.1.6</version>
  10. </Dependency>
  11. <dependency>
  12. <groupId>org.quartz-scheduler</groupId>
  13. <artifactid>quartz-weblogic</artifactid>
  14. <version>2.1.6</version>
  15. </Dependency>
  16. <dependency>
  17. <groupId>org.quartz-scheduler</groupId>
  18. <artifactid>quartz-jboss</artifactid>
  19. <version>2.1.6</version>
  20. </Dependency>

Configuration using JDK 1.6 [HTML]View Plaincopy print?
  1. <build>
  2. <plugins>
  3. <plugin>
  4. <artifactid>maven-compiler-plugin</artifactid>
  5. <version>2.3.2</version>
  6. <configuration>
  7. <source>1.6</source>
  8. <target>1.6</target>
  9. </configuration>
  10. </plugin>
  11. </plugins>
  12. </Build>

Using Jsoup support, current version 1.7.1 [HTML]View Plaincopy print?
  1. <dependency>
  2. <!--jsoup HTML Parser Library @ http://jsoup.org/
  3. <groupId>org.jsoup</groupId>
  4. <artifactid>jsoup</artifactid>
  5. <version>${jsoup.version}</version>
  6. </Dependency>

[Error]could not get the value of parameter encoding for plugin execution default-resources


Delete the user directory. M2 content, re-use plugin update

Maven Common Configuration

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.