将 ingres 驱动程序与 sql maven 插件一起使用

using ingres driver with sql maven plugin

我想用celerio to generate code from our database. Celerio uses the 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>

但是当我尝试获取代码生成器时 运行ning >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 数据库)

传输文件失败: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 and/or settings.xml.

中删除该存储库