我想从集成在 maven 生命周期中的数据库生成 er 图表。SchemaSpy 生成 er-diagram 并且使用 maven-schemaspy-plugin 应该可以将其集成到生命周期过程中。(如果有人对此有更好的想法,请告诉我)
我用以下简单的 pom.xml 尝试了它(它只应该生成 er-diagram);但插件没有启动;它甚至无法下载:
<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>test.schemaspy</groupId>
<artifactId>SchemaSpyGenerateDB_02</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SchemaSpyGenerateDB_02</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>maven-plugins</groupId>
<artifactId>maven-schemaspy-plugin</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-plugins</groupId>
<artifactId>maven-schemaspy-plugin</artifactId>
<version>1.0</version>
<type>plugin</type>
</dependency>
</dependencies>
<!-- To use the report goals in your POM or parent POM -->
<reporting>
<plugins>
<plugin>
<groupId>maven-plugins</groupId>
<artifactId>maven-schemaspy-plugin</artifactId>
<version>1.1</version>
<configuration>
<databaseType>derby</databaseType>
<database>JPACertifiaction_Relationship</database>
<host>localhost</host>
<port>1527</port>
<user>user</user>
<password>password</password>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
命令
mvn site:site
导致消息
maven-plugins:maven-schemaspy-plugin:jar:1.0 的 POM 缺失,没有可用的依赖信息
maven-plugins:maven-schemaspy-plugin:plugin:1.0 的 POM 缺失,没有可用的依赖信息
我也尝试过以下设置,但没有成功:
<dependency>
<groupId>com.wakaleo.schemaspy</groupId>
<artifactId>maven-schemaspy-plugin</artifactId>
<version>5.0.1</version>
</dependency>
....
<reporting>
<plugins>
<plugin>
<groupId>com.wakaleo.schemaspy</groupId>
<artifactId>maven-schemaspy-plugin</artifactId>
<version>5.0.1</version>
....
<repository>
<id>Wakaleo Repository</id>
<url>http://maven.wakaleo.com/mojo/maven-schemaspy-plugin/</url>
</repository>
我还感到困惑的是,有不同版本的 1.0 / 5.0.1 不同的存储库,那么真正的官方版本是什么?