Question

I want to generate a er-diagram from a database integrated in the maven lifecycle. SchemaSpy generates the er-diagram and with the maven-schemaspy-plugin it should be possible to integrate this in the lifecyle-process. (If anyone has a better idea for this please let me know)

I tried it with the following simple pom.xml (which only should generate the er-diagram); but the plugin doesn't start; it couldn't even be downloaded:

<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>

The command

mvn site:site

causes the message

The POM for maven-plugins:maven-schemaspy-plugin:jar:1.0 is missing, no dependency information available

The POM for maven-plugins:maven-schemaspy-plugin:plugin:1.0 is missing, no dependency information available

I've also tried it with the following settings with no success:

<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>

What me also confuses is that there are different reposititories with different versions 1.0 / 5.0.1 so what is really the official one ?

No correct solution

OTHER TIPS

You don't need the entries

  <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>

delete them. When you define a plugin (plugin section later) it gots downloaded by maven automatically. Your error message says that 1.0 is missing, but your plugin is 1.1, so it doesn'T fit to your dependencies anyway.

The maven-schemaspy-plugin and the com.wakaleo.schemaspy plugin are different plugins from different authors. None of them is the "official schemaspy" maven plugin. I was only able to solve it with the wakaleo plugin (with maven 3). The other plugin seams not to be available any more.

With Maven 3 the site generation changed, see site generation in Maven 3. As mentioned in this blog entry you have to include the plugin in this way (note that the versioning has changed):

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <reportPlugins>
                    <plugin>
                        <groupId>com.wakaleo.schemaspy</groupId>
                        <artifactId>maven-schemaspy-plugin</artifactId>
                        <version>1.0.4</version>
                        <configuration>
                            <databaseType>derby</databaseType>
                            <database>JPACertifiaction_Relationship</database>
                            <host>localhost</host>
                            <port>1527</port>
                            <user>user</user>
                            <password>password</password>
                        </configuration>
                    </plugin>
                </reportPlugins>
            </configuration>
        </plugin>
    </plugins>
</build>

and you need the link to the repository:

<pluginRepositories>
    <pluginRepository>
        <id>Wakaleo Repository</id>
        <url>http://www.wakaleo.com/maven/repos/</url>
    </pluginRepository>
</pluginRepositories>

Then the plugin starts. The rest is up to you :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top