Maven pom.xml配置
来源:互联网 发布:jenkins pipeline node 编辑:程序博客网 时间:2024/06/10 06:30
<!-- pom.xml 文件名 -->
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>yihaodian</groupId>
<artifactId>search</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>search</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope><!-- 只在测试时使用,用于编译和运行测试代码。不会随项目发布 -->
</dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId>
<version>1.2.2</version>
<!-- 去掉jsp-api和servlet-api传递依赖,tomcat自身包含,解决not load问题-->
<!-- MyEclipse pom.xml视图Dependency Hierarchy选择Exclude Maven Artifact...-->
<exclusions>
<exclusion>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<!--将src/main/java中的xml与properties打入jar包中-->
<!-- 注:src/main/resources中的文件默认打入classes即jar包中,
因此src/main/java所有配置信息最好写入resources中,建立同级目录即可,不用单独配置此项 -->
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
<plugins>
<!--配置jdk编译环境1.7,默认1.5需要更改-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF8</encoding>
</configuration>
</plugin>
<!--deploysource 源代码-->
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.1</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!--deployjavadoc doc文档-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<!--根据version选择发布到snapshots或releases-->
<!--发布到snapshots-->
<snapshotRepository>
<id>snapshots</id>
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
<!--发布到releases-->
<repository>
<id>releases</id>
<url>http://localhost:8081/nexus/content/repositories/releases</url>
</repository>
</distributionManagement>
</project>
- Maven pom.xml配置
- maven pom.xml 配置
- maven-pom.xml配置
- maven pom.xml配置
- maven pom.xml配置说明
- maven pom.xml jetty 配置
- Maven pom.xml 配置详解
- Maven pom.xml 配置详解
- maven pom.xml配置讲解
- Maven pom.xml 配置详解
- Maven pom.xml 配置详解
- Maven pom.xml 配置详解
- Maven pom.xml 配置详解
- Maven pom.xml配置详解
- maven pom.xml 文件配置
- Maven pom.xml配置详解
- Maven pom.xml 配置详解
- maven之pom.xml配置
- 如何写好技术简历 —— 实例、模板及工具
- 固定摄像头中背景建模方法
- 配置Tomcat为系统服务
- 文件下载的两种方式
- 第30讲 UI组件之 GridView组件
- Maven pom.xml配置
- andriod之log打印
- Java 实现"我的电脑"资源管理器(JTree,JTable)
- 快速理解Docker - 容器级虚拟化解决方案
- 斯坦福博士(生)手把手教你用Javascript写深度学习代码
- Java内部类
- 继承
- springmvc @ResponseBody 返回json数据错误
- pycharm字体大小设置