From 71a1743a76c08eac60e0eee6ea94275d0a677877 Mon Sep 17 00:00:00 2001 From: Leonardo Zanivan Date: Thu, 17 May 2018 18:26:48 -0300 Subject: [PATCH] Migrate to JDK 10 with module system --- pom.xml | 160 +++++++++++++++++++++++++-------- src/main/java/module-info.java | 23 +++++ 2 files changed, 148 insertions(+), 35 deletions(-) create mode 100644 src/main/java/module-info.java diff --git a/pom.xml b/pom.xml index 0b8f9c273..1bd466802 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ - 1.8 + 10 UTF-8 UTF-8 @@ -27,8 +27,7 @@ 2.2.4 1.8.0 - 2.7 - + 5.0.6.RELEASE @@ -44,6 +43,12 @@ org.springframework.boot spring-boot-starter-data-jpa + + + javax.transaction-api + javax.transaction + + org.springframework.boot @@ -108,10 +113,91 @@ spring-boot-devtools runtime + + + javax.xml.bind + jaxb-api + 2.3.0 + + + org.glassfish.jaxb + jaxb-runtime + 2.3.0 + runtime + + + javax.activation + javax.activation-api + 1.2.0 + + + org.hibernate.javax.persistence + hibernate-jpa-2.1-api + 1.0.2.Final + + + org.jboss.spec.javax.transaction + jboss-transaction-api_1.2_spec + 1.1.1.Final + + + org.apache.maven.plugins + maven-compiler-plugin + 3.7.0 + + ${java.version} + + + + org.ow2.asm + asm + 6.1.1 + + + + + maven-surefire-plugin + 2.21.0 + + 0 + + + + org.ow2.asm + asm + 6.1.1 + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.0 + + + package + + copy-dependencies + + + ${project.build.directory}/modules + runtime + spring-boot-devtools,jaxb-api,jaxb-core,jaxb-runtime + + + + + + maven-jar-plugin + 3.1.0 + + ${project.build.directory}/modules + + org.springframework.boot spring-boot-maven-plugin @@ -133,22 +219,6 @@ - - org.codehaus.mojo - cobertura-maven-plugin - ${cobertura.version} - - - - - - - clean - check - - - - @@ -197,26 +267,46 @@ bootstrap ${webjars-bootstrap.version} + + org.mockito + mockito-core + 2.18.0 + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + module-main-class + package + + exec + + + jar + + + --update + + + --file=${project.build.directory}/modules/${project.build.finalName}.jar + + + --main-class=org.springframework.samples.petclinic.PetClinicApplication + + + --module-version=${project.version} + + + + + + - - - - - org.codehaus.mojo - cobertura-maven-plugin - ${cobertura.version} - - - html - - - - - - diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 000000000..ced7c47fa --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,23 @@ +open module spring.petclinic { + requires cache.api; + + requires java.activation; + requires java.persistence; + requires java.sql; + requires java.transaction; + requires java.validation; + requires java.xml.bind; + + requires org.hibernate.validator; + + requires spring.beans; + requires spring.boot; + requires spring.boot.autoconfigure; + requires spring.context; + requires spring.core; + requires spring.data.commons; + requires spring.data.jpa; + requires spring.tx; + requires spring.web; + requires spring.webmvc; +}