码迷,mamicode.com
首页 > 编程语言 > 详细

Maven配置、编译本地jar包

时间:2016-06-24 14:41:41      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:

添加本地jar包的依赖

<dependency>
   <groupId>com.qlk.tool</groupId>
   <artifactId>ojdbc1</artifactId>
   <version>3.2.8</version>
   <scope>system</scope>
   <systemPath>${project.basedir}/lib/ojdbc6.jar</systemPath>
</dependency>

编译包含

<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                    <webResources>
                        <resource>
                            <directory>src/main/resources/${package.environment}</directory>
                            <targetPath>WEB-INF/classes</targetPath>
                            <filtering>true</filtering>
                        </resource>
                        <resource>
                            <directory>${project.basedir}/lib</directory>
                            <targetPath>WEB-INF/lib</targetPath>
                            <includes>
                                <include>**/*.jar</include>
                            </includes>
                        </resource>
                    </webResources>
                    <packagingExcludes><!-- 排除多余配置文件 -->
                        WEB-INF/classes/develop/**,
                        WEB-INF/classes/prerelease/**,
                        WEB-INF/classes/product/**
                    </packagingExcludes>
                    <warSourceExcludes>
                        WEB-INF/classes/develop/**,
                        WEB-INF/classes/prerelease/**,
                        WEB-INF/classes/product/**
                    </warSourceExcludes>
                </configuration>
            </plugin>
        </plugins>

 

Maven配置、编译本地jar包

标签:

原文地址:http://www.cnblogs.com/alphago-1/p/5614022.html

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