[+]
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?
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactid>maven-jetty-plugin</artifactid>
- </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?
- <!--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>
In the JSP page, add:
[Plain]View Plaincopy print?
- <%@ taglib prefix= "C" uri= "Http://java.sun.com/jstl/core"%>
So you can use it:
For example:
[Plain]View Plaincopy print?
- <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>
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?
- <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>
Configuration using JDK 1.6
[HTML]View Plaincopy print?
- <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>
Using Jsoup support, current version 1.7.1
[HTML]View Plaincopy print?
- <dependency>
- <!--jsoup HTML Parser Library @ http://jsoup.org/
- <groupId>org.jsoup</groupId>
- <artifactid>jsoup</artifactid>
- <version>${jsoup.version}</version>
- </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