• 黑马mybatis练习项目导入父工程pom.xml爆红解决方式


    IntelliJ IDEA 中Maven配置的 repositories update 出现 error 总结

    黑马的mybatis项目练习需要导入父工程itcast-parent,导入后,父工程pom.xml报错有42个,仓库地址更新也会error
    在这里插入图片描述

    1.idea的setting中Maven的settings.xml地址,本地仓库地址不对。地址是导入源的配置,和你自己本地设置的地址不一样,需要重新配置,比如原先配置是D盘,可我电脑只有C盘,肯定报错。
    改完这里,父工程pom.xml报错还有26个
    在这里插入图片描述

    2.改变settings.xml的镜像配置,更新maven的Repositories
    更新很慢,大概花了40min
    改完这里,父工程pom.xml报错0个
    在这里插入图片描述
    父工程pom.xml

    <project 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/maven-4.0.0.xsd">
    	<modelVersion>4.0.0modelVersion>
    
    	<groupId>cn.itcast.parentgroupId>
    	<artifactId>itcast-parentartifactId>
    	<version>0.0.1-SNAPSHOTversion>
    	<modules>
    		<module>mybatismodule>
    	modules>
    	<packaging>pompackaging>
    
    	
    	<properties>
    		
    		<junit.version>4.12junit.version>
    		<spring.version>4.3.13.RELEASEspring.version>
    		<mybatis.version>3.2.8mybatis.version>
    		<mybatis.spring.version>1.2.2mybatis.spring.version>
    		<mybatis.paginator.version>1.2.15mybatis.paginator.version>
    		<mysql.version>5.1.32mysql.version>
    		<slf4j.version>1.6.4slf4j.version>
    		<jackson.version>2.9.0jackson.version>
    		<druid.version>1.0.9druid.version>
    		<httpclient.version>4.3.5httpclient.version>
    		<jstl.version>1.2jstl.version>
    		<servlet-api.version>2.5servlet-api.version>
    		<jsp-api.version>2.0jsp-api.version>
    		<joda-time.version>2.5joda-time.version>
    		<commons-lang3.version>3.3.2commons-lang3.version>
    		<commons-io.version>1.3.2commons-io.version>
    	properties>
    
    	<dependencies>
    
    		
    		<dependency>
    			<groupId>junitgroupId>
    			<artifactId>junitartifactId>
    			<scope>testscope>
    		dependency>
    
    
    	dependencies>
    
    
    	
    	<dependencyManagement>
    		<dependencies>
    			
    			<dependency>
    				<groupId>junitgroupId>
    				<artifactId>junitartifactId>
    				<version>${junit.version}version>
    				<scope>testscope>
    			dependency>
    
    			
    			<dependency>
    				<groupId>org.springframeworkgroupId>
    				<artifactId>spring-testartifactId>
    				<version>${spring.version}version>
    				<scope>testscope>
    			dependency>
    
    			
    			<dependency>
    				<groupId>org.springframeworkgroupId>
    				<artifactId>spring-contextartifactId>
    				<version>${spring.version}version>
    			dependency>
    			<dependency>
    				<groupId>org.springframeworkgroupId>
    				<artifactId>spring-beansartifactId>
    				<version>${spring.version}version>
    			dependency>
    			<dependency>
    				<groupId>org.springframeworkgroupId>
    				<artifactId>spring-webmvcartifactId>
    				<version>${spring.version}version>
    			dependency>
    			<dependency>
    				<groupId>org.springframeworkgroupId>
    				<artifactId>spring-jdbcartifactId>
    				<version>${spring.version}version>
    			dependency>
    			<dependency>
    				<groupId>org.springframeworkgroupId>
    				<artifactId>spring-aspectsartifactId>
    				<version>${spring.version}version>
    			dependency>
    
    			
    			<dependency>
    				<groupId>org.mybatisgroupId>
    				<artifactId>mybatisartifactId>
    				<version>${mybatis.version}version>
    			dependency>
    			<dependency>
    				<groupId>org.mybatisgroupId>
    				<artifactId>mybatis-springartifactId>
    				<version>${mybatis.spring.version}version>
    			dependency>
    			<dependency>
    				<groupId>com.github.miemiedevgroupId>
    				<artifactId>mybatis-paginatorartifactId>
    				<version>${mybatis.paginator.version}version>
    			dependency>
    
    			
    			<dependency>
    				<groupId>mysqlgroupId>
    				<artifactId>mysql-connector-javaartifactId>
    				<version>${mysql.version}version>
    			dependency>
    
    			<dependency>
    				<groupId>org.slf4jgroupId>
    				<artifactId>slf4j-log4j12artifactId>
    				<version>${slf4j.version}version>
    			dependency>
    
    			
    			<dependency>
    				<groupId>com.fasterxml.jackson.coregroupId>
    				<artifactId>jackson-databindartifactId>
    				<version>${jackson.version}version>
    			dependency>
    
    			
    			<dependency>
    				<groupId>com.alibabagroupId>
    				<artifactId>druidartifactId>
    				<version>${druid.version}version>
    			dependency>
    
    			
    			<dependency>
    				<groupId>org.apache.httpcomponentsgroupId>
    				<artifactId>httpclientartifactId>
    				<version>${httpclient.version}version>
    			dependency>
    
    			
    			<dependency>
    				<groupId>jstlgroupId>
    				<artifactId>jstlartifactId>
    				<version>${jstl.version}version>
    			dependency>
    			<dependency>
    				<groupId>javax.servletgroupId>
    				<artifactId>servlet-apiartifactId>
    				<version>${servlet-api.version}version>
    				<scope>providedscope>
    			dependency>
    			<dependency>
    				<groupId>javax.servletgroupId>
    				<artifactId>jsp-apiartifactId>
    				<version>${jsp-api.version}version>
    				<scope>providedscope>
    			dependency>
    
    			
    			<dependency>
    				<groupId>joda-timegroupId>
    				<artifactId>joda-timeartifactId>
    				<version>${joda-time.version}version>
    			dependency>
    
    			
    			<dependency>
    				<groupId>org.apache.commonsgroupId>
    				<artifactId>commons-lang3artifactId>
    				<version>${commons-lang3.version}version>
    			dependency>
    			<dependency>
    				<groupId>org.apache.commonsgroupId>
    				<artifactId>commons-ioartifactId>
    				<version>${commons-io.version}version>
    			dependency>
    
    		dependencies>
    	dependencyManagement>
    
    	<build>
    		<finalName>${project.artifactId}finalName>
    		<plugins>
    			
    			<plugin>
    				<groupId>org.apache.maven.pluginsgroupId>
    				<artifactId>maven-resources-pluginartifactId>
    				<version>2.7version>
    				<configuration>
    					<encoding>UTF-8encoding>
    				configuration>
    			plugin>
    			
    			<plugin>
    				<groupId>org.apache.maven.pluginsgroupId>
    				<artifactId>maven-compiler-pluginartifactId>
    				<version>3.2version>
    				<configuration>
    					<source>1.8source>
    					<target>1.8target>
    					<encoding>UTF-8encoding>
    				configuration>
    			plugin>
    		plugins>
    		<pluginManagement>
    			<plugins>
    				
    				<plugin>
    					<groupId>org.apache.tomcat.mavengroupId>
    					<artifactId>tomcat7-maven-pluginartifactId>
    					<version>2.2version>
    				plugin>
    			plugins>
    		pluginManagement>
    	build>
    
    
    project>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222

    mybatis子工程pom.xml

    
    <project 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/maven-4.0.0.xsd">
        <parent>
            <artifactId>itcast-parentartifactId>
            <groupId>cn.itcast.parentgroupId>
            <version>0.0.1-SNAPSHOTversion>
        parent>
        <modelVersion>4.0.0modelVersion>
    
        <artifactId>mybatisartifactId>
    
    
        <dependencies>
            
            <dependency>
                <groupId>mysqlgroupId>
                <artifactId>mysql-connector-javaartifactId>
                <version>${mysql.version}version>
            dependency>
    
            
            <dependency>
                <groupId>org.mybatisgroupId>
                <artifactId>mybatisartifactId>
                <version>${mybatis.version}version>
            dependency>
        dependencies>
    
    project>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31

    中央仓库地址

    https://repo1.maven.org/maven2/
    
    • 1

    以前配置的是阿里云的,删掉

    	  <mirror>
          <id>nexus</id>
    	    <mirrorOf>*</mirrorOf>
    	    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    	  </mirror>
    
    • 1
    • 2
    • 3
    • 4
    • 5

    换成中央仓库的

        <mirror>
          <id>central-mirror</id>
          <mirrorOf>central</mirrorOf>
          <url>https://repo1.maven.org/maven2/</url>
        </mirror>
    
    • 1
    • 2
    • 3
    • 4
    • 5

    settings.xml

    
    
    
    
    
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
      
    <localRepository>C:/Users/U100926/Desktop/tool/maven_repositorylocalRepository>
    
      
    
      
    
      
      <pluginGroups>
        
      pluginGroups>
    
      
      <proxies>
        
      proxies>
    
      
      <servers>
        
    
        
      servers>
    
      
      <mirrors>
        
    
        <mirror>
          <id>central-mirrorid>
          <mirrorOf>centralmirrorOf>
          <url>https://repo1.maven.org/maven2/url>
        mirror>
     
      mirrors>
    
      
      <profiles>
        
    
        
      profiles>
    
      
    settings>
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
  • 相关阅读:
    Linux流量监控
    Android - 文件存储
    用c语言写一个剪刀石头布小游戏
    Git技法:.gitignore、移除暂存与撤销修改
    【红外与可见光图像融合】离散平稳小波变换域中基于离散余弦变换和局部空间频率的红外与视觉图像融合方法(Matlab代码实现)
    【数据结构】栈的顺序表实现
    爬虫入门一
    MyBatis-写分页的几种方法,怎么写分页最简单
    九、MFC控件(一)
    背废完虐面试官!字节架构师8年心血终成《图解设计模式》手册
  • 原文地址:https://blog.csdn.net/djydjy3333/article/details/126193839