Closed allan-shoup closed 4 years ago
@allan-shoup - you should not need to do much. All you need to do is to add a dependency on graphviz-java to the plugin, similarly to the one shown below. Please let me know if that works for you, otherwise it may be a bug.
<plugin>
<groupId>us.fatehi</groupId>
<artifactId>schemacrawler-maven-plugin</artifactId>
<version>16.9.4-2</version>
<dependencies>
<dependency>
<groupId>guru.nidi</groupId>
<artifactId>graphviz-java</artifactId>
<version>0.17.0</version>
</dependency>
<!-- IMPORTANT: Make sure you have a dependency on the JDBC driver.
In this example, we are using HSQLDB as our database server. -->
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.5.1</version>
</dependency>
</dependencies>
</plugin>
@sualeh, I tried adding the graphviz-java
dependency and there was no change. Still getting the same error.
@allan-shoup - thanks - I will try to reproduce it.
@sualeh, any luck reproducing?
@allan-shoup - no luck yet. I was able to reproduce. I rewrote the who Maven plugin, but I still cannot trace through what is going on.
I'll volunteer to help debug if you thought it'd be helpful. If so, just point me to the new source.
@allan-shoup - thanks. I have pushed the code already. I will release SchemaCrawler Maven plugin v16.10.1.1 shortly. This is a rewritten plugin, which basically calls the SchemaCrawler command-line. You should be able to use the technique above to add a dependency on graphviz-java
. If you turn on logging, you will see the SchemaCrawler command-line the plugin generates. I could get SchemaCrawler to work with the Java plugin and that command-line, but not the Maven plugin, which is very strange.
@allan-shoup - please try to debug with SchemaCrawler Report Maven Plugin v16.10.1.1. Thanks.
I think the problem is that the generated output file path lacks the extension (which is automatically added by graphviz-java). Thus, when the code checks that the output file exists, it doesn't find it because the generated file has an extension.
FYI, this may be premature, but it looks like the graphviz-java mode when running in the plugin is ignoring at least the schemacrawler.graph.graphviz_opts
option from the configuration file.
@allan-shoup - thanks! I will investigate and make a fix over the weekend. Or, if you have a fix, please submit a pull request. Please submit a new issue for Graphviz options - that will be a core SchemaCrawler issue, not a SchemaCrawler Report Maven Plugin issue.
@allan-shoup - thanks for finding the issue! I have fixed it in v16.10.1.2
Happy to help. I can confirm v16.10.1.2 fixes the problem.
Does the plugin support the graphviz-java option? If so, how should that be activated? I'm getting this when graphviz is not installed: