TSK-925: refactored taskana-simplehistory-spring-test

This commit is contained in:
Mustapha Zorgati 2019-10-21 07:55:17 +02:00
parent ebb0884c6b
commit 1518cfc298
7 changed files with 173 additions and 168 deletions

View File

@ -12,6 +12,7 @@
<groupId>pro.taskana.simplehistory</groupId> <groupId>pro.taskana.simplehistory</groupId>
<artifactId>taskana-simplehistory-parent</artifactId> <artifactId>taskana-simplehistory-parent</artifactId>
<version>1.1.5-SNAPSHOT</version> <version>1.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -12,6 +12,7 @@
<groupId>pro.taskana.simplehistory</groupId> <groupId>pro.taskana.simplehistory</groupId>
<artifactId>taskana-simplehistory-parent</artifactId> <artifactId>taskana-simplehistory-parent</artifactId>
<version>1.1.5-SNAPSHOT</version> <version>1.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<dependencyManagement> <dependencyManagement>

View File

@ -12,6 +12,7 @@
<groupId>pro.taskana.simplehistory</groupId> <groupId>pro.taskana.simplehistory</groupId>
<artifactId>taskana-simplehistory-parent</artifactId> <artifactId>taskana-simplehistory-parent</artifactId>
<version>1.1.5-SNAPSHOT</version> <version>1.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -1,172 +1,173 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 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> <modelVersion>4.0.0</modelVersion>
<artifactId>taskana-simplehistory-spring-test</artifactId> <artifactId>taskana-simplehistory-spring-test</artifactId>
<version>1.1.5-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.0.2.RELEASE</version>
<relativePath></relativePath>
</parent>
<licenses> <name>${project.groupId}:${project.artifactId}</name>
<license> <description>Exclusive test module. Contains integration tests and build rest-doc.</description>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<properties> <parent>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <groupId>pro.taskana.simplehistory</groupId>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <artifactId>taskana-simplehistory-parent</artifactId>
<java.version>1.8</java.version> <version>1.1.5-SNAPSHOT</version>
</properties> <relativePath>../pom.xml</relativePath>
<dependencies> </parent>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>pro.taskana.simplehistory</groupId>
<artifactId>taskana-simplehistory-rest-spring</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-core</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.0.6.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-mockmvc</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build> <dependencyManagement>
<plugins> <dependencies>
<plugin> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-dependencies</artifactId>
</plugin> <version>${version.spring.boot}</version>
<!-- Required for generation of REST documentation --> <type>pom</type>
<plugin> <scope>import</scope>
<groupId>org.apache.maven.plugins</groupId> </dependency>
<artifactId>maven-surefire-plugin</artifactId> </dependencies>
<configuration> </dependencyManagement>
<!-- Required for skip plugin tests by default -->
<excludes> <dependencies>
<exclude>**/*Plugin*Test.java</exclude> <dependency>
</excludes> <groupId>pro.taskana.simplehistory</groupId>
<includes> <artifactId>taskana-simplehistory-rest-spring</artifactId>
<include>**/*Test.java</include> <version>${project.version}</version>
<include>**/*Documentation.java</include> </dependency>
</includes> <dependency>
<!-- Travis build workaround to prevent error that VM is closed due to an error. --> <groupId>org.springframework.boot</groupId>
<argLine>-Xms1024m -Xmx2048m</argLine> <artifactId>spring-boot-starter-web</artifactId>
</configuration> </dependency>
</plugin> <dependency>
<plugin> <groupId>org.springframework.boot</groupId>
<groupId>org.asciidoctor</groupId> <artifactId>spring-boot-starter-jdbc</artifactId>
<artifactId>asciidoctor-maven-plugin</artifactId> </dependency>
<version>1.5.3</version> <dependency>
<executions> <groupId>com.h2database</groupId>
<execution> <artifactId>h2</artifactId>
<id>generate-docs</id> <version>${version.h2}</version>
<phase>prepare-package</phase> </dependency>
<goals> <dependency>
<goal>process-asciidoc</goal> <groupId>org.springframework.plugin</groupId>
</goals> <artifactId>spring-plugin-core</artifactId>
<configuration> </dependency>
<backend>html</backend> <dependency>
<doctype>book</doctype> <groupId>junit</groupId>
<attributes> <artifactId>junit</artifactId>
<snippets>target/generated-snippets</snippets> <version>${version.junit}</version>
<docinfo>shared</docinfo> <scope>test</scope>
</attributes> </dependency>
</configuration> <dependency>
</execution> <groupId>org.springframework</groupId>
</executions> <artifactId>spring-test</artifactId>
</plugin> <scope>test</scope>
<plugin> </dependency>
<artifactId>maven-resources-plugin</artifactId> <dependency>
<executions> <groupId>org.springframework.boot</groupId>
<execution> <artifactId>spring-boot-test</artifactId>
<id>copy-rest-docs</id> <scope>test</scope>
<phase>prepare-package</phase> </dependency>
<goals> <dependency>
<goal>copy-resources</goal> <groupId>org.springframework.restdocs</groupId>
</goals> <artifactId>spring-restdocs-core</artifactId>
<configuration> <scope>test</scope>
<outputDirectory> </dependency>
${project.build.outputDirectory}/static/docs/rest <dependency>
</outputDirectory> <groupId>org.springframework.restdocs</groupId>
<resources> <artifactId>spring-restdocs-mockmvc</artifactId>
<resource> <scope>test</scope>
<directory> </dependency>
${project.build.directory}/generated-docs </dependencies>
</directory>
</resource> <build>
<resource> <plugins>
<directory>${project.basedir}/src/js</directory> <!-- Required for generation of REST documentation -->
</resource> <plugin>
</resources> <groupId>org.apache.maven.plugins</groupId>
</configuration> <artifactId>maven-surefire-plugin</artifactId>
</execution> <version>${version.maven.surefire}</version>
<execution> <configuration>
<id>copy-documentation-to-taskana-simplehistory-rest-spring-example</id> <!-- Required for skip plugin tests by default -->
<phase>prepare-package</phase> <excludes>
<goals> <exclude>**/*Plugin*Test.java</exclude>
<goal>copy-resources</goal> </excludes>
</goals> <includes>
<configuration> <include>**/*Test.java</include>
<outputDirectory> <include>**/*Documentation.java</include>
../taskana-simplehistory-rest-spring-example/target/generated-docs </includes>
</outputDirectory> <!-- Travis build workaround to prevent error that VM is closed due to an error. -->
<resources> <argLine>-Xms1024m -Xmx2048m</argLine>
<resource> </configuration>
<directory> </plugin>
${project.build.outputDirectory}/static/docs/rest <plugin>
</directory> <groupId>org.asciidoctor</groupId>
</resource> <artifactId>asciidoctor-maven-plugin</artifactId>
</resources> <version>${version.maven.asciidoctor}</version>
</configuration> <executions>
</execution> <execution>
</executions> <id>generate-docs</id>
</plugin> <phase>prepare-package</phase>
</plugins> <goals>
</build> <goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>html</backend>
<doctype>book</doctype>
<attributes>
<snippets>target/generated-snippets</snippets>
<docinfo>shared</docinfo>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${version.maven.resources}</version>
<executions>
<execution>
<id>copy-rest-docs</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}/static/docs/rest
</outputDirectory>
<resources>
<resource>
<directory>
${project.build.directory}/generated-docs
</directory>
</resource>
<resource>
<directory>${project.basedir}/src/js</directory>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-documentation-to-taskana-simplehistory-rest-spring-example</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
../taskana-simplehistory-rest-spring-example/target/generated-docs
</outputDirectory>
<resources>
<resource>
<directory>
${project.build.outputDirectory}/static/docs/rest
</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -26,7 +26,7 @@ import pro.taskana.rest.simplehistory.sampledata.SampleDataGenerator;
*/ */
@SpringBootApplication @SpringBootApplication
@ComponentScan(basePackages = "pro.taskana.rest.simplehistory") @ComponentScan(basePackages = "pro.taskana.rest.simplehistory")
@Import( {TaskHistoryRestConfiguration.class}) @Import({TaskHistoryRestConfiguration.class})
public class ExampleDocumentationApplication { public class ExampleDocumentationApplication {
@Value("${taskana.schemaName:TASKANA}") @Value("${taskana.schemaName:TASKANA}")

View File

@ -14,6 +14,7 @@
<version>1.1.5-SNAPSHOT</version> <version>1.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -10,7 +10,7 @@
<groupId>pro.taskana</groupId> <groupId>pro.taskana</groupId>
<artifactId>taskana-rest-parent</artifactId> <artifactId>taskana-rest-parent</artifactId>
<version>1.1.5-SNAPSHOT</version> <version>1.1.5-SNAPSHOT</version>
<relativePath>../rest</relativePath> <relativePath>../rest/pom.xml</relativePath>
</parent> </parent>
<build> <build>