FAQs
- The SchemaSpy plugin isn't generating any graphs or diagrams. What's happening, dude?
Make sure you've installed the Graphvis) tool, and that it is accessible on the system path on your machine. Check to see if you can run the "dot -?" command from the command line, as shown here:
$ dot -? Usage: dot [-Vv?] [-(GNE)name=val] [-(KTlso)<val>] <dot files> (additional options for neato) [-x] [-n<v>] (additional options for fdp) [-L(gO)] [-L(nUCT)<val>] (additional options for memtest) [-m] (additional options for config) [-cv] -V - Print version and exit ...
If not, Graphvis probably isn't installed correctly.
- I'm trying to run SchemaSpy against an Oracle (DB2/Informix/Firebird/...) database, but it keeps crashing on me.
Most databases with JDBC drivers available in the standard Maven repository should work out-of-the-box. Currently, these are * Derby * MySQL * HSQLDB * PostgreSQL * MS SQLServer using the JTDS driver (mssql-jtds)
Others, such as DB2, Oracle, MS SQL Server (if using the Microsoft driver) and Firefox, don't have drivers in the repositories.
In this case, or if you want to specify a different driver, you need to specify the driver manually using the
<pathToDrivers>
parameter, as shown here:<project> ... <reporting> <plugins> <plugin> <groupId>com.wakaleo.maven.plugin.schemaspy</groupId> <artifactId>maven-schemaspy-plugin</artifactId> <version>1.0</version> <configuration> <databaseType>mysql</databaseType> <database>testdb</database> <host>localhost</host> <user>scott</user> <password>tiger</password> <outputDirectory>target/site/schemaSpy-full</outputDirectory> <pathToDrivers>src/test/resources/lib/derby-10.1.2.1.jar</pathToDrivers> <commentsInitiallyDisplayed>true</commentsInitiallyDisplayed> <noTableComments>true</noTableComments> <noImplied>true</noImplied> <allowHtmlInComments>true</allowHtmlInComments> <cssStylesheet>testSchemaSpy.css</cssStylesheet> <schemaDescription>Maven Plugin SchemaSpy Test</schemaDescription> </configuration> </plugin> </plugins> </reporting> </project>
- SchemaSpy reports are cool, but I don't like the colors. Can I change them?
Sure. Just use the
<cssStylesheet>
configuration option. The default one is called schemaSpy.css, and can be found bundled in the plugin JAR (in the resources directory). You can also check it out online in the Subversion repository. - The SchemaSpy plugin is logging my database password, so exposing it in Jenkins logs. Can I hide it?
The way to do this is to put the database connection details in a separate file of key=value pairs containing a
password=mypassword
entry. Point to that file with the<connprops>
option.