Devskiller / jpa2ddl

JPA Schema Generator Plugin
Apache License 2.0
110 stars 33 forks source link

Multi module project #43

Open m-pavel opened 3 years ago

m-pavel commented 3 years ago

For the maven multi-module project, when persistence classes are located in different projects, what is correct configuration for the maven plugin ? I do have sample project (https://github.com/m-pavel/ddl_test) with api and model sub-projects. api contains common classes, model - persistence entities. And I want to generate ddl for 'model' project. The only way I found is:

    mvn clean install
    mvn com.devskiller.jpa2ddl:jpa2ddl-maven-plugin:0.10.0:generate -pl model

But in this case plugin fails with

[ERROR] Failed to execute goal com.devskiller.jpa2ddl:jpa2ddl-maven-plugin:0.10.0:generate (default-cli) on project model: null: MojoExecutionException: FileSystemNotFoundException

Which is similar to #26

How should I configure multi module project for correct generation ?

m-pavel commented 3 years ago

If approach with clean install generate is acceptable, here is a PR https://github.com/Devskiller/jpa2ddl/pull/44