manven需要注意点几点
生活随笔
收集整理的這篇文章主要介紹了
manven需要注意点几点
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Q1:pom中需要導入的(我經常用到的)
<dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.11</version><scope>test</scope></dependency><!--JSP --><dependency><groupId>javax.servlet.jsp</groupId><artifactId>jsp-api</artifactId><version>2.1</version><scope>provided</scope></dependency><!-- Servlet核心包 --><dependency><groupId>javax.servlet</groupId><artifactId>javax.servlet-api</artifactId><version>3.0.1</version><scope>provided</scope></dependency><!--jackson--><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>2.9.5</version></dependency><!--mysqlconnection--><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>8.0.11</version></dependency><!--standard--><dependency><groupId>taglibs</groupId><artifactId>standard</artifactId><version>1.1.2</version></dependency><!--jstl--><dependency><groupId>jstl</groupId><artifactId>jstl</artifactId><version>1.2</version></dependency>?<!--富文本-->
??????? <dependency>
??????????? <groupId>commons-io</groupId>
??????????? <artifactId>commons-io</artifactId>
??????????? <version>2.4</version>
??????? </dependency>
??????? <dependency>
??????????? <groupId>com.googlecode.json-simple</groupId>
??????????? <artifactId>json-simple</artifactId>
??????????? <version>1.1.1</version>
??????? </dependency>
??????? <dependency>
??????????? <groupId>commons-fileupload</groupId>
??????????? <artifactId>commons-fileupload</artifactId>
??????????? <version>1.3.1</version>
??????? </dependency>
Q2:子繼承父的pom中,報錯(500),說jsp中的jstl無法識別,這時候你需要加入一些東西
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>JavaWebFather</artifactId><groupId>com.zhangyuwei.javawebfather</groupId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><artifactId>JavaWebSon</artifactId><packaging>war</packaging><name>JavaWebSon Maven Webapp</name><!-- FIXME change it to the project's website --><url>http://www.example.com</url><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><maven.compiler.source>1.7</maven.compiler.source><maven.compiler.target>1.7</maven.compiler.target></properties><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.11</version><scope>test</scope></dependency><dependency><groupId>com.zhangyuwei.javawebfather</groupId><artifactId>JavaWebFather</artifactId><version>1.0-SNAPSHOT</version><scope>compile</scope></dependency></dependencies><build><finalName>JavaWebSon</finalName><pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --><plugins><plugin><artifactId>maven-clean-plugin</artifactId><version>3.0.0</version></plugin><!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging --><plugin><artifactId>maven-resources-plugin</artifactId><version>3.0.2</version></plugin><plugin><artifactId>maven-compiler-plugin</artifactId><version>3.7.0</version></plugin><plugin><artifactId>maven-surefire-plugin</artifactId><version>2.20.1</version></plugin><plugin><artifactId>maven-war-plugin</artifactId><version>3.2.0</version></plugin><plugin><artifactId>maven-install-plugin</artifactId><version>2.5.2</version></plugin><plugin><artifactId>maven-deploy-plugin</artifactId><version>2.8.2</version></plugin></plugins></pluginManagement></build> </project>注意,需要加入的是
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"?
轉載于:https://www.cnblogs.com/zywds/p/9675097.html
總結
以上是生活随笔為你收集整理的manven需要注意点几点的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 绘画软件优动漫PAINT系统要求
- 下一篇: Java小入坑