maven使用中的问题

1.一直卡在resoving dependencies

https://blog.csdn.net/sun_luming/article/details/95327506?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task

2. aliyun的仓库有很多包没有,比如pmml的,所以官方的mirror也要配并且要配对

正确的:

<mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->


		
	<mirror>
		<!-- 指定镜像 ID -->
		<id>nexus-aliyun</id>
		<!-- 匹配中央仓库。 -->
		<mirrorOf>central</mirrorOf>
		<!-- 指定镜像名称 -->
		<name>Nexus aliyun</name>
		<!-- 指定镜像路径 -->
		<url>http://maven.aliyun.com/nexus/content/groups/public</url>
	</mirror> 
	<mirror>
	  <id>central</id>
	  <name>Maven Repository Switchboard</name>
	  <url>http://repo1.maven.org/maven2/</url>
	  <mirrorOf>central</mirrorOf>
	</mirror>

  </mirrors>

3. maven-pom文件报expected START_TAG or END_TAG not TEXT

pom文件报expected START_TAG or END_TAG not TEXT导致里面的依赖下载不了,进而导致程序运行不了或运行报错。
原因就是pom的一些标签从别处复制过来的时候带有一些格式或者是空格,而pom不认。
用notepad打开并显示所有字符后,会发现有些标签后面有空格,这在pom中是不被允许的,删除这些空格即可。巨坑,there was a long delay here
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值