处理这个问题引发的其他问题折磨了我两天,谢谢你能看到这个问题:
pom文件:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>7.8.2</version>
<configuration>
<url>jdbc:h2:~/form</url>
<user>sa</user>
<password>123</password>
</configuration>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.6</version>
<configuration>
<configurationFile>src/main/resources/generatorConfig.xml</configurationFile>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.6</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
generatorConfig文件部分内容:
<context id="DB2Tables" targetRuntime="MyBatis3">
<!-- 注释 -->
<commentGenerator >
<property name="suppressAllComments" value="false"/><!-- 是否取消注释 -->
<property name="suppressDate" value="true"/> <!-- 是否生成注释代时间戳-->
</commentGenerator>
<jdbcConnection driverClass="org.h2.Driver"
connectionURL="jdbc:h2:~/form"
userId="sa"
password="123"/>
在进行generate时提示,这个错误:(idea的maven插件与该module中均已显示出mysql-connect-java的jar包)
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.6:generate (default-cli) on project crowd06-reverse: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.6:generate failed: Exception getting JDBC Driver
有尝试过调整idea中这个项目中几个模块的jdk版本,setting.xml添加阿里的镜像。。。无效
——————————————————————————————————————
感觉是与 deploy时报出的这个错误有关,但是无论是修改setting.xml文件还是说在pom.xml中加入私服配置(报transfor错误,我不怎么会配置这个)均不能解决这个问题;尝试过更换各依赖包的版本,但是没有得到解决
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project crowd06-reverse: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter
网上的答案只有配置私服这一种解决方式,现在还刚刚做几个学习中产物,麻烦懂的大佬看下这是什么问题,respect