|
48 | 48 | <project.build.source>1.8</project.build.source> |
49 | 49 | <project.build.target>1.8</project.build.target> |
50 | 50 |
|
51 | | - <exist.version>4.4.0</exist.version> |
52 | | - <!-- exist.version>5.0.0-SNAPSHOT</exist.version --> |
| 51 | + <!-- default supported exist-db version --> |
| 52 | + <exist.version>5.0.0</exist.version> |
| 53 | + |
| 54 | + <!-- used for integration-test --> |
| 55 | + <docker.test.image>repo.evolvedbinary.com:9543/evolvedbinary/fusiondb-server:nightly</docker.test.image> |
| 56 | + <docker.test.port>4059</docker.test.port> |
53 | 57 |
|
54 | 58 | <!-- used in the EXPath Package Descriptor --> |
55 | 59 | <package-name>https://fusiondb.com/studio/api</package-name> |
56 | 60 | </properties> |
57 | 61 |
|
58 | 62 | <dependencies> |
59 | 63 | <!-- test dependencies --> |
| 64 | + |
60 | 65 | <dependency> |
61 | | - <groupId>org.exist-db</groupId> |
62 | | - <artifactId>exist-testkit</artifactId> |
63 | | - <version>${exist.version}</version> |
| 66 | + <groupId>org.junit.jupiter</groupId> |
| 67 | + <artifactId>junit-jupiter</artifactId> |
| 68 | + <version>5.6.2</version> |
64 | 69 | <scope>test</scope> |
65 | 70 | </dependency> |
| 71 | + |
| 72 | + <dependency> |
| 73 | + <groupId>io.rest-assured</groupId> |
| 74 | + <artifactId>rest-assured</artifactId> |
| 75 | + <version>4.3.1</version> |
| 76 | + <scope>test</scope> |
| 77 | + </dependency> |
| 78 | + |
66 | 79 | </dependencies> |
67 | 80 |
|
68 | 81 | <build> |
|
77 | 90 | </resource> |
78 | 91 | </resources> |
79 | 92 |
|
| 93 | + <testResources> |
| 94 | + <testResource> |
| 95 | + <directory>src/test/resources-filtered</directory> |
| 96 | + <filtering>true</filtering> |
| 97 | + </testResource> |
| 98 | + </testResources> |
| 99 | + |
80 | 100 | <plugins> |
| 101 | + |
| 102 | + <!-- start up Server in Docker for integration-test --> |
| 103 | + <plugin> |
| 104 | + <groupId>io.fabric8</groupId> |
| 105 | + <artifactId>docker-maven-plugin</artifactId> |
| 106 | + <version>0.33.0</version> |
| 107 | + <configuration> |
| 108 | + <verbose>true</verbose> |
| 109 | + <images> |
| 110 | + <image> |
| 111 | + <alias>db-with-api</alias> |
| 112 | + <name>${docker.test.image}</name> |
| 113 | + <run> |
| 114 | + <ports>${docker.test.port}:${docker.test.port}</ports> |
| 115 | + <wait> |
| 116 | + <log>Server has started, listening on</log> |
| 117 | + <time>120000</time> |
| 118 | + </wait> |
| 119 | + </run> |
| 120 | + </image> |
| 121 | + </images> |
| 122 | + </configuration> |
| 123 | + <executions> |
| 124 | + <execution> |
| 125 | + <id>docker-it-start</id> |
| 126 | + <phase>pre-integration-test</phase> |
| 127 | + <goals> |
| 128 | + <goal>start</goal> |
| 129 | + </goals> |
| 130 | + </execution> |
| 131 | + <execution> |
| 132 | + <id>docker-it-stop</id> |
| 133 | + <phase>post-integration-test</phase> |
| 134 | + <goals> |
| 135 | + <goal>stop</goal> |
| 136 | + </goals> |
| 137 | + </execution> |
| 138 | + </executions> |
| 139 | + </plugin> |
| 140 | + |
| 141 | + <!-- Upload and deploy latest XAR build of API to Server (inside Docker) for integration-test --> |
| 142 | + <plugin> |
| 143 | + <groupId>org.codehaus.mojo</groupId> |
| 144 | + <artifactId>exec-maven-plugin</artifactId> |
| 145 | + <version>3.0.0</version> |
| 146 | + <executions> |
| 147 | + <execution> |
| 148 | + <id>upload-xar</id> |
| 149 | + <phase>pre-integration-test</phase> |
| 150 | + <goals> |
| 151 | + <goal>exec</goal> |
| 152 | + </goals> |
| 153 | + <configuration> |
| 154 | + <executable>curl</executable> |
| 155 | + <arguments> |
| 156 | + <argument>-v</argument> |
| 157 | + <argument>-X</argument> |
| 158 | + <argument>PUT</argument> |
| 159 | + <argument>--data-binary</argument> |
| 160 | + <argument>@${project.build.directory}/${package-final-name}.xar</argument> |
| 161 | + <argument>http://admin:@localhost:${docker.test.port}/exist/rest/db/${package-final-name}.xar</argument> |
| 162 | + </arguments> |
| 163 | + </configuration> |
| 164 | + </execution> |
| 165 | + <execution> |
| 166 | + <id>deploy-xar</id> |
| 167 | + <phase>pre-integration-test</phase> |
| 168 | + <goals> |
| 169 | + <goal>exec</goal> |
| 170 | + </goals> |
| 171 | + <configuration> |
| 172 | + <executable>curl</executable> |
| 173 | + <arguments> |
| 174 | + <argument>-v</argument> |
| 175 | + <argument>-X</argument> |
| 176 | + <argument>POST</argument> |
| 177 | + <argument>-H</argument> |
| 178 | + <argument>application/xml</argument> |
| 179 | + <argument>--data-binary</argument> |
| 180 | + <argument>@${project.build.testOutputDirectory}/deploy-xar.xq.xml</argument> |
| 181 | + <argument>http://admin:@localhost:${docker.test.port}/exist/rest/db/</argument> |
| 182 | + </arguments> |
| 183 | + </configuration> |
| 184 | + </execution> |
| 185 | + </executions> |
| 186 | + </plugin> |
| 187 | + |
| 188 | + <plugin> |
| 189 | + <groupId>org.apache.maven.plugins</groupId> |
| 190 | + <artifactId>maven-failsafe-plugin</artifactId> |
| 191 | + <version>3.0.0-M5</version> |
| 192 | + <executions> |
| 193 | + <execution> |
| 194 | + <goals> |
| 195 | + <goal>integration-test</goal> |
| 196 | + </goals> |
| 197 | + </execution> |
| 198 | + </executions> |
| 199 | + </plugin> |
| 200 | + |
81 | 201 | <plugin> |
82 | 202 | <groupId>org.apache.maven.plugins</groupId> |
83 | 203 | <artifactId>maven-jar-plugin</artifactId> |
|
101 | 221 | </archive> |
102 | 222 | </configuration> |
103 | 223 | </plugin> |
| 224 | + |
104 | 225 | <plugin> |
105 | 226 | <groupId>ro.kuberam.maven.plugins</groupId> |
106 | 227 | <artifactId>kuberam-expath-plugin</artifactId> |
|
118 | 239 | </execution> |
119 | 240 | </executions> |
120 | 241 | </plugin> |
| 242 | + |
121 | 243 | <plugin> |
122 | 244 | <groupId>org.apache.maven.plugins</groupId> |
123 | 245 | <artifactId>maven-gpg-plugin</artifactId> |
124 | 246 | <configuration> |
125 | 247 | <useAgent>true</useAgent> |
126 | 248 | </configuration> |
127 | 249 | </plugin> |
| 250 | + |
128 | 251 | <plugin> |
129 | 252 | <groupId>org.apache.maven.plugins</groupId> |
130 | 253 | <artifactId>maven-release-plugin</artifactId> |
|
0 commit comments