Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 1 | <!-- |
| 2 | ! Licensed to the Apache Software Foundation (ASF) under one |
| 3 | ! or more contributor license agreements. See the NOTICE file |
| 4 | ! distributed with this work for additional information |
| 5 | ! regarding copyright ownership. The ASF licenses this file |
| 6 | ! to you under the Apache License, Version 2.0 (the |
| 7 | ! "License"); you may not use this file except in compliance |
| 8 | ! with the License. You may obtain a copy of the License at |
| 9 | ! |
| 10 | ! http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | ! |
| 12 | ! Unless required by applicable law or agreed to in writing, |
| 13 | ! software distributed under the License is distributed on an |
| 14 | ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | ! KIND, either express or implied. See the License for the |
| 16 | ! specific language governing permissions and limitations |
| 17 | ! under the License. |
| 18 | !--> |
| 19 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 20 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 21 | <modelVersion>4.0.0</modelVersion> |
| 22 | |
| 23 | <parent> |
| 24 | <artifactId>apache-asterixdb-jdbc</artifactId> |
| 25 | <groupId>org.apache.asterix</groupId> |
| 26 | <version>0.9.7-SNAPSHOT</version> |
| 27 | </parent> |
| 28 | <artifactId>asterix-jdbc-taco</artifactId> |
| 29 | <packaging>jar</packaging> |
| 30 | |
| 31 | <licenses> |
| 32 | <license> |
| 33 | <name>Apache License, Version 2.0</name> |
| 34 | <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> |
| 35 | <distribution>repo</distribution> |
| 36 | <comments>A business-friendly OSS license</comments> |
| 37 | </license> |
| 38 | </licenses> |
| 39 | |
| 40 | <properties> |
| 41 | <root.dir>${basedir}/..</root.dir> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 42 | |
| 43 | <taco.plugin.class>asterixdb_jdbc</taco.plugin.class> |
| 44 | <taco.plugin.name>AsterixDB</taco.plugin.name> |
| 45 | <!--suppress UnresolvedMavenProperty --> |
| 46 | <taco.plugin.version>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</taco.plugin.version> |
| 47 | <taco.plugin.vendor>Apache</taco.plugin.vendor> |
| 48 | <taco.plugin.site>https://asterixdb.apache.org</taco.plugin.site> |
| 49 | <taco.plugin.dialect>AsterixDB</taco.plugin.dialect> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 50 | <taco.plugin.database.label>Dataverse</taco.plugin.database.label> |
| 51 | <taco.plugin.database.default>Default</taco.plugin.database.default> |
| 52 | <taco.plugin.table.label>Dataset</taco.plugin.table.label> |
| 53 | <taco.plugin.jdbc.scheme>jdbc:asterixdb://</taco.plugin.jdbc.scheme> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 54 | <taco.plugin.auth.none><![CDATA[<option value="auth-none" label="No Authentication"/>]]></taco.plugin.auth.none> |
Dmitry Lychagin | 151662e | 2021-10-15 18:36:58 -0700 | [diff] [blame] | 55 | <taco.plugin.fields.custom/> |
| 56 | <taco.plugin.norm.attributes.custom/> |
| 57 | <taco.plugin.jdbc.properties.custom/> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 58 | |
| 59 | <taco.sourceDirectory>${project.basedir}/src/main/taco</taco.sourceDirectory> |
| 60 | |
Dmitry Lychagin | d355ca3 | 2021-10-25 16:03:41 -0700 | [diff] [blame] | 61 | <build.taco.copy.sdk.stage>none</build.taco.copy.sdk.stage> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 62 | <build.taco.init.sdk.stage>none</build.taco.init.sdk.stage> |
| 63 | <build.taco.package.sdk.stage>none</build.taco.package.sdk.stage> |
| 64 | <build.taco.package.nosdk.stage>none</build.taco.package.nosdk.stage> |
| 65 | <build.taco.directory>${project.build.directory}/taco</build.taco.directory> |
| 66 | <build.taco.gensrc.directory>${build.taco.directory}/generated-sources</build.taco.gensrc.directory> |
| 67 | <build.taco.gensrc.plugin.class.directory>${build.taco.gensrc.directory}/plugins/${taco.plugin.class}</build.taco.gensrc.plugin.class.directory> |
Dmitry Lychagin | d355ca3 | 2021-10-25 16:03:41 -0700 | [diff] [blame] | 68 | <build.taco.sdk.directory>${build.taco.directory}/connector-plugin-sdk</build.taco.sdk.directory> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 69 | <build.taco.log.directory>${build.taco.directory}</build.taco.log.directory> |
| 70 | <build.taco.package.file>${project.build.directory}/${taco.plugin.class}.taco</build.taco.package.file> |
| 71 | <build.venv.directory>${project.build.directory}/venv</build.venv.directory> |
| 72 | <build.venv.python.path>${build.venv.directory}/bin/python</build.venv.python.path> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 73 | </properties> |
| 74 | |
| 75 | <build> |
| 76 | <resources> |
| 77 | <resource> |
| 78 | <directory>${taco.sourceDirectory}</directory> |
| 79 | </resource> |
| 80 | </resources> |
| 81 | <plugins> |
| 82 | <plugin> |
| 83 | <groupId>org.codehaus.mojo</groupId> |
| 84 | <artifactId>build-helper-maven-plugin</artifactId> |
| 85 | <executions> |
| 86 | <execution> |
| 87 | <id>parse-version</id> |
| 88 | <goals> |
| 89 | <goal>parse-version</goal> |
| 90 | </goals> |
| 91 | </execution> |
| 92 | </executions> |
| 93 | </plugin> |
| 94 | <plugin> |
| 95 | <artifactId>maven-resources-plugin</artifactId> |
| 96 | <executions> |
| 97 | <execution> |
| 98 | <id>taco-generate-sources</id> |
| 99 | <phase>generate-sources</phase> |
| 100 | <goals> |
| 101 | <goal>copy-resources</goal> |
| 102 | </goals> |
| 103 | <configuration> |
| 104 | <outputDirectory>${build.taco.gensrc.directory}</outputDirectory> |
| 105 | <resources> |
| 106 | <resource> |
| 107 | <directory>${taco.sourceDirectory}</directory> |
| 108 | <filtering>true</filtering> |
| 109 | </resource> |
| 110 | </resources> |
| 111 | </configuration> |
| 112 | </execution> |
Dmitry Lychagin | d355ca3 | 2021-10-25 16:03:41 -0700 | [diff] [blame] | 113 | <execution> |
| 114 | <id>taco-copy-sdk</id> |
| 115 | <phase>${build.taco.copy.sdk.stage}</phase> |
| 116 | <goals> |
| 117 | <goal>copy-resources</goal> |
| 118 | </goals> |
| 119 | <configuration> |
| 120 | <outputDirectory>${build.taco.sdk.directory}</outputDirectory> |
| 121 | <resources> |
| 122 | <resource> |
| 123 | <!--suppress UnresolvedMavenProperty --> |
| 124 | <directory>${taco.sdk.path}</directory> |
| 125 | <filtering>false</filtering> |
| 126 | </resource> |
| 127 | </resources> |
| 128 | </configuration> |
| 129 | </execution> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 130 | </executions> |
| 131 | </plugin> |
| 132 | <plugin> |
| 133 | <groupId>org.apache.maven.plugins</groupId> |
| 134 | <artifactId>maven-jar-plugin</artifactId> |
| 135 | <configuration> |
| 136 | <classesDirectory>${build.taco.gensrc.directory}/plugins/${taco.plugin.class}</classesDirectory> |
| 137 | </configuration> |
| 138 | </plugin> |
| 139 | <plugin> |
| 140 | <groupId>org.apache.maven.plugins</groupId> |
| 141 | <artifactId>maven-source-plugin</artifactId> |
| 142 | <executions> |
| 143 | <execution> |
| 144 | <id>attach-sources</id> |
| 145 | <goals> |
| 146 | <goal>jar</goal> |
| 147 | </goals> |
| 148 | </execution> |
| 149 | </executions> |
| 150 | </plugin> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 151 | <plugin> |
| 152 | <groupId>org.codehaus.mojo</groupId> |
| 153 | <artifactId>exec-maven-plugin</artifactId> |
| 154 | <executions> |
| 155 | <execution> |
| 156 | <id>venv-install</id> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 157 | <phase>${build.taco.init.sdk.stage}</phase> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 158 | <goals> |
| 159 | <goal>exec</goal> |
| 160 | </goals> |
| 161 | <configuration> |
| 162 | <!--suppress UnresolvedMavenProperty --> |
| 163 | <executable>${python.path}</executable> |
| 164 | <workingDirectory>${project.build.directory}</workingDirectory> |
| 165 | <arguments> |
| 166 | <argument>-m</argument> |
| 167 | <argument>venv</argument> |
| 168 | <argument>${build.venv.directory}</argument> |
| 169 | </arguments> |
| 170 | </configuration> |
| 171 | </execution> |
| 172 | <execution> |
| 173 | <id>taco-packager-install</id> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 174 | <phase>${build.taco.init.sdk.stage}</phase> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 175 | <goals> |
| 176 | <goal>exec</goal> |
| 177 | </goals> |
| 178 | <configuration> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 179 | <executable>${build.venv.python.path}</executable> |
Dmitry Lychagin | d355ca3 | 2021-10-25 16:03:41 -0700 | [diff] [blame] | 180 | <workingDirectory>${build.taco.sdk.directory}/connector-packager</workingDirectory> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 181 | <arguments> |
| 182 | <argument>setup.py</argument> |
| 183 | <argument>install</argument> |
| 184 | </arguments> |
| 185 | <environmentVariables> |
| 186 | <VIRTUALENV>${build.venv.directory}</VIRTUALENV> |
| 187 | <PATH>${build.venv.directory}${file.separator}bin:${path.separator}${env.PATH}</PATH> |
| 188 | </environmentVariables> |
| 189 | </configuration> |
| 190 | </execution> |
| 191 | <execution> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 192 | <!-- create .taco file using Taco SDK --> |
| 193 | <id>taco-package-sdk</id> |
| 194 | <phase>${build.taco.package.sdk.stage}</phase> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 195 | <goals> |
| 196 | <goal>exec</goal> |
| 197 | </goals> |
| 198 | <configuration> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 199 | <executable>${build.venv.python.path}</executable> |
Dmitry Lychagin | d355ca3 | 2021-10-25 16:03:41 -0700 | [diff] [blame] | 200 | <workingDirectory>${build.taco.sdk.directory}/connector-packager</workingDirectory> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 201 | <arguments> |
| 202 | <argument>-m</argument> |
| 203 | <argument>connector_packager.package</argument> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 204 | <argument>${build.taco.gensrc.plugin.class.directory}</argument> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 205 | <argument>--log</argument> |
| 206 | <argument>${build.taco.log.directory}</argument> |
| 207 | <argument>--dest</argument> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 208 | <argument>${project.build.directory}</argument> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 209 | </arguments> |
| 210 | <environmentVariables> |
| 211 | <VIRTUALENV>${build.venv.directory}</VIRTUALENV> |
| 212 | <PATH>${build.venv.directory}${file.separator}bin:${path.separator}${env.PATH}</PATH> |
| 213 | </environmentVariables> |
| 214 | </configuration> |
| 215 | </execution> |
| 216 | </executions> |
| 217 | </plugin> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 218 | <plugin> |
| 219 | <groupId>org.apache.maven.plugins</groupId> |
| 220 | <artifactId>maven-shade-plugin</artifactId> |
| 221 | <executions> |
| 222 | <execution> |
| 223 | <!-- create .taco file if Taco SDK is not available --> |
| 224 | <id>taco-package-nosdk</id> |
| 225 | <phase>${build.taco.package.nosdk.stage}</phase> |
| 226 | <goals> |
| 227 | <goal>shade</goal> |
| 228 | </goals> |
| 229 | <configuration> |
| 230 | <outputFile>${build.taco.package.file}</outputFile> |
| 231 | <artifactSet> |
| 232 | <includes> |
| 233 | <include>org.apache.asterix:asterix-jdbc-taco</include> |
| 234 | </includes> |
| 235 | </artifactSet> |
| 236 | </configuration> |
| 237 | </execution> |
| 238 | </executions> |
| 239 | </plugin> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 240 | </plugins> |
| 241 | </build> |
| 242 | |
| 243 | <profiles> |
| 244 | <profile> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 245 | <id>taco-sdk-exists</id> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 246 | <activation> |
| 247 | <property> |
| 248 | <name>taco.sdk.path</name> |
| 249 | </property> |
| 250 | </activation> |
| 251 | <properties> |
Dmitry Lychagin | d355ca3 | 2021-10-25 16:03:41 -0700 | [diff] [blame] | 252 | <build.taco.copy.sdk.stage>generate-resources</build.taco.copy.sdk.stage> |
| 253 | <build.taco.init.sdk.stage>process-resources</build.taco.init.sdk.stage> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 254 | <build.taco.package.sdk.stage>package</build.taco.package.sdk.stage> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 255 | </properties> |
| 256 | <build> |
| 257 | <plugins> |
| 258 | <plugin> |
| 259 | <groupId>org.apache.maven.plugins</groupId> |
| 260 | <artifactId>maven-enforcer-plugin</artifactId> |
| 261 | <executions> |
| 262 | <execution> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 263 | <id>enforce-taco-sdk-packager-exists</id> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 264 | <goals> |
| 265 | <goal>enforce</goal> |
| 266 | </goals> |
| 267 | <configuration> |
| 268 | <rules> |
| 269 | <requireProperty> |
| 270 | <property>python.path</property> |
| 271 | </requireProperty> |
| 272 | <requireFilesExist> |
| 273 | <files> |
| 274 | <!--suppress UnresolvedMavenProperty --> |
| 275 | <file>${python.path}</file> |
| 276 | <file>${taco.sdk.path}/connector-packager/setup.py</file> |
| 277 | </files> |
| 278 | </requireFilesExist> |
| 279 | </rules> |
| 280 | <fail>true</fail> |
| 281 | </configuration> |
| 282 | </execution> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 283 | <execution> |
| 284 | <!-- ensure that .taco was created --> |
| 285 | <id>enforce-taco-package-success</id> |
| 286 | <phase>verify</phase> |
| 287 | <goals> |
| 288 | <goal>enforce</goal> |
| 289 | </goals> |
| 290 | <configuration> |
| 291 | <rules> |
| 292 | <requireFilesExist> |
| 293 | <files> |
| 294 | <file>${build.taco.package.file}</file> |
| 295 | </files> |
| 296 | </requireFilesExist> |
| 297 | </rules> |
| 298 | <fail>true</fail> |
| 299 | </configuration> |
| 300 | </execution> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 301 | </executions> |
| 302 | </plugin> |
| 303 | </plugins> |
| 304 | </build> |
| 305 | </profile> |
Dmitry Lychagin | dd8616e | 2021-10-13 10:34:43 -0700 | [diff] [blame] | 306 | <profile> |
| 307 | <id>taco-sdk-missing</id> |
| 308 | <activation> |
| 309 | <property> |
| 310 | <name>!taco.sdk.path</name> |
| 311 | </property> |
| 312 | </activation> |
| 313 | <properties> |
| 314 | <build.taco.package.nosdk.stage>package</build.taco.package.nosdk.stage> |
| 315 | </properties> |
| 316 | </profile> |
Dmitry Lychagin | f024b41 | 2021-10-11 10:31:08 -0700 | [diff] [blame] | 317 | </profiles> |
| 318 | </project> |