这次一个项目用到maven编译,我在本地开发的时候jar包都是放在WEB-INF/lib目录下,通过 BuildPath将jar包导入,然后用MyEclipse中的:maven package命令打成war包,这个war包在tomcat下能正常运行,war包下是有lib下的jar包的. 通过IDEA自带的运行能够正常识别lib包下的jar,但是我要是通过maven profile实现多环境配置自动分离 则会出现“程序包xxx不存在的”错误 若该程序包是jdk自带的程序包,请参照:解决maven编…
原文链接:https://www.cnblogs.com/adeng/p/7096484.html 这次一个项目用到maven编译,我在本地开发的时候jar包都是放在WEB-INF/lib目录下,通过 BuildPath将jar包导入,然后用MyEclipse中的:maven package命令打成war包,这个war包在tomcat下能正常运行,war包下是有lib下的jar包的. 通过IDEA自带的运行能够正常识别lib包下的jar,但是我要是通过maven profile实现多环境配置自动…
1.本地lib下有jar 2.命令: mvn install:install-file -Dfile=juh-3.0.1.jar -DgroupId=org.openoffice -DartifactId=juh -Dversion=3.0.1 -Dpackaging=jar…
1.将本地jar放置到仓储库在jar包目录下 mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jar 在pom.xml中加入 <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId&…
<build> <finalName>xxx</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.2</version> <configuration> <…
1.首先设置依赖项,这样maven就会把该路径下的jar包导入项目引用 <dependency> <groupId>DPSDK-Manager</groupId> <artifactId>DPSDK-Manager</artifactId> <version>0.2.1</version> <scope>system</scope> <systemPath>${project.based…
有时候在构建maven项目时,archetype加载不出来,一直在Retrieving archetype...,现象如下: 有两种解决方法: ①点击链接下载:http://files.cnblogs.com/files/hujinshui/archetype-catalog.zip ②在浏览器上访问http://repo1.maven.org/maven2/archetype-catalog.xml把页面上的源码复制出来,命名为xxxxx.xml文件,然后将xml文件引入eclipse,如下图…
 将jar安装到本地的maven仓库 1.首先确定本地有maven环境. 2.安装本地jar 模板: mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging> 示例: mvn install:install-file -Dfile…
<dependency> <groupId>abc</groupId> <artifactId>abc</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/abc.jar</systemPath>…
如果有个jar包是我们自己打的,怎么放到maven中呢? 首先在项目里面新建一个lib目录,如果有lib目录则不需要新建,然后放自己的jar包进去,maven的pom.xml配置是: <dependency> <groupId>cn.eshore.bnet</groupId> <artifactId>UDBClient</artifactId> <version>1.0-SNAPSHOT</version> <sco…