在pom.xml中配置了spring的相关依赖包 ,
</dependency>
.....
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
</dependency>
.....
</dependencies>
settings.xml中也指定了本地仓库路径(因为这些构建已经存在于)
<localRepository>D:\workapp\apache-maven-3.0.3\repository</localRepository>
运行命令 mvn clean test
报错如下
:
[ERROR] Failed to execute goal on project com.iteye.zxJiang.spring.beginner: Could not resolve dependencies for project com.iteye.zxJiang.spring.beginner:com.iteye.zxJiang.spring.beginner:war:1.0.0-SNAPSHOT: The following artifacts could not be resolved: org.springframework:spring-core:jar:3.1.0.M2, org.springframework:spring-expression:jar:3.1.0.M2, org.springframework:spring-web:jar:3.1.0.M2, org.springframework:spring-webmvc:jar:3.1.0.M2: Could not find artifact org.springframework:spring-core:jar:3.1.0.M2 in central (http://repo1.maven.org/maven2) -> [Help 1]
分析
:从默认的仓库中心下载不了这些jar包 ? 但是我本地仓库明明有的啊 ? 难道它不是先检查本地仓库,找不到的话再去远程的仓库找吗? 我认为可能是它需要先去远程仓库检查jar包是否存在或者jar的更新的情况吧,只是猜测,不想深入了解!
解决办法
:在pom.xml指定一个repository(仓库)
<repositories>
<repository>
<id>org.springframework.maven.milestone</id>
<name>spring-framework-repo</name>
<url>http://maven.springframework.org/milestone</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
分享到:
相关推荐
Failure to transfer org.... Original error: Could not transfer artifact org.codehaus.plexus:plexus-io:jar: 1.0.1 from/to central (http://repo.maven.apache.org/maven2): No response received after 60000
Could not resolve dependencies for project org.apache.flink:flink-avro-confluent-registry:jar:1.15.3: Could not find artifact io.confluent:kafka-schema-registry-client:jar:6.2.2 in maven 安装本地...
解决maven引入hive的jar包时依赖报错Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde in xxx的问题,maven路径org/pentaho/pentaho-aggdesigner-algorithm/5.1.5-jhyde/pentaho...
Could not find artifact org.apache.phoenix:phoenix-core:jar:4.4.0.2.3.4.0-3347,或者hbase、grafana、hadoop 和官方的其实是一样的,放心下载, 原名称是grafana-2.6.0.linux-x64.tar.gz,改下包名即可
赠送jar包:thymeleaf-extras-java8time-3.0.4.RELEASE.jar; 赠送原API文档:thymeleaf-extras-java8time-3.0.4.RELEASE-javadoc.jar; 赠送源代码:thymeleaf-extras-java8time-3.0.4.RELEASE-sources.jar; 赠送...
ojdbc6-11.2.0.1.0 解决问题: Could not find artifact com.oracle:ojdbc6:pom:11.2.0.1.0
赠送jar包:flink-table-runtime-blink_2.11-1.10.0.jar; 赠送原API文档:flink-table-runtime-blink_2.11-1.10.0-javadoc.jar; 赠送源代码:flink-table-runtime-blink_2.11-1.10.0-sources.jar; 赠送Maven依赖...
赠送jar包:pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar; 赠送原API文档:pentaho-aggdesigner-algorithm-5.1.5-jhyde-javadoc.jar; 赠送源代码:pentaho-aggdesigner-algorithm-5.1.5-jhyde-sources.jar; ...
org / pentaho / pentaho-aggdesigner-algorithm / 5.1.5-jhyde / pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar,解决maven引入hive的jar包时依赖报错Could not find artifact org.pentaho:pentaho-aggdesigner-...
plexus-archiver-1.0-alpha-7.jar plexus-build-api-0.0.4.jar plexus-cipher-1.7-sources.jar plexus-classworlds-2.5.1-sources.jar plexus-compiler-api-1.9.1.jar plexus-compiler-api-2.2.jar plexus-compiler-...
com.springsource.org.aspectj.weaver-1.6.8.jar
修复https://download.csdn.net/download/ajax_yan/10677844#里面少类的问题 ,之前上传的就不要下载了
<!-- ...mvn install:install-file -DgroupId=com.aliyun.ams -DartifactId=emas-services -Dversion=1.0.1 -Dpackaging=jar -Dfile=F:\jars\emas-services-1.0.1.jar
依赖 <groupId>com.xuxueli</groupId> <artifactId>xxl-job-core <version>2.2.0-SNAPSHOT </dependency>
Missing artifact com.babasport:page:jar:1.0Missing artifact com.babasport:page:jar:1.0
spring-framework-2.5-rc2-with-dependencies\spring-framework-2.5-rc2\spring-framework-2.5-rc2源代码
<groupId>net.sf.json-lib</groupId> <artifactId>json-lib <version>2.4 <classifier>jdk15 或者直接下载这个包
自己下载源码 maven install 后的包
Java将word文档转换成pdf所需要的jar包(解压后使用)。 1.用以下命令注册到本地maven仓库: mvn install:install-file -Dfile=D:\aspose-words-15.8.0-jdk16.jar -DgroupId=...
赠送jar包:mybatis-paginator-1.2.15.jar; 赠送原API文档:mybatis-paginator-1.2.15-javadoc.jar; 赠送源代码:mybatis-paginator-1.2.15-sources.jar; 赠送Maven依赖信息文件:mybatis-paginator-1.2.15.pom;...