jpa-schema-maven-plugin
jpa-schema-maven-plugin copied to clipboard
java.lang.ClassNotFoundException: javax.persistence.spi.PersistenceUnitInfo
Starting with 0.2.0, the project class path is ignored, causing
[ERROR] Failed to execute goal io.github.divinespear:jpa-schema-maven-plugin:0.2.1:generate (default) on project dcm4chee-arc-entity: Execution default of goal io.github.divinespear:jpa-schema-maven-plugin:0.2.1:generate failed: A required class was missing while executing io.github.divinespear:jpa-schema-maven-plugin:0.2.1:generate: javax/persistence/spi/PersistenceUnitInfo
if JavaEE classes are declared as maven project dependency, but not as plugin dependency:
Successful build with 0.1.12:
$ mvn -X process-classes
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /home/gunter/apache-maven-3.8.2
Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.11.0-34-generic", arch: "amd64", family: "unix"
...
[INFO] --- jpa-schema-maven-plugin:0.1.12:generate (default) @ dcm4chee-arc-entity ---
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for spring-libs-release (http://repo.spring.io/libs-release).
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=143339, ConflictMarker.markTime=71712, ConflictMarker.nodeCount=70, ConflictIdSorter.graphTime=50044, ConflictIdSorter.topsortTime=68669, ConflictIdSorter.conflictIdCount=38, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1178546, ConflictResolver.conflictItemCount=69, DefaultDependencyCollector.collectTime=46286717, DefaultDependencyCollector.transformTime=1584936}
[DEBUG] io.github.divinespear:jpa-schema-maven-plugin:jar:0.1.12
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.0.5:compile
[DEBUG] commons-lang:commons-lang:jar:2.6:compile
[DEBUG] org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.5.2:compile
[DEBUG] org.eclipse.persistence:javax.persistence:jar:2.1.0:compile
[DEBUG] org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.5.2:compile
[DEBUG] org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.5.2:compile
[DEBUG] org.eclipse.persistence:org.eclipse.persistence.jpa.jpql:jar:2.5.2:compile
[DEBUG] org.eclipse.persistence:org.eclipse.persistence.core:jar:2.5.2:compile
[DEBUG] org.eclipse.persistence:org.eclipse.persistence.oracle:jar:2.5.2:compile
[DEBUG] org.hibernate:hibernate-entitymanager:jar:4.3.6.Final:compile
[DEBUG] org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile
[DEBUG] org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
[DEBUG] org.hibernate:hibernate-core:jar:4.3.6.Final:compile
[DEBUG] antlr:antlr:jar:2.7.7:compile
[DEBUG] org.jboss:jandex:jar:1.1.0.Final:compile
[DEBUG] dom4j:dom4j:jar:1.6.1:compile
[DEBUG] xml-apis:xml-apis:jar:1.0.b2:compile
[DEBUG] org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final:compile
[DEBUG] org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile
[DEBUG] org.javassist:javassist:jar:3.18.1-GA:compile
[DEBUG] org.springframework.data:spring-data-jpa:jar:1.6.4.RELEASE:runtime
[DEBUG] org.springframework.data:spring-data-commons:jar:1.8.4.RELEASE:runtime
[DEBUG] org.springframework:spring-orm:jar:3.2.10.RELEASE:runtime
[DEBUG] org.springframework:spring-jdbc:jar:3.2.10.RELEASE:runtime
[DEBUG] org.springframework:spring-context:jar:3.2.10.RELEASE:runtime
[DEBUG] org.springframework:spring-expression:jar:3.2.10.RELEASE:runtime
[DEBUG] org.springframework:spring-aop:jar:3.2.10.RELEASE:runtime
[DEBUG] aopalliance:aopalliance:jar:1.0:runtime
[DEBUG] org.springframework:spring-tx:jar:3.2.10.RELEASE:runtime
[DEBUG] org.springframework:spring-beans:jar:3.2.10.RELEASE:runtime
[DEBUG] org.springframework:spring-core:jar:3.2.10.RELEASE:runtime
[DEBUG] org.aspectj:aspectjrt:jar:1.8.1:runtime
[DEBUG] org.slf4j:slf4j-api:jar:1.7.7:runtime
[DEBUG] org.slf4j:jcl-over-slf4j:jar:1.7.7:runtime
[DEBUG] joda-time:joda-time:jar:2.4:runtime
[DEBUG] org.joda:joda-convert:jar:1.7:runtime
[DEBUG] Created new class realm plugin>io.github.divinespear:jpa-schema-maven-plugin:0.1.12
[DEBUG] Importing foreign packages into class realm plugin>io.github.divinespear:jpa-schema-maven-plugin:0.1.12
[DEBUG] Imported: < project>org.dcm4che.dcm4chee-arc:dcm4chee-arc-entity:5.24.0
[DEBUG] Populating class realm plugin>io.github.divinespear:jpa-schema-maven-plugin:0.1.12
[DEBUG] Included: io.github.divinespear:jpa-schema-maven-plugin:jar:0.1.12
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.0.5
[DEBUG] Included: commons-lang:commons-lang:jar:2.6
[DEBUG] Included: org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.5.2
[DEBUG] Included: org.eclipse.persistence:javax.persistence:jar:2.1.0
[DEBUG] Included: org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.5.2
[DEBUG] Included: org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.5.2
[DEBUG] Included: org.eclipse.persistence:org.eclipse.persistence.jpa.jpql:jar:2.5.2
[DEBUG] Included: org.eclipse.persistence:org.eclipse.persistence.core:jar:2.5.2
[DEBUG] Included: org.eclipse.persistence:org.eclipse.persistence.oracle:jar:2.5.2
[DEBUG] Included: org.hibernate:hibernate-entitymanager:jar:4.3.6.Final
[DEBUG] Included: org.jboss.logging:jboss-logging:jar:3.1.3.GA
[DEBUG] Included: org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1
[DEBUG] Included: org.hibernate:hibernate-core:jar:4.3.6.Final
[DEBUG] Included: antlr:antlr:jar:2.7.7
[DEBUG] Included: org.jboss:jandex:jar:1.1.0.Final
[DEBUG] Included: dom4j:dom4j:jar:1.6.1
[DEBUG] Included: xml-apis:xml-apis:jar:1.0.b2
[DEBUG] Included: org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final
[DEBUG] Included: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final
[DEBUG] Included: org.javassist:javassist:jar:3.18.1-GA
[DEBUG] Included: org.springframework.data:spring-data-jpa:jar:1.6.4.RELEASE
[DEBUG] Included: org.springframework.data:spring-data-commons:jar:1.8.4.RELEASE
[DEBUG] Included: org.springframework:spring-orm:jar:3.2.10.RELEASE
[DEBUG] Included: org.springframework:spring-jdbc:jar:3.2.10.RELEASE
[DEBUG] Included: org.springframework:spring-context:jar:3.2.10.RELEASE
[DEBUG] Included: org.springframework:spring-expression:jar:3.2.10.RELEASE
[DEBUG] Included: org.springframework:spring-aop:jar:3.2.10.RELEASE
[DEBUG] Included: aopalliance:aopalliance:jar:1.0
[DEBUG] Included: org.springframework:spring-tx:jar:3.2.10.RELEASE
[DEBUG] Included: org.springframework:spring-beans:jar:3.2.10.RELEASE
[DEBUG] Included: org.springframework:spring-core:jar:3.2.10.RELEASE
[DEBUG] Included: org.aspectj:aspectjrt:jar:1.8.1
[DEBUG] Included: org.slf4j:jcl-over-slf4j:jar:1.7.7
[DEBUG] Included: joda-time:joda-time:jar:2.4
[DEBUG] Included: org.joda:joda-convert:jar:1.7
[DEBUG] Configuring mojo io.github.divinespear:jpa-schema-maven-plugin:0.1.12:generate from plugin realm ClassRealm[plugin>io.github.divinespear:jpa-schema-maven-plugin:0.1.12, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@55054057]
[DEBUG] Configuring mojo 'io.github.divinespear:jpa-schema-maven-plugin:0.1.12:generate' with basic configurator -->
[DEBUG] (f) createOutputFileName = create-psql.sql
[DEBUG] (f) createSourceMode = metadata
[DEBUG] (f) databaseAction = none
[DEBUG] (f) databaseMajorVersion = 9
[DEBUG] (f) databaseMinorVersion = 5
[DEBUG] (f) databaseProductName = PostgreSQL
[DEBUG] (f) dropOutputFileName = drop-psql.sql
[DEBUG] (f) dropSourceMode = metadata
[DEBUG] (f) format = false
[DEBUG] (f) outputDirectory = /home/gunter/work/dcm4chee-arc-light/dcm4chee-arc-entity/target/classes/sql
[DEBUG] (f) persistenceUnitName = dcm4chee-arc
[DEBUG] (f) persistenceXml = META-INF/persistence.xml
[DEBUG] (f) scanTestClasses = false
[DEBUG] (f) scriptAction = drop-and-create
[DEBUG] (f) skip = false
[DEBUG] (f) mojo = io.github.divinespear:jpa-schema-maven-plugin:0.1.12:generate {execution: default}
[DEBUG] (f) plugin = Component Descriptor: role: 'org.apache.maven.plugin.Mojo', implementation: 'io.github.divinespear.maven.plugin.JpaSchemaGeneratorMojo', role hint: 'io.github.divinespear:jpa-schema-maven-plugin:0.1.12:generate'
---
[DEBUG] (f) project = MavenProject: org.dcm4che.dcm4chee-arc:dcm4chee-arc-entity:5.24.0 @ /home/gunter/work/dcm4chee-arc-light/dcm4chee-arc-entity/pom.xml
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@7c75db8b
[DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter@1e86a5a7
[DEBUG] -- end configuration --
[info] * classpath: file:/home/gunter/work/dcm4chee-arc-light/dcm4chee-arc-entity/target/classes/
[info] * classpath: file:/home/gunter/.m2/repository/org/dcm4che/dcm4chee-arc/dcm4chee-arc-conf/5.24.0/dcm4chee-arc-conf-5.24.0.jar
[info] * classpath: file:/home/gunter/.m2/repository/org/hibernate/hibernate-jpamodelgen/5.3.20.Final/hibernate-jpamodelgen-5.3.20.Final.jar
[info] * classpath: file:/home/gunter/.m2/repository/org/apache/commons/commons-csv/1.7/commons-csv-1.7.jar
[info] * classpath: file:/home/gunter/.m2/repository/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.jar
...
Failed build with 0.2.1:
$ mvn -X process-classes
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /home/gunter/apache-maven-3.8.2
Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.11.0-34-generic", arch: "amd64", family: "unix"
...
INFO] --- jpa-schema-maven-plugin:0.2.1:generate (default) @ dcm4chee-arc-entity ---
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=138458, ConflictMarker.markTime=47375, ConflictMarker.nodeCount=38, ConflictIdSorter.graphTime=64749, ConflictIdSorter.topsortTime=47958, ConflictIdSorter.conflictIdCount=18, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=634038, ConflictResolver.conflictItemCount=37, DefaultDependencyCollector.collectTime=24516019, DefaultDependencyCollector.transformTime=993952}
[DEBUG] io.github.divinespear:jpa-schema-maven-plugin:jar:0.2.1
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.0.22:compile
[DEBUG] commons-lang:commons-lang:jar:2.6:compile
[DEBUG] org.springframework.data:spring-data-jpa:jar:1.9.2.RELEASE:compile
[DEBUG] org.springframework.data:spring-data-commons:jar:1.11.2.RELEASE:compile
[DEBUG] org.springframework:spring-orm:jar:4.1.9.RELEASE:compile
[DEBUG] org.springframework:spring-jdbc:jar:4.1.9.RELEASE:compile
[DEBUG] org.springframework:spring-context:jar:4.1.9.RELEASE:compile
[DEBUG] org.springframework:spring-expression:jar:4.1.9.RELEASE:compile
[DEBUG] org.springframework:spring-aop:jar:4.1.9.RELEASE:compile
[DEBUG] aopalliance:aopalliance:jar:1.0:compile
[DEBUG] org.springframework:spring-tx:jar:4.1.9.RELEASE:compile
[DEBUG] org.springframework:spring-beans:jar:4.1.9.RELEASE:compile
[DEBUG] org.springframework:spring-core:jar:4.1.9.RELEASE:compile
[DEBUG] org.aspectj:aspectjrt:jar:1.8.7:compile
[DEBUG] org.slf4j:slf4j-api:jar:1.7.13:compile
[DEBUG] org.slf4j:jcl-over-slf4j:jar:1.7.13:runtime
[DEBUG] Created new class realm plugin>io.github.divinespear:jpa-schema-maven-plugin:0.2.1
[DEBUG] Importing foreign packages into class realm plugin>io.github.divinespear:jpa-schema-maven-plugin:0.2.1
[DEBUG] Imported: < project>org.dcm4che.dcm4chee-arc:dcm4chee-arc-entity:5.24.0
[DEBUG] Populating class realm plugin>io.github.divinespear:jpa-schema-maven-plugin:0.2.1
[DEBUG] Included: io.github.divinespear:jpa-schema-maven-plugin:jar:0.2.1
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.0.22
[DEBUG] Included: commons-lang:commons-lang:jar:2.6
[DEBUG] Included: org.springframework.data:spring-data-jpa:jar:1.9.2.RELEASE
[DEBUG] Included: org.springframework.data:spring-data-commons:jar:1.11.2.RELEASE
[DEBUG] Included: org.springframework:spring-orm:jar:4.1.9.RELEASE
[DEBUG] Included: org.springframework:spring-jdbc:jar:4.1.9.RELEASE
[DEBUG] Included: org.springframework:spring-context:jar:4.1.9.RELEASE
[DEBUG] Included: org.springframework:spring-expression:jar:4.1.9.RELEASE
[DEBUG] Included: org.springframework:spring-aop:jar:4.1.9.RELEASE
[DEBUG] Included: aopalliance:aopalliance:jar:1.0
[DEBUG] Included: org.springframework:spring-tx:jar:4.1.9.RELEASE
[DEBUG] Included: org.springframework:spring-beans:jar:4.1.9.RELEASE
[DEBUG] Included: org.springframework:spring-core:jar:4.1.9.RELEASE
[DEBUG] Included: org.aspectj:aspectjrt:jar:1.8.7
[DEBUG] Included: org.slf4j:jcl-over-slf4j:jar:1.7.13
[DEBUG] Configuring mojo io.github.divinespear:jpa-schema-maven-plugin:0.2.1:generate from plugin realm ClassRealm[plugin>io.github.divinespear:jpa-schema-maven-plugin:0.2.1, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@55054057]
[WARNING] Error injecting: io.github.divinespear.maven.plugin.JpaSchemaGeneratorMojo
java.lang.NoClassDefFoundError: javax/persistence/spi/PersistenceUnitInfo