maven项目中的常用插件
Posted hy7873
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了maven项目中的常用插件相关的知识,希望对你有一定的参考价值。
1、tomcat插件
<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <port>8080</port> <path>/${project.build.targetName}</path> </configuration> </plugin>
2、jetty插件
<plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.4.12.v20180830</version> <configuration> <httpConnector> <port>8080</port> <host>localhost</host> </httpConnector> <scanIntervalSeconds>1</scanIntervalSeconds> <webApp> <contextPath>/demo</contextPath> </webApp> </configuration> <dependencies> <dependency> <groupId>org.eclipse.jetty.aggregate</groupId> <artifactId>jetty-all</artifactId> <version>9.4.12.v20180830</version> <type>pom</type> </dependency> </dependencies> </plugin>
3、springboot打包插件
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin>
4、mybatis生成代码插件
<plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <configurationFile>src/main/resources/spring/generatorConfig.xml</configurationFile> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> <dependencies> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.32</version> </dependency> </dependencies> </plugin>
以上是关于maven项目中的常用插件的主要内容,如果未能解决你的问题,请参考以下文章