请问这个怎么解决呀

来源:2-3 示例数据库

Richard1001

2020-08-23 22:32:35

http://img.mukewang.com/climg/5f427e020961360111530561.jpg

写回答

2回答

好帮手慕阿莹

2020-08-24

同学你好,

1、老师看同学这里分别多了一个 -  不知道是赋值的原因还是同学写错了,这里建议去掉这个 -

http://img.mukewang.com/climg/5f433a23094b223107840592.jpg


2、建议同学这里改为你刚刚设置的仓库的配置文件试试,例如老师刚刚改为了自己配置过的文件

http://img.mukewang.com/climg/5f43398309b1f74e17110249.jpg

老师测试了一下,但点击update后一直显示在更新,但不影响使用,同学可以不必在意

http://img.mukewang.com/climg/5f4339e909e5162113740190.jpg

3、

同学可以在pom.xml 中设置一下阿里云的:

<repositories>
    <repository>
        <id>alimaven</id>
        <name>Maven Aliyun Mirror</name>
        <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

添加后这里多了一个,下边的同学可以不用在意,不影响使用

http://img.mukewang.com/climg/5f433c5209b7aca813070125.jpg

祝学习愉快。



0

好帮手慕阿莹

2020-08-24

同学你好,

同学这里配置的仓库是maven中央仓库,建议同学改为阿里云的,这样会更快一些,也避免一些网络问题。

具体步骤如下:

可以在maven的settings.xml文件中配置

找到maven,conf下的settings.xml文件

http://img.mukewang.com/climg/5f4320de093a208d08120198.jpg

在settings.xml中mirrors标签,在里面指定仓库

http://img.mukewang.com/climg/5f4320f109a8533200000000.jpg

具体代码:

<mirror>  
     <id>alimaven</id>  
     <name>aliyun maven</name>  
     <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
     <mirrorOf>central</mirrorOf>          
</mirror>

如果我的回答解决了你的疑惑,请采纳,祝学习愉快~


0
hichard1001
h 老师,是这样吗?但是idea里面的中央仓库还是没有变化? -<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>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>
h020-08-24
共1条回复

0 学习 · 8263 问题

查看课程