关于MAVEN配置ORACLE数据库的问题

我安装的是MAVEN3.2.3。然后在CMD中,输入
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=E:\app\admin\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar

BUILD SUCCESS。
我再回到MAVEN仓库中看,也确实是有了这个JAR包。
但是跑后台的时候,就是找不到这个驱动。已经困扰两天了。实属无奈。希望大神们帮帮忙。
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDrive'

The error may exist in file [C:\Users\admin\Desktop\MUDAO\mudao\target\classes\com\cn\mudao\mapping\UserMapper.xml]

The error may involve com.cn.mudao.dao.IUserDao.selectByPrimaryKey

The error occurred while executing a query

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDrive'

at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
at com.sun.proxy.$Proxy16.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:163)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
at com.sun.proxy.$Proxy17.selectByPrimaryKey(Unknown Source)
at com.cn.mudao.service.impl.UserServiceImpl.getUserById(UserServiceImpl.java:18)
at org.zsl.testmybatis.TestMyBatis.test1(TestMyBatis.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Caused by: org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDrive'

The error may exist in file [C:\Users\admin\Desktop\MUDAO\mudao\target\classes\com\cn\mudao\mapping\UserMapper.xml]

The error may involve com.cn.mudao.dao.IUserDao.selectByPrimaryKey

The error occurred while executing a query

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDrive'

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
... 35 more

Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDrive'
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:81)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:72)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
... 42 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDrive'
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
... 52 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDrive
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
... 55 more

10个回答

maven本地安装了,但是项目的pom里有没有引入oracle的驱动????

weixin_29858463
嗯哼丶啊哈丶 引入了。。。 <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.1.0</version> </dependency>
2 年多之前 回复

求各位大神帮帮忙啊。这个工作效率,我受不了了。。

图片说明这是mysql的写法,你的只需要改成oracle的就行了

baixuefeng1
90mark 回复weixin_29858463:开发工具下执行maven install安装一下就行了,不要手动lib引入,下面有方法
2 年多之前 回复
weixin_29858463
嗯哼丶啊哈丶 POM.XML里,我是有加入的,原本项目用的是MYSQL。这次换ORACLE。我特地去下了个MAVEN,配置了一下,想把ODBC6的包加到我仓库里去的。项目里我检查过,确实是加进去了。但是跑的时候,就是找不到。
2 年多之前 回复
weixin_29858463
嗯哼丶啊哈丶 <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.1.0</version> </dependency>
2 年多之前 回复

图片说明maven的jar下有没有这个包

weixin_29858463
嗯哼丶啊哈丶 回复90mark: 有。ODBC
2 年多之前 回复
baixuefeng1
90mark 你的是oracle的
2 年多之前 回复

为了验证,是没找到这个JAR包。我手动拉到LIB里。写了个JAVA类,去测试一下,结果,JAVA读到了这个JAR包。但是,放在WEB工程里,通过画面URL,跑到后台。就找不到。我用的是SSM框架。

图片说明

最终解决方式:必须maven下要有上面的oracle的jar包,你的问题应该是没有引入这个。问题我应该清楚了,oracle的驱动你是通过lib手动引入的出错(把你手动的删除)。然后,你只需要在开发工具pom--然后右键run--maven install,成功后,最后再运行一遍服务项目就行了

weixin_29858463
嗯哼丶啊哈丶 不是的。那个手动引入的JAR包。是我新建了一个项目,来测试的,目的是为了知道,是不是因为MAVEN没有把ODBC6给加入导致这个异常。您说的我现在先试一下。
2 年多之前 回复

Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.10/surefire-booter-2.10.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.10/surefire-booter-2.10.pom (3 KB at 1.3 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/2.10/surefire-api-2.10.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/2.10/surefire-api-2.10.pom (3 KB at 1.1 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.10/maven-surefire-common-2.10.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.10/maven-surefire-common-2.10.pom (4 KB at 3.4 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.1/plexus-utils-2.1.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.1/plexus-utils-2.1.pom (4 KB at 5.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.pom (2 KB at 0.5 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting/2.0.9/maven-reporting-2.0.9.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting/2.0.9/maven-reporting-2.0.9.pom (2 KB at 1.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-toolchain/2.0.9/maven-toolchain-2.0.9.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-toolchain/2.0.9/maven-toolchain-2.0.9.pom (4 KB at 1.8 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artifact-filters/1.3/maven-common-artifact-filters-1.3.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artifact-filters/1.3/maven-common-artifact-filters-1.3.pom (4 KB at 5.6 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-components/12/maven-shared-components-12.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-components/12/maven-shared-components-12.pom (10 KB at 9.1 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/13/maven-parent-13.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/13/maven-parent-13.pom (23 KB at 9.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.pom (2 KB at 1.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.10/surefire-booter-2.10.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/2.10/surefire-api-2.10.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.10/maven-surefire-common-2.10.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artifact-filters/1.3/maven-common-artifact-filters-1.3.jar
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.1/plexus-utils-2.1.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.jar
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.jar (10 KB at 14.3 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artifact-filters/1.3/maven-common-artifact-filters-1.3.jar (31 KB at 20.5 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.10/surefire-booter-2.10.jar (34 KB at 21.2 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/2.10/surefire-api-2.10.jar (158 KB at 50.8 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.10/maven-surefire-common-2.10.jar (60 KB at 3.4 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.1/plexus-utils-2.1.jar (220 KB at 11.7 KB/sec)
[INFO] Surefire report directory: C:\Users\admin\Desktop\MUDAO\mudao\target\surefire-reports
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.10/surefire-junit4-2.10.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.10/surefire-junit4-2.10.pom (3 KB at 2.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-providers/2.10/surefire-providers-2.10.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-providers/2.10/surefire-providers-2.10.pom (3 KB at 1.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.10/surefire-junit4-2.10.jar
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.10/surefire-junit4-2.10.jar (33 KB at 10.5 KB/sec)


T E S T S

Running org.zsl.testmybatis.TestMyBatis
[org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [spring-mybatis.xml]
[org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@adcae8: startup date [Tue May 09 13:59:49 CST 2017]; root of context hierarchy
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - Loading properties file from class path resource [jdbc.properties]
[org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.631 sec <<< FAILURE!
[org.springframework.context.support.GenericApplicationContext] - Closing org.springframework.context.support.GenericApplicationContext@adcae8: startup date [Tue May 09 13:59:49 CST 2017]; root of context hierarchy

Results :

Tests in error:
test1(org.zsl.testmybatis.TestMyBatis): nested exception is org.apache.ibatis.exceptions.PersistenceException:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 54.269s
[INFO] Finished at: Tue May 09 13:59:49 CST 2017
[INFO] Final Memory: 6M/17M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project MUDAO: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\admin\Desktop\MUDAO\mudao\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

baixuefeng1
90mark 回复weixin_29858463: 加微信Wing0858,再次maven install把打包信息截图发过来
2 年多之前 回复
weixin_29858463
嗯哼丶啊哈丶 回复90mark: 这是啥意思?是说JAR包不对?还是JAR包有问题?其他的JAR包,肯定没问题,之前我都正常,之前是用MYSQL的。所以没问题,这次就换了一个ORACLE。想把ODBC6给加到仓库里去。就出错了。
2 年多之前 回复
baixuefeng1
90mark 你要再开发端检查一下那些jar出错的问题了,maven打包失败,说明jar哪里有错,oracle的错误已经被跟新了,现在是其他的问题
2 年多之前 回复

我看日志是 can not load 看看中央仓库是否有pom文件里配置的jar(包括版本等都对上)

看了会觉得可能你那命令有点不规范
把 -Dfile 命令 提到 -DgroupId前面 再次将jar包导入maven 仓库试试

mvn install:install-file -Dfile=E:\app\admin\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
关于maven配置
maven要下载zip格式的,然后解压到一个容易找到的盘。例如:C:\apache-maven-3.0.2 再去创建一个空文件夹,用来做仓库存储jar包。例如:mvn-repo/repository 然后去到C:\apache-maven-3.0.2\conf,修改settings.xml配置文件。 <!-- localRepository | The path to the loca
Maven配置--问题
  一、 解决-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match. 1.添加M2_HOME的环境变量   2.Preference-&amp;gt;Java-&amp;gt;Installed JREs-&amp;gt;E...
关于maven配置私服地址无效问题
入职新公司,公司内网有内部搭建的maven私服,但是在本地maven的setting文件中配置上私服地址后,一直无法拉取私服的一些jar包。经过仔细的排查,发现问题出在之前配置的远程阿里云maven镜像上。 在maven的setting.xml文件中,mirror标签内配置镜像后,会拦截连接远程仓库的请求,从mirror配置的url地址中获取依赖。常见阿里云maven ...
maven配置
记录下maven的配置步骤 1、下载,地址:http://maven.apache.org/download.cgi 2、解压,路径不能带中文 3、配置环境变量 M2_HOME=D:\apache-maven-3.3.9,path增加;%M2_HOME%\bin; 4、cmd检查,输入mvn -version 5、修改本地仓库路径,D:\apache-maven-3.3.9\conf\s
Maven配置
一、在硬盘上建库1.复制settings.xml打开maven目录,找到conf目录下的settings.xml,复制到C:\User\***\.m2 下,其中***是windows系统的用户名。 2.修改settings.xml在复制后的settings.xml中找到<localRepository>标签,将标签内容修改成想要仓库的位置。 二、maven目录说明 bin———>存放可执行
MAVEN配置
我使用的版本是Apache-maven-3.0.5, 下载Apache-maven-3.0.5-bin.zip, 下载地址是:http://apache.fayea.com//maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.zip 将其解压缩到任意目录,目录中不容许中文存在, 我的目录是D:\CommonSoft\apache
解决maven下载文件慢的问题
maven的中央仓库是外国网站,访问速度可能比较慢,通过添加仓库镜像的方法可以极大的提升速度。 打开maven安装目录下的conf文件夹,打开settings.xml文件,找到节点,添加 镜像子节点,修改后节点如下:            | Specifies a repository mirror site to use instead of a given repository.
Maven配置
下载Maven 下载地址: http://maven.apache.org/downl... 下载后解压成文件夹, 放到指定路径(建议目录不要太深,目录不要有中文和特殊符号) 配置环境变量 MAVEN_HOME : D:Program-Filesapache-maven-3.0.5; PATH : D:Program-Filesapa...
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池