-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathpom.xml
More file actions
173 lines (161 loc) · 7.41 KB
/
Copy pathpom.xml
File metadata and controls
173 lines (161 loc) · 7.41 KB
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>dev.openfeature.contrib</groupId>
<artifactId>parent</artifactId>
<version>[1.0,2.0)</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>dev.openfeature.contrib.tools</groupId>
<artifactId>flagd-api-testkit</artifactId>
<version>0.2.1</version> <!--x-release-please-version -->
<properties>
<module-name>${groupId}.flagdapitestkit</module-name>
<!-- Match any flagd-api version locally; CI sets exact version -->
<flagd-api.version>[0.0.1,)</flagd-api.version>
<jackson-databind.version>2.22.0</jackson-databind.version>
<assertj.version>3.27.7</assertj.version>
</properties>
<name>flagd-api-testkit</name>
<description>
Testkit for verifying implementations of the flagd-api Evaluator interface.
Bundles Cucumber step definitions, Gherkin feature files and flag configurations
as a release artifact — consumers need no git submodule of their own.
The feature files and flags are sourced from the open-feature/test-harness
repository (evaluator/ subdirectory) via git submodule and packaged into this JAR
at build time.
</description>
<url>https://openfeature.dev</url>
<developers>
<developer>
<id>aepfli</id>
<name>Simon Schrottner</name>
<organization>OpenFeature</organization>
<url>https://openfeature.dev/</url>
</developer>
</developers>
<dependencies>
<!-- API contract we are testing against — compile scope so consumers
transitively get the types needed to implement the init step -->
<dependency>
<groupId>dev.openfeature.contrib.tools</groupId>
<artifactId>flagd-api</artifactId>
<version>${flagd-api.version}</version>
</dependency>
<!-- Cucumber step definition annotations — compile scope so that
consumers can discover step classes from this JAR on the glue path -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<!-- version managed by cucumber-bom in parent -->
</dependency>
<!-- Assertions used inside step definitions -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
</dependency>
<!-- Jackson for Object-type flag value parsing -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
</dependency>
<!-- JUnit Platform Suite — compile scope so AbstractEvaluatorTest can carry
@Suite/@IncludeEngines/@SelectClasspathResource/@ConfigurationParameter -->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<scope>compile</scope>
</dependency>
<!-- Cucumber JUnit Platform Engine — compile scope for OBJECT_FACTORY_PROPERTY_NAME
and GLUE_PROPERTY_NAME constants used in AbstractEvaluatorTest -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit-platform-engine</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<!--
Phase 1 – initialise the test-harness git submodule.
Run: git submodule add https://github.com/open-feature/test-harness.git test-harness
from tools/flagd-api-testkit/ to register the submodule, then this plugin
keeps it up-to-date on every build.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.6.3</version>
<executions>
<execution>
<id>update-test-harness-submodule</id>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>git</executable>
<arguments>
<argument>submodule</argument>
<argument>update</argument>
<argument>--init</argument>
<argument>test-harness</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<!--
Phase 2 – copy gherkin features and flag configs from the submodule
into src/main/resources so they are packaged into the release JAR.
Consumers load them from the classpath — no submodule required on
the consumer side.
-->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>copy-evaluator-gherkin</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/src/main/resources/features/</outputDirectory>
<resources>
<resource>
<directory>${basedir}/test-harness/evaluator/gherkin/</directory>
<includes>
<include>**/*.feature</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-evaluator-flags</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/src/main/resources/flags/</outputDirectory>
<resources>
<resource>
<directory>${basedir}/test-harness/evaluator/flags/</directory>
<includes>
<include>**/*.json</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>