diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/common/GermanDateTimeFormatter.java b/alfa-service/src/main/java/de/ozgcloud/alfa/common/GermanDateTimeFormatter.java new file mode 100644 index 0000000000000000000000000000000000000000..97dc0511e8c1d58ffd0de06b34820df0dfe23f03 --- /dev/null +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/common/GermanDateTimeFormatter.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den + * Ministerpräsidenten des Landes Schleswig-Holstein + * Staatskanzlei + * Abteilung Digitalisierung und zentrales IT-Management der Landesregierung + * + * Lizenziert unter der EUPL, Version 1.2 oder - sobald + * diese von der Europäischen Kommission genehmigt wurden - + * Folgeversionen der EUPL ("Lizenz"); + * Sie dürfen dieses Werk ausschließlich gemäß + * dieser Lizenz nutzen. + * Eine Kopie der Lizenz finden Sie hier: + * + * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 + * + * Sofern nicht durch anwendbare Rechtsvorschriften + * gefordert oder in schriftlicher Form vereinbart, wird + * die unter der Lizenz verbreitete Software "so wie sie + * ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - + * ausdrücklich oder stillschweigend - verbreitet. + * Die sprachspezifischen Genehmigungen und Beschränkungen + * unter der Lizenz sind dem Lizenztext zu entnehmen. + */ +package de.ozgcloud.alfa.common; + +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Locale; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import lombok.NonNull; + +@Component +public class GermanDateTimeFormatter { + + private static final DateTimeFormatter DATE_TIME_ZONE = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm:ss z").withLocale(Locale.GERMANY); + + @Autowired + private SystemProperties systemProperties; + + public String formatZonedDateTime(@NonNull ZonedDateTime zonedDateTime) { + return DATE_TIME_ZONE.format(zonedDateTime.withZoneSameInstant(systemProperties.getTimeZone())); + } +} diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/common/SystemProperties.java b/alfa-service/src/main/java/de/ozgcloud/alfa/common/SystemProperties.java new file mode 100644 index 0000000000000000000000000000000000000000..d58bada4d2c41ca587bf689f646d4524134c8a86 --- /dev/null +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/common/SystemProperties.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den + * Ministerpräsidenten des Landes Schleswig-Holstein + * Staatskanzlei + * Abteilung Digitalisierung und zentrales IT-Management der Landesregierung + * + * Lizenziert unter der EUPL, Version 1.2 oder - sobald + * diese von der Europäischen Kommission genehmigt wurden - + * Folgeversionen der EUPL ("Lizenz"); + * Sie dürfen dieses Werk ausschließlich gemäß + * dieser Lizenz nutzen. + * Eine Kopie der Lizenz finden Sie hier: + * + * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 + * + * Sofern nicht durch anwendbare Rechtsvorschriften + * gefordert oder in schriftlicher Form vereinbart, wird + * die unter der Lizenz verbreitete Software "so wie sie + * ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - + * ausdrücklich oder stillschweigend - verbreitet. + * Die sprachspezifischen Genehmigungen und Beschränkungen + * unter der Lizenz sind dem Lizenztext zu entnehmen. + */ +package de.ozgcloud.alfa.common; + +import java.time.ZoneId; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +@Configuration +@ConfigurationProperties(prefix = SystemProperties.PREFIX) +public class SystemProperties { + + static final String PREFIX = "ozgcloud.system"; + + /** + * Timezone to be used in application. + */ + private ZoneId timeZone = ZoneId.of("Europe/Berlin"); +} diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfService.java b/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfService.java index 6a71d24ad93dd318d8064f7692b2e81f70a339f3..1ab1d3efdd79fd8b6e2790f6329efcda55278dff 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfService.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfService.java @@ -26,8 +26,6 @@ package de.ozgcloud.alfa.postfach; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.time.format.DateTimeFormatter; -import java.util.Locale; import java.util.Objects; import java.util.Optional; import java.util.stream.Stream; @@ -40,6 +38,7 @@ import org.springframework.stereotype.Service; import de.itvsh.kop.common.errorhandling.TechnicalException; import de.itvsh.kop.common.pdf.PdfService; +import de.ozgcloud.alfa.common.GermanDateTimeFormatter; import de.ozgcloud.alfa.common.user.UserManagerUrlProvider; import de.ozgcloud.alfa.common.user.UserProfile; import de.ozgcloud.alfa.postfach.PostfachMail.Direction; @@ -56,11 +55,12 @@ class PostfachNachrichtPdfService { static final String FALLBACK_ANTRAGSTELLER_NAME = "Antragsteller"; - private static final DateTimeFormatter CREATED_AT_FORMATTER = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm:ss O").withLocale(Locale.GERMANY); - @Autowired private PdfService pdfService; + @Autowired + private GermanDateTimeFormatter germanDateTimeFormatter; + private boolean isFirstNachricht; @Value(PostfachNachrichtPdfService.PDF_TEMPLATE_PATH) @@ -111,7 +111,7 @@ class PostfachNachrichtPdfService { .isFirst(isFirstNachricht()) .subject(postfachMail.getSubject()) .mailBody(postfachMail.getMailBody()) - .createdAt(CREATED_AT_FORMATTER.format(postfachMail.getCreatedAt())) + .createdAt(germanDateTimeFormatter.formatZonedDateTime(postfachMail.getCreatedAt())) .createdBy(buildAbsenderName(postfachMail, antragsteller)) .attachments(postfachMail.getAttachmentNames()) .build(); diff --git a/alfa-service/src/main/resources/fop/postfach-nachrichten.xsl b/alfa-service/src/main/resources/fop/postfach-nachrichten.xsl index b030aacd5e9d4f8127ce23fe7a65b7cf5402da04..7442f94c340789ee9a8929ce29d935df370fcac8 100644 --- a/alfa-service/src/main/resources/fop/postfach-nachrichten.xsl +++ b/alfa-service/src/main/resources/fop/postfach-nachrichten.xsl @@ -75,7 +75,7 @@ <xsl:template name="nachricht"> - <fo:block font-size="11pt" margin-bottom="2mm"> + <fo:block font-size="11pt" margin-bottom="2mm" linefeed-treatment="preserve"> <xsl:if test="isFirst='false'"> <fo:leader leader-pattern="rule" leader-length="175mm" rule-style="solid" rule-thickness="1pt"/> </xsl:if> diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/common/GermanDateTimeFormatterTest.java b/alfa-service/src/test/java/de/ozgcloud/alfa/common/GermanDateTimeFormatterTest.java new file mode 100644 index 0000000000000000000000000000000000000000..0c4b738d8cefe6f0d736c870827df8c44d7d6ded --- /dev/null +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/common/GermanDateTimeFormatterTest.java @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den + * Ministerpräsidenten des Landes Schleswig-Holstein + * Staatskanzlei + * Abteilung Digitalisierung und zentrales IT-Management der Landesregierung + * + * Lizenziert unter der EUPL, Version 1.2 oder - sobald + * diese von der Europäischen Kommission genehmigt wurden - + * Folgeversionen der EUPL ("Lizenz"); + * Sie dürfen dieses Werk ausschließlich gemäß + * dieser Lizenz nutzen. + * Eine Kopie der Lizenz finden Sie hier: + * + * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 + * + * Sofern nicht durch anwendbare Rechtsvorschriften + * gefordert oder in schriftlicher Form vereinbart, wird + * die unter der Lizenz verbreitete Software "so wie sie + * ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - + * ausdrücklich oder stillschweigend - verbreitet. + * Die sprachspezifischen Genehmigungen und Beschränkungen + * unter der Lizenz sind dem Lizenztext zu entnehmen. + */ +package de.ozgcloud.alfa.common; + +import static org.assertj.core.api.Assertions.*; +import static org.mockito.Mockito.*; + +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.stream.Stream; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.InjectMocks; +import org.mockito.Mock; + +class GermanDateTimeFormatterTest { + + @Mock + private SystemProperties properties; + + @InjectMocks + private GermanDateTimeFormatter germanDateTimeFormatter; + + @ParameterizedTest + @MethodSource("provideDataForFormatZonedDateTime") + void shouldFormatZonedDateTime(ZonedDateTime date, String zoneId, String expected) { + when(properties.getTimeZone()).thenReturn(ZoneId.of(zoneId)); + + assertThat(germanDateTimeFormatter.formatZonedDateTime(date)).isEqualTo(expected); + } + + private static Stream<Arguments> provideDataForFormatZonedDateTime() { + return Stream.of( + Arguments.of(zonedDateTime(2023, 9, 25, 10, "UTC"), "Europe/Berlin", "25.09.2023 12:00:00 MESZ"), + Arguments.of(zonedDateTime(2023, 9, 25, 23, "UTC"), "Europe/Berlin", "26.09.2023 01:00:00 MESZ"), + Arguments.of(zonedDateTime(2023, 12, 1, 10, "UTC"), "Europe/Berlin", "01.12.2023 11:00:00 MEZ"), + Arguments.of(zonedDateTime(2023, 9, 25, 10, "UTC"), "America/Los_Angeles", "25.09.2023 03:00:00 PDT"), + Arguments.of(zonedDateTime(2023, 9, 25, 4, "UTC"), "America/Los_Angeles", "24.09.2023 21:00:00 PDT"), + Arguments.of(zonedDateTime(2023, 12, 1, 10, "UTC"), "America/Los_Angeles", "01.12.2023 02:00:00 PST"), + Arguments.of(zonedDateTime(2023, 12, 1, 10, "America/Los_Angeles"), "Europe/Berlin", "01.12.2023 19:00:00 MEZ") + ); + } + + private static ZonedDateTime zonedDateTime(int year, int month, int dayOfMonth, int hour, String zoneID) { + return ZonedDateTime.of(year, month, dayOfMonth, hour, 0, 0, 0, ZoneId.of(zoneID)); + } +} diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfServiceITCase.java b/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfServiceITCase.java index 6788d51ca049d5cbf99a15cfcc6c3670f0857ce1..74d9ef6eda8bc319a8fd7dabdfad2065bbb0d109 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfServiceITCase.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfServiceITCase.java @@ -30,6 +30,8 @@ import static org.mockito.Mockito.*; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStream; +import java.time.ZoneId; +import java.time.ZonedDateTime; import java.util.Collections; import java.util.List; import java.util.stream.Stream; @@ -45,6 +47,7 @@ import org.springframework.boot.test.mock.mockito.MockBean; import de.ozgcloud.alfa.common.user.UserId; import de.ozgcloud.alfa.common.user.UserProfileTestFactory; import de.ozgcloud.alfa.common.user.UserService; +import de.ozgcloud.alfa.vorgang.AntragstellerTestFactory; import de.ozgcloud.alfa.vorgang.EingangTestFactory; import de.ozgcloud.alfa.vorgang.VorgangWithEingang; import de.ozgcloud.alfa.vorgang.VorgangWithEingangTestFactory; @@ -118,6 +121,21 @@ class PostfachNachrichtPdfServiceITCase { } } + @DisplayName("Map Postfach-Nachricht") + @Nested + class TestMapPostfachNachricht { + + private final ZonedDateTime createdAt = ZonedDateTime.of(2023, 9, 25, 10, 0, 0, 0, ZoneId.of("UTC")); + private final PostfachNachrichtPdfData pdfData = PostfachNachrichtPdfDataTestFactory.createBuilder().createdAt(createdAt).build(); + + @Test + void shouldMapCreatedAtWithCorrectTimezoneAndFormatting() { + var nachricht = service.mapPostfachNachricht(pdfData, AntragstellerTestFactory.create()); + + assertThat(nachricht.getCreatedAt()).isEqualTo("25.09.2023 12:00:00 MESZ"); + } + } + private VorgangWithEingang buildVorgangAntragstellerNotSet() { return VorgangWithEingangTestFactory.createBuilder().eingang(EingangTestFactory.createBuilder().antragsteller(null).build()).build(); } diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfServiceTest.java b/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfServiceTest.java index 454c45619a589c2481f4ea86688ef005cbd3d83a..e470d8adc1fdde352d4baaf6e11e2a7bec5ed3b5 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfServiceTest.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachNachrichtPdfServiceTest.java @@ -30,7 +30,6 @@ import static org.mockito.Mockito.*; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.time.ZonedDateTime; import java.util.stream.Stream; import org.apache.commons.lang3.StringUtils; @@ -46,6 +45,7 @@ import org.springframework.test.util.ReflectionTestUtils; import de.itvsh.kop.common.errorhandling.TechnicalException; import de.itvsh.kop.common.pdf.PdfService; +import de.ozgcloud.alfa.common.GermanDateTimeFormatter; import de.ozgcloud.alfa.common.binaryfile.BinaryFileTestFactory; import de.ozgcloud.alfa.common.user.UserProfileTestFactory; import de.ozgcloud.alfa.postfach.PostfachMail.Direction; @@ -62,6 +62,8 @@ class PostfachNachrichtPdfServiceTest { private PostfachNachrichtPdfService service; @Mock private PdfService pdfService; + @Mock + private GermanDateTimeFormatter germanDateTimeFormatter; @DisplayName("Get all as pdf") @Nested @@ -239,17 +241,19 @@ class PostfachNachrichtPdfServiceTest { @Test void shouldMapNachrichtCreatedAt() { + var expected = "formatted date"; + when(germanDateTimeFormatter.formatZonedDateTime(PostfachMailTestFactory.CREATED_AT)).thenReturn(expected); + var nachricht = mapNachricht(); - assertThat(nachricht.getCreatedAt()).isEqualTo("01.01.2000 01:00:00 GMT"); + assertThat(nachricht.getCreatedAt()).isEqualTo(expected); } @Test - void shouldFormatTimeIn24hFormat() { - var pdfNachricht = mapNachricht( - PostfachNachrichtPdfDataTestFactory.createBuilder().createdAt(ZonedDateTime.parse("2019-12-31T13:00:00Z")).build()); + void shouldCallDateFormatter() { + mapNachricht(); - assertThat(pdfNachricht.getCreatedAt()).isEqualTo("31.12.2019 13:00:00 GMT"); + verify(germanDateTimeFormatter).formatZonedDateTime(PostfachMailTestFactory.CREATED_AT); } @Test diff --git a/goofy-client/pom.xml b/goofy-client/pom.xml index c63f82a7100f54732ee94056879929c70111f87d..0cda8691e2dce048d1d62f5c774a959e535f3019 100644 --- a/goofy-client/pom.xml +++ b/goofy-client/pom.xml @@ -25,7 +25,7 @@ --> <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"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>de.itvsh.ozg</groupId> @@ -33,26 +33,26 @@ <version>1.16.0-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>goofy-client</artifactId> - <packaging>pom</packaging> + <modelVersion>4.0.0</modelVersion> + <artifactId>goofy-client</artifactId> + <packaging>pom</packaging> - <build> - <plugins> - <plugin> - <artifactId>maven-clean-plugin</artifactId> - <configuration> - <filesets> - <fileset> - <directory>dist</directory> - <includes> - <include>*</include> - <include>**/*</include> - </includes> - </fileset> - </filesets> - </configuration> - </plugin> + <build> + <plugins> + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <configuration> + <filesets> + <fileset> + <directory>dist</directory> + <includes> + <include>*</include> + <include>**/*</include> + </includes> + </fileset> + </filesets> + </configuration> + </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> diff --git a/goofy-server/pom.xml b/goofy-server/pom.xml index bba83ef836e98d3abe1330ec00c9ea5a5e45b859..c6daa3897681d1e35cbbc4bac645e694162675f8 100644 --- a/goofy-server/pom.xml +++ b/goofy-server/pom.xml @@ -1,19 +1,19 @@ <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> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>de.itvsh.ozg</groupId> - <artifactId>goofy</artifactId> - <version>1.16.0-SNAPSHOT</version> - </parent> + <parent> + <groupId>de.itvsh.ozg</groupId> + <artifactId>goofy</artifactId> + <version>1.16.0-SNAPSHOT</version> + </parent> - <artifactId>goofy-server</artifactId> - <name>Goofy Server</name> - <groupId>de.itvsh.ozg</groupId> + <artifactId>goofy-server</artifactId> + <name>Goofy Server</name> + <groupId>de.itvsh.ozg</groupId> - <properties> - <maven.compiler.source>${java.version}</maven.compiler.source> - <maven.compiler.target>${java.version}</maven.compiler.target> + <properties> + <maven.compiler.source>${java.version}</maven.compiler.source> + <maven.compiler.target>${java.version}</maven.compiler.target> <spring-boot.build-image.imageName>docker.ozg-sh.de/goofy:build-latest</spring-boot.build-image.imageName> <spring-security.version>5.8.7</spring-security.version> @@ -151,84 +151,82 @@ </dependency> </dependencies> - <build> - <finalName>${project.artifactId}</finalName> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <configuration> - <docker> - <publishRegistry> - <username>${docker-username}</username> - <password>${docker-password}</password> - <url>${docker-url}</url> - </publishRegistry> - </docker> - </configuration> - </plugin> + <build> + <finalName>${project.artifactId}</finalName> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <configuration> + <docker> + <publishRegistry> + <username>${docker-username}</username> + <password>${docker-password}</password> + <url>${docker-url}</url> + </publishRegistry> + </docker> + </configuration> + </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.jacoco</groupId> - <artifactId>jacoco-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>pl.project13.maven</groupId> - <artifactId>git-commit-id-plugin</artifactId> - </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>pl.project13.maven</groupId> + <artifactId>git-commit-id-plugin</artifactId> + </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <executions> - <execution> - <id>copy-client</id> - <phase>compile</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory> - ${project.build.directory}/classes/META-INF/resources - </outputDirectory> - <resources> - <resource> - <directory> - ../${project.parent.artifactId}-client/dist/apps/goofy/ - </directory> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>3.3.0</version> - <executions> - <execution> - <id>Jar Tests Package</id> - <phase>package</phase> - <goals> - <goal>test-jar</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>copy-client</id> + <phase>compile</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory> + ${project.build.directory}/classes/META-INF/resources</outputDirectory> + <resources> + <resource> + <directory> + ../${project.parent.artifactId}-client/dist/apps/goofy/</directory> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>3.3.0</version> + <executions> + <execution> + <id>Jar Tests Package</id> + <phase>package</phase> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> </project>