为了账号安全,请及时绑定邮箱和手机立即绑定

运行mybatis-generator时报错了org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available

[INFO] Scanning for projects...

[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available

[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced

[INFO]                                                                         

[INFO] ------------------------------------------------------------------------

[INFO] Building miaosha 1.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available

[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced

[INFO] 

[INFO] --- mybatis-generator-maven-plugin:1.3.5:generate (default-cli) @ miaosha ---

[INFO] Connecting to the Database

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 1.935 s

[INFO] Finished at: 2019-01-10T17:13:57+08:00

[INFO] Final Memory: 22M/228M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project miaosha: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate failed: Exception getting JDBC Driver: COM.ibm.db2.jdbc.app.DB2Driver -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1]

http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException


代码已上传到github https://github.com/shawbs/miaosha-demo


正在回答

11 回答

1、git clone https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin

2、在拉下来的项目文件夹里mvn -Dmaven.test.skip -U clean install,这样就可以把lifecycle-mapping拉到本地maven仓库了

3、重新run mybatis-generator.xml

2 回复 有任何疑惑可以回复我~
#1

小公举丶默

遇到同样的问题,解决了666
2019-08-27 回复 有任何疑惑可以回复我~
#2

weixin_慕妹3359172 回复 小公举丶默

请问是怎么解决的呢?我也遇到了相同的问题,上面的方法看不懂
2019-10-30 回复 有任何疑惑可以回复我~
#3

小公举丶默 回复 weixin_慕妹3359172

看不懂没关系,照着操作就行
2019-10-30 回复 有任何疑惑可以回复我~
#4

cclibra

我是直接在上面的git链接手动下载pom文件和jar包,然后按照网页中的安装方法安装就可以了。 mvn install:install-file -DpomFile=pom.xml -Dfile=lifecycle-mapping-1.0.0.jar
2019-11-20 回复 有任何疑惑可以回复我~
#5

慕少3479761

这安装的时间也太久了吧,我安装了一下午都没装好
2020-02-17 回复 有任何疑惑可以回复我~
#6

weixin_慕斯卡7437760

大佬 感谢
2021-04-24 回复 有任何疑惑可以回复我~
查看3条回复
<?xml version="1.0" encoding="UTF-8"?>

<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.0</modelVersion>

  <groupId>com.miaoshaproject</groupId>
  <artifactId>miaosha</artifactId>
  <version>1.0-SNAPSHOT</version>

  <name>miaosha</name>

  <url>http://www.example.com</url>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.5.RELEASE</version>
  </parent>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
  </properties>

  <dependencies>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <!-- mysql-->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.41</version>
    </dependency>
    <!-- 阿里巴巴druid数据库连接池-->
    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>druid</artifactId>
      <version>1.1.3</version>
    </dependency>
    <dependency>
      <groupId>org.mybatis.spring.boot</groupId>
      <artifactId>mybatis-spring-boot-starter</artifactId>
      <version>1.3.1</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mybatis.generator</groupId>
      <artifactId>mybatis-generator-core</artifactId>
      <version>1.3.5</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.m2e</groupId>
      <artifactId>lifecycle-mapping</artifactId>
      <version>1.0.0</version>
    </dependency>
    <!--<dependency>
      <groupId>lifecycle-mapping</groupId>
      <artifactId>lifecycle-mapping</artifactId>
      <version>1.0.0</version>
    </dependency>-->

  </dependencies>


  <build>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>


        <!--<plugin>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
        </plugin>
        <plugin>
          <artifactId>org.eclipse.m2e</artifactId>
          <version>1.3</version>
        </plugin>-->
        <!-- -->
        <!--<plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>aspectj-maven-plugin</artifactId>
                    <versionRange>[1.0,)</versionRange>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>-->

        <plugin>
          <groupId>org.mybatis.generator</groupId>
          <artifactId>mybatis-generator-maven-plugin</artifactId>
          <version>1.3.5</version>
          <dependencies>
            <!--<dependency>
              <groupId>org.mybatis.generator</groupId>
              <artifactId>mybatis-generator-core</artifactId>
              <version>1.3.5</version>
            </dependency>-->

            <dependency>
              <groupId>mysql</groupId>
              <artifactId>mysql-connector-java</artifactId>
              <version>5.1.41</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>mybatis generator</id>
              <phase>package</phase>
              <goals>
                <goal>generate</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <!-- 允许移动生成的文件-->
            <verbose>true</verbose>
            <!-- 允许自动覆盖文件 实际开发过程中不要开-->
            <overwrite>true</overwrite>
            <configurationFile>
              src/main/resources/mybatis-generator.xml
            </configurationFile>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>


0 回复 有任何疑惑可以回复我~

亲们,你们这个最后怎么解决的啊?

0 回复 有任何疑惑可以回复我~
#1

战斗王子贝吉塔

我也遇到这样的问题,你怎么解决的
2019-10-31 回复 有任何疑惑可以回复我~

https://www.jianshu.com/p/5ac7dfaae2d0这个地址有相应的答案,

0 回复 有任何疑惑可以回复我~

刚刚看到一个答案:(好像被删除了)

git clone https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin.git

cd dummy-lifecycle-mapping-plugin/

mvn -Dmaven.test.skip -U clean install


大概就是上面3行指令结束后,重新run吧。


0 回复 有任何疑惑可以回复我~
#1

sgdy23 提问者

搞错了,已经采纳了。。
2019-01-15 回复 有任何疑惑可以回复我~
#2

晴颜 回复 sgdy23 提问者

兄弟,你这个问题怎么解决的?我的也是报 The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available version can neither be null, empty nor blank
2019-02-15 回复 有任何疑惑可以回复我~
#3

慕莱坞5288264 回复 晴颜

兄弟你的解决了吗?
2019-07-31 回复 有任何疑惑可以回复我~
#4

慕莱坞5288264 回复 sgdy23 提问者

兄弟你的解决了吗?我的也报
2019-07-31 回复 有任何疑惑可以回复我~
#5

晴颜 回复 慕莱坞5288264

我没有用老师的这种生成方式,自己写了一个main方法加载mybatis-generator.xml文件逆向生成的
2019-08-07 回复 有任何疑惑可以回复我~
查看2条回复

Actually, the thing is we cannot directly use the mybatis-generator.xml downloaded online. We have to delete several lines in it and modify the directory, jdbc driver , user name and password exactly.  Sorry for my english, I don't have pinyin in library's computer

0 回复 有任何疑惑可以回复我~
#1

sgdy23 提问者

Can you understand Chinese? 你解决了这个问题吗? 或许你说的对,但我没有其它的配置文件可供参考 你有正确的mybatis-generator.xml文件吗?
2019-01-14 回复 有任何疑惑可以回复我~

Hi, Have you found what's wrong within your code? I made the same mistake with you. 

0 回复 有任何疑惑可以回复我~

亲测,连接驱动错了https://img1.sycdn.imooc.com//5c3964f90001970d07200181.jpg

0 回复 有任何疑惑可以回复我~
#1

sgdy23 提问者

好的,我试试。。(原谅我是个菜鸡。。)
2019-01-14 回复 有任何疑惑可以回复我~
#2

sgdy23 提问者

我把你说的这个属性改成和视频里面的一致,还是报这个错:) <jdbcConnection driverClass="com.mysql.jdbc.Driver"
2019-01-14 回复 有任何疑惑可以回复我~
#3

sgdy23 提问者

老铁,要不你代码给我看看,可以吗
2019-01-14 回复 有任何疑惑可以回复我~
#4

qq_影_53 回复 sgdy23 提问者

可以啊 GitHub地址是https://github.com/FORyc/shop-test1.git
2019-01-14 回复 有任何疑惑可以回复我~
查看1条回复

问题的根本原因是不存在的插件 lifecycle-mapping

无法从任何存储库org.eclipse.m2e下载工件:lifecycle-mapping:pom:1.0.0

您的问题的解决方案是:m2e生命周期映射未找到

- -虽然我还是没有解决

0 回复 有任何疑惑可以回复我~
#1

qq_影_53

题主是mybatis-generator.xml中jdbcConnerctior的连接驱动配置错了,你看看你的是不是也是这个问题
2019-01-12 回复 有任何疑惑可以回复我~

感觉是没有吧mybatis-generator依赖进来,你把镜像换成阿里的,然后reimport一下maven试试欸

1 回复 有任何疑惑可以回复我~
#1

sgdy23 提问者

不会呀,哥
2019-01-11 回复 有任何疑惑可以回复我~
#2

Tye_V

我用的是阿里的镜像 也重新reimport了 还是不行 同样的问题
2019-01-11 回复 有任何疑惑可以回复我~
#3

qq_影_53 回复 sgdy23 提问者

我先去看看你的源码
2019-01-12 回复 有任何疑惑可以回复我~
#4

qq_影_53 回复 Tye_V

他的问题我找到了,mybatis-generator.xml中jdbcConnerctior的连接驱动配置错了,你也检查一下你的是不是这个问题
2019-01-12 回复 有任何疑惑可以回复我~
#5

战斗王子贝吉塔 回复 Tye_V

我也出现这种问题,你怎么解决的
2019-10-31 回复 有任何疑惑可以回复我~
#6

战斗王子贝吉塔 回复 Tye_V

我也遇到这样的问题,你怎么解决的
2019-10-31 回复 有任何疑惑可以回复我~
#7

战斗王子贝吉塔

这样也不行,到底该怎么解决
2019-10-31 回复 有任何疑惑可以回复我~
查看4条回复

举报

0/150
提交
取消

运行mybatis-generator时报错了org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信