<settings 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/settings-1.0.0.xsd">
<offline>true</offline>
</settings>
经常有第三方包,因为一些原因,在网上repository上没有,需要自己动手安装。
比如sun某些版本的jar文件,比如oracle的驱动。
已oracle驱动程序为例,比如驱动路径为c:/driver/ojdbc14.jar,是10.2.0.3.0版本
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=c:/driver/ojdbc14.jar
这样就可以在pom中依赖引用了:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.3.0</version>
</dependency>
tomcat配置有管理权限的用户:conf\tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="manager"/> <user username="marshal" password="password" roles="manager"/> </tomcat-users>
在pom文件的tomcat插件中添加:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://localhost:8080/manager</url>
<server>myserver</server>
<path>/mycontext</path>
</configuration>
</plugin>
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/sanxing/article-54380-7.html
为其利益服务
小米公关太牛逼了