0

我想使用 celerio从我们的数据库中生成代码。Celerio 使用sql-maven-plugin连接到数据库。但我无法解决 ingres 驱动程序的依赖关系。

这就是我在 celerio 项目的 pom.xml 中设置数据库连接的方式

<!-- ingres jdbc driver -->
<jdbc.groupId>ingres</jdbc.groupId>
<jdbc.artifactId>ingres-connector-java</jdbc.artifactId>
<jdbc.version>10.0-4.0.6</jdbc.version>     

<!-- ingres jdbc settings -->
<jdbc.driver>com.ingres.jdbc.IngresDriver</jdbc.driver>
<jdbc.url>jdbc:ingres://bjax:/entw_frm_db</jdbc.url>
<jdbc.user>ingres</jdbc.user>
<jdbc.password></jdbc.password>
<jdbc.catalog></jdbc.catalog>
<hibernate.dialect>org.hibernate.dialect.IngresDialect</hibernate.dialect>
<sql-maven-plugin.delimiter>;</sql-maven-plugin.delimiter>

但是当我尝试让 codegen 运行时>mvn -Pdb,metadata,gen,我得到了这个异常:

[ERROR] Failed to execute goal org.codehaus.mojo:sql-maven-plugin:1.5:execute (Create and initialize the database) on project book_application: Execution Create
 and initialize the database of goal org.codehaus.mojo:sql-maven-plugin:1.5:execute failed: Plugin org.codehaus.mojo:sql-maven-plugin:1.5 or one of its dependen
cies could not be resolved: Failed to collect dependencies at org.codehaus.mojo:sql-maven-plugin:jar:1.5 -> ingres:ingres-connector-java:jar:10.0-4.0.6: Failed
to read artifact descriptor for ingres:ingres-connector-java:jar:10.0-4.0.6: Could not transfer artifact ingres:ingres-connector-java:pom:10.0-4.0.6 from/to Cod
ehaus Snapshots (https://nexus.codehaus.org/content/repositories/releases): Failed to transfer file: https://nexus.codehaus.org/content/repositories/releases/in
gres/ingres-connector-java/10.0-4.0.6/ingres-connector-java-10.0-4.0.6.pom. Return code is: 502 , ReasonPhrase:Bad Gateway. -> [Help 1]

注意:我尝试使用 mysql 运行代码生成,我完全没有问题(但使用 mysql 不是选项,因为这只是一个测试 - 我们的客户数据库是一个 ingres 数据库)

4

1 回答 1

0

传输文件失败:https://nexus.codehaus.org/...您似乎配置了旧的 Codehaus 存储库,但它不再可用。Codehaus 于 2015 年终止。请参阅: https: //support.sonatype.com/hc/en-us/articles/217611787-codehaus-org-Repositories-Should-Be-Removed-From-Your-Nexus-Instance

Yoy 应该从您的pom.xml和/或settings.xml.

于 2017-11-27T14:08:49.730 回答