使用maven编译打包一个工程的示例

原创
2016/06/22 09:51
阅读数 69
<build>
   <plugins>
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
       <configuration>
         <source>7</source>
         <target>7</target>
         <encoding>UTF-8</encoding>
         <file.encoding>UTF-8</file.encoding>
       </configuration>
     </plugin>
         <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-surefire-plugin</artifactId>
    <version>2.17</version>
       <configuration>
       <argLine> -Dfile.encoding=UTF-8</argLine>
             <excludes>
                  <exclude>**/*.java</exclude>
             </excludes>
             
          <forkMode>once</forkMode>
       </configuration>
     </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
      </plugin>    
     
   </plugins>
   
 <resources>    
        <resource>    
            <directory>src/main/resources</directory>    
            <includes>    
                <include>**/*.*</include>    
            </includes>  
           <!-- <excludes>    
                <exclude>**/*.java</exclude>    
            </excludes>   -->
        </resource>    
    </resources>
 </build>

 

展开阅读全文
加载中

作者的其它热门文章

打赏
0
1 收藏
分享
打赏
0 评论
1 收藏
0
分享
返回顶部
顶部