From 06018db7d45cb06234821cc3735e0921df63f846 Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Mon, 9 Jan 2017 22:19:23 +0100 Subject: [PATCH] Alignment with standard archetype --- P/Sda1/Jpa/LectureOperations/pom.xml | 15 +- P/Sda1/Jpa/rdbms2catalog/skeleton/pom.xml | 251 ++++++++++++++-------- P/Sda1/Jpa/rdbms2catalog/solution/pom.xml | 99 ++++++++- 3 files changed, 261 insertions(+), 104 deletions(-) diff --git a/P/Sda1/Jpa/LectureOperations/pom.xml b/P/Sda1/Jpa/LectureOperations/pom.xml index aa7ad0b6f..1ef207746 100644 --- a/P/Sda1/Jpa/LectureOperations/pom.xml +++ b/P/Sda1/Jpa/LectureOperations/pom.xml @@ -2,19 +2,23 @@ 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> + <parent> + <groupId>de.hdm-stuttgart.mi</groupId> + <artifactId>lecturenotes-pom</artifactId> + <version>1.0</version> + + <relativePath>../../../../pom.xml</relativePath> + </parent> + <groupId>jpaintro</groupId> <artifactId>university</artifactId> - <version>0.0.1-SNAPSHOT</version> + <version>0.9</version> <packaging>jar</packaging> <name>university</name> <url>http://www.mi.hdm-stuttgart.de/freedocs/topic/de.hdm_stuttgart.mi.lectures/sd1SectUsingMaven.html</url> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - <dependencies> <dependency> @@ -26,7 +30,6 @@ <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> - <version>5.1.38</version> </dependency> <dependency> diff --git a/P/Sda1/Jpa/rdbms2catalog/skeleton/pom.xml b/P/Sda1/Jpa/rdbms2catalog/skeleton/pom.xml index a3515a9cf..b8bb6115c 100644 --- a/P/Sda1/Jpa/rdbms2catalog/skeleton/pom.xml +++ b/P/Sda1/Jpa/rdbms2catalog/skeleton/pom.xml @@ -1,96 +1,159 @@ <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> - - <parent> - <groupId>de.hdm-stuttgart.mi</groupId> - <artifactId>lecturenotes-pom</artifactId> - <version>1.0</version> - <relativePath>../../../../pom.xml</relativePath> - </parent> - - <groupId>de.hdm-stuttgart.mi.sda1</groupId> - <artifactId>rdbms2catalog</artifactId> - <version>2.0</version> - <packaging>jar</packaging> - - <name>rdbms2catalogJpa</name> - <url>http://www.mi.hdm-stuttgart.de/freedocs</url> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.1</version> - <configuration> - <linksource>true</linksource> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.5</version> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-install-plugin</artifactId> - <version>2.5.2</version> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>2.5</version> - </plugin> - - </plugins> - - </build> - - <dependencies> - - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-entitymanager</artifactId> - <version>5.0.0.CR1</version> - </dependency> - - <dependency> - <groupId>org.hibernate.javax.persistence</groupId> - <artifactId>hibernate-jpa-2.1-api</artifactId> - <version>1.0.0.Final</version> - </dependency> - - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-c3p0</artifactId> - <version>5.0.0.CR1</version> - </dependency> - - <dependency> - <groupId>mysql</groupId> - <artifactId>mysql-connector-java</artifactId> - </dependency> - - <dependency> - <groupId>org.jdom</groupId> - <artifactId>jdom2</artifactId> - <version>${org.jdom.jdom2.version}</version> - </dependency> - - </dependencies> - + 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> + + <parent> + <groupId>de.hdm-stuttgart.mi</groupId> + <artifactId>lecturenotes-pom</artifactId> + <version>1.0</version> + <relativePath>../../../../pom.xml</relativePath> + </parent> + + <groupId>de.hdm-stuttgart.mi.sda1</groupId> + <artifactId>rdbms2catalog</artifactId> + <version>0.9</version> + <packaging>jar</packaging> + + <name>rdbms2catalogJpa</name> + <url>http://www.mi.hdm-stuttgart.de/freedocs</url> + + <dependencies> + + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-core</artifactId> + <version>5.2.5.Final</version> + </dependency> + + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.7</version> + </dependency> + + <!-- Required for executable jar generation to avoid ClassNotFoundException: + com.fasterxml.jackson.core.type.TypeReference and similar dependency problems. --> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.7.5</version> + </dependency> + + <dependency> + <groupId>org.jdom</groupId> + <artifactId>jdom2</artifactId> + <version>${org.jdom.jdom2.version}</version> + </dependency> + + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.6.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + <compilerArgument>-proc:none</compilerArgument> + </configuration> + </plugin> + + <plugin> + <groupId>org.bsc.maven</groupId> + <artifactId>maven-processor-plugin</artifactId> + <version>3.2.0</version> + + <executions> + <execution> + <id>process</id> + <goals> + <goal>process</goal> + </goals> + <phase>generate-sources</phase> + <configuration> + <outputDirectory>${project.build.directory}/metamodel</outputDirectory> + <processors> + <processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor> + </processors> + </configuration> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-jpamodelgen</artifactId> + <version>5.2.5.Final</version> + </dependency> + </dependencies> + </plugin> + + <!-- Build helper plugin to add generated sources to classpath --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.12</version> + <executions> + <execution> + <id>add-source</id> + <phase>generate-sources</phase> + <goals> + <goal>add-source</goal> + </goals> + <configuration> + <sources> + <source>${project.build.directory}/metamodel</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.4</version> + <configuration /> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>2.4.3</version> + <configuration> + <transformers> + <transformer + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> + <manifestEntries> + <Main-Class>jpaintro.university.CreateEntity</Main-Class> + </manifestEntries> + </transformer> + </transformers> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> </project> diff --git a/P/Sda1/Jpa/rdbms2catalog/solution/pom.xml b/P/Sda1/Jpa/rdbms2catalog/solution/pom.xml index 8a5aa69b2..ede66d9b8 100644 --- a/P/Sda1/Jpa/rdbms2catalog/solution/pom.xml +++ b/P/Sda1/Jpa/rdbms2catalog/solution/pom.xml @@ -18,12 +18,13 @@ <name>rdbms2catalogJpa</name> <url>http://www.mi.hdm-stuttgart.de/freedocs</url> + <dependencies> <dependency> <groupId>org.hibernate</groupId> - <artifactId>hibernate-entitymanager</artifactId> - <version>5.1.0.Final</version> + <artifactId>hibernate-core</artifactId> + <version>5.2.5.Final</version> </dependency> <dependency> @@ -41,7 +42,15 @@ <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.6</version> + <version>2.7</version> + </dependency> + + <!-- Required for executable jar generation to avoid ClassNotFoundException: + com.fasterxml.jackson.core.type.TypeReference and similar dependency problems. --> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.7.5</version> </dependency> <dependency> @@ -58,11 +67,93 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.5.1</version> + <version>3.6.0</version> <configuration> <source>1.8</source> <target>1.8</target> + <compilerArgument>-proc:none</compilerArgument> + </configuration> + </plugin> + + <plugin> + <groupId>org.bsc.maven</groupId> + <artifactId>maven-processor-plugin</artifactId> + <version>3.2.0</version> + + <executions> + <execution> + <id>process</id> + <goals> + <goal>process</goal> + </goals> + <phase>generate-sources</phase> + <configuration> + <outputDirectory>${project.build.directory}/metamodel</outputDirectory> + <processors> + <processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor> + </processors> + </configuration> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-jpamodelgen</artifactId> + <version>5.2.5.Final</version> + </dependency> + </dependencies> + </plugin> + + <!-- Build helper plugin to add generated sources to classpath --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.12</version> + <executions> + <execution> + <id>add-source</id> + <phase>generate-sources</phase> + <goals> + <goal>add-source</goal> + </goals> + <configuration> + <sources> + <source>${project.build.directory}/metamodel</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.4</version> + <configuration /> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>2.4.3</version> + <configuration> + <transformers> + <transformer + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> + <manifestEntries> + <Main-Class>jpaintro.university.CreateEntity</Main-Class> + </manifestEntries> + </transformer> + </transformers> </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> </plugin> </plugins> -- GitLab