Devskiller / jpa2ddl

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

Migrated to Gradle 5.x/6.x and Java 11 #31

Closed kazusato closed 4 years ago

kazusato commented 4 years ago

Migrated to the following versions:

Because Java 11 does not include JAXB, I added dependencies of JAXB API and implementation to jpa2ddl-core. This change is compatible with Java 8 and binaries generated are still Java 8 compatible. Gradle version should be later than 5.1 because some APIs used in this change are supported from 5.1.

I tested with the following combinations: [JDK]

nickgieschen commented 4 years ago

Any chance this gets merged in soon and pushed to maven central? I've been trying to build it myself, but running into problems.

FunctionalHacker commented 4 years ago

Hey as a workaround until this gets merged, you can add these dependencies (copied from this PR) to the plugin configuration:

<plugin>
    <groupId>com.devskiller.jpa2ddl</groupId>
    <artifactId>jpa2ddl-maven-plugin</artifactId>
    <version>0.9.12</version>
    <extensions>true</extensions>
    <configuration>
        <packages>
            <package>com.test.model</package>
        </packages>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.4.0-b180830.0359</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>2.4.0-b180830.0438</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
</plugin>

Using this configuration the plugin works fine using Java 11 for me