请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

maven中mybatis-generator生成错误

一开始是报了如下错误:
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli)
on project mmall: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate
failed: Plugin org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2 or one of
its dependencies could not be resolved: The repository system is offline but the artifact
org.codehaus.plexus:plexus-utils:jar:1.1 is not available in the local repository.
手动添加org.codehaus.plexus:plexus-utils:jar:1.1到仓库后。
执行mybatis-generator后,又报了如下错误:
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:
generate (default-cli) on project mmall: Execution default-cli of goal org.mybatis.generator:
mybatis-generator-maven-plugin:1.3.2:generate failed: A required class was missing
while executing org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate:
org/mybatis/generator/exception/InvalidConfigurationException
找了许多方法,都不行,特来提问

正在回答 回答被采纳积分+3

1回答

geelylucky 2020-07-13 11:50:55

同学,你配置了阿里云的镜像源嘛?https://www.cnblogs.com/jichi/p/11621412.html

配置好后重新refresh一下maven

0 回复 有任何疑惑可以回复我~
  • 提问者 YangyuChen #1
    这个之前配过了。
    不过我把配置改为
    
                <plugin>
    
                    <groupId>org.mybatis.generator</groupId>
    
                    <artifactId>mybatis-generator-maven-plugin</artifactId>
    
                    <version>1.3.5</version>
    
                    <configuration>
    
                        <configurationFile>src/main/resources/generatorConfig.xml</configurationFile>
    
                        <overwrite>false</overwrite>
    
                        <verbose>true</verbose>
    
                    </configuration>
    
                    <dependencies>
    
                        <dependency>
    
                            <groupId>mysql</groupId>
    
                            <artifactId>mysql-connector-java</artifactId>
    
                            <version>5.1.41</version>
    
                        </dependency>
    
                    </dependencies>
    
                </plugin>
    
    就成功了
    回复 有任何疑惑可以回复我~ 2020-07-13 21:21:16
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信