码迷,mamicode.com
首页 > 其他好文 > 详细

maven编译设置pom.xml

时间:2016-12-20 16:13:19      阅读:372      评论:0      收藏:0      [点我收藏+]

标签:utf-8   maven   snap   app   nbsp   location   resources   encoding   pap   

 1 <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">  
 2   <modelVersion>4.0.0</modelVersion>  
 3   <groupId>com.bjhit.eranges</groupId>  
 4   <artifactId>nsaddpserver</artifactId>  
 5   <version>0.0.1-SNAPSHOT</version>  
 6   <packaging>war</packaging>  
 7   <name>nsaddpserver</name>  
 8     
 9    <url>http://maven.apache.org</url>  
10   
11     <properties>  
12         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
13     </properties>  
14   
15     <build>  
16         <plugins>  
17             <plugin>  
18                 <groupId>org.apache.maven.plugins</groupId>  
19                 <artifactId>maven-compiler-plugin</artifactId>  
20                 <configuration>  
21                     <source>1.6</source>  
22                     <target>1.6</target>  
23                     <encoding>UTF-8</encoding>  
24                 </configuration>  
25             </plugin>  
26               
27             <plugin>    
28                 <groupId>org.apache.maven.plugins</groupId>    
29                 <artifactId>maven-war-plugin</artifactId>    
30                 <version>2.1-alpha-1</version>    
31                 <configuration>     
32                     <webResources>    
33                         <resource>    
34                             <!-- 元配置文件的目录,相对于pom.xml文件的路径 -->    
35                             <directory>src/main/webapp/WEB-INF</directory>    
36                             <!-- 目标路径 -->    
37                             <targetPath>WEB-INF</targetPath>    
38                         </resource>    
39                     </webResources>    
40                 </configuration>    
41         </plugin>    
42           
43         </plugins>  
44     </build>  
45     <dependencies>  
46         <dependency>  
47             <groupId>junit</groupId>  
48             <artifactId>junit</artifactId>  
49             <version>4.10</version>  
50             <scope>test</scope>  
51         </dependency>  
52         <dependency>  
53             <groupId>com.bjhit.eranges</groupId>  
54             <artifactId>nsaddpapi</artifactId>  
55             <version>0.0.1-SNAPSHOT</version>  
56         </dependency>  
57         <dependency>  
58             <groupId>com.bjhit.eranges</groupId>  
59             <artifactId>nsaddp-common</artifactId>  
60             <version>0.0.1-SNAPSHOT</version>  
61         </dependency>  
62         <dependency>  
63             <groupId>com.bjhit.eranges</groupId>  
64             <artifactId>nsaddpprocess</artifactId>  
65             <version>0.0.1-SNAPSHOT</version>  
66         </dependency>  
67     </dependencies>  
68     <distributionManagement>  
69         <!--配置Maven部署至Nexus -->  
70         <repository>  
71             <id>nexus-releases</id>  
72             <name>Nexus Releases Repository</name>  
73             <url>http://maven.bjhit.com/nexus/content/repositories/releases/</url>  
74         </repository>  
75         <snapshotRepository>  
76             <id>nexus-snapshots</id>  
77             <name>Nexus Snapshots Repository</name>  
78             <url>http://maven.bjhit.com/nexus/content/repositories/snapshots/</url>  
79         </snapshotRepository>  
80     </distributionManagement>  
81       
82 </project>  

 

maven编译设置pom.xml

标签:utf-8   maven   snap   app   nbsp   location   resources   encoding   pap   

原文地址:http://www.cnblogs.com/zipon/p/6202913.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!