/
pom.xml
150 lines (136 loc) · 5.05 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<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>
<name>Zeebe Protocol AssertJ Assertions</name>
<artifactId>zeebe-protocol-asserts</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>io.zeebe</groupId>
<artifactId>zeebe-parent</artifactId>
<version>1.0.0-alpha5</version>
<relativePath>../parent</relativePath>
</parent>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
<dependencies>
<dependency>
<groupId>io.zeebe</groupId>
<artifactId>zeebe-protocol</artifactId>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.assertj</groupId>
<artifactId>assertj-assertions-generator-maven-plugin</artifactId>
<version>2.2.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate-assertions</goal>
</goals>
</execution>
</executions>
<configuration>
<packages>
<param>io.zeebe.protocol.record</param>
</packages>
<generatedSourcesScope>compile</generatedSourcesScope>
<targetDir>${project.build.directory}/generated-sources/assertj-assertions</targetDir>
<generateAssertions>true</generateAssertions>
<generateBddAssertions>false</generateBddAssertions>
<generateSoftAssertions>false</generateSoftAssertions>
<generateJUnitSoftAssertions>false</generateJUnitSoftAssertions>
</configuration>
</plugin>
<!-- FIXME: currently the AssertJ generator does not support generics https://github.com/joel-costigliola/assertj-assertions-generator/issues/92
Therefore the generate code for the hasValue assertion of the Record<T> is invalid. To fix this we just replace the unknown generic T with RecordValue. -->
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<file>
${project.build.directory}/generated-sources/assertj-assertions/io/zeebe/protocol/record/AbstractRecordAssert.java
</file>
<replacements>
<replacement>
<token>T value</token>
<value>RecordValue value</value>
</replacement>
<replacement>
<token>T actualValue</token>
<value>RecordValue actualValue</value>
</replacement>
</replacements>
</configuration>
</plugin>
<!-- this is only needed to make working in Eclipse more pleasant:
The assertj plugin already adds the generated files as a source directory, but eclipse
is not able to update the project based on that plugin, so we explicitly declare it a second time -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/assertj-assertions</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<failOnWarning>true</failOnWarning>
<ignoredDependencies>
<!-- Used by generated Assert code -->
<ignoredDependency>javax.annotation:javax.annotation-api</ignoredDependency>
</ignoredDependencies>
</configuration>
</plugin>
<!-- Javadoc generation fails under Java 11 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>empty-javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>javadoc</classifier>
<classesDirectory>${basedir}/javadoc</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>