blob: 552e4446ef4fc585e748e0e3a1b4a468976b3d13 [file] [log] [blame]
Dmitry Lychaginf024b412021-10-11 10:31:08 -07001<!--
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>
42 <build.taco.init.stage>none</build.taco.init.stage>
43 <build.taco.validate.stage>none</build.taco.validate.stage>
44 <build.taco.directory>${project.build.directory}/taco</build.taco.directory>
45 <build.taco.gensrc.directory>${build.taco.directory}/generated-sources</build.taco.gensrc.directory>
46 <build.taco.log.directory>${build.taco.directory}</build.taco.log.directory>
47 <build.venv.directory>${project.build.directory}/venv</build.venv.directory>
48 <build.venv.pyhton.path>${build.venv.directory}/bin/python</build.venv.pyhton.path>
49 <taco.sourceDirectory>${project.basedir}/src/main/taco</taco.sourceDirectory>
50
51 <taco.plugin.class>asterixdb_jdbc</taco.plugin.class>
52 <taco.plugin.name>AsterixDB</taco.plugin.name>
53 <!--suppress UnresolvedMavenProperty -->
54 <taco.plugin.version>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</taco.plugin.version>
55 <taco.plugin.vendor>Apache</taco.plugin.vendor>
56 <taco.plugin.site>https://asterixdb.apache.org</taco.plugin.site>
57 <taco.plugin.dialect>AsterixDB</taco.plugin.dialect>
58 <taco.plugin.port.default>19002</taco.plugin.port.default>
59 <taco.plugin.database.label>Dataverse</taco.plugin.database.label>
60 <taco.plugin.database.default>Default</taco.plugin.database.default>
61 <taco.plugin.table.label>Dataset</taco.plugin.table.label>
62 <taco.plugin.jdbc.scheme>jdbc:asterixdb://</taco.plugin.jdbc.scheme>
Dmitry Lychaginea552922021-10-11 15:40:15 -070063 <taco.plugin.jdbc.properties.aux> </taco.plugin.jdbc.properties.aux>
Dmitry Lychaginf024b412021-10-11 10:31:08 -070064 <taco.plugin.auth.none><![CDATA[<option value="auth-none" label="No Authentication"/>]]></taco.plugin.auth.none>
65 </properties>
66
67 <build>
68 <resources>
69 <resource>
70 <directory>${taco.sourceDirectory}</directory>
71 </resource>
72 </resources>
73 <plugins>
74 <plugin>
75 <groupId>org.codehaus.mojo</groupId>
76 <artifactId>build-helper-maven-plugin</artifactId>
77 <executions>
78 <execution>
79 <id>parse-version</id>
80 <goals>
81 <goal>parse-version</goal>
82 </goals>
83 </execution>
84 </executions>
85 </plugin>
86 <plugin>
87 <artifactId>maven-resources-plugin</artifactId>
88 <executions>
89 <execution>
90 <id>taco-generate-sources</id>
91 <phase>generate-sources</phase>
92 <goals>
93 <goal>copy-resources</goal>
94 </goals>
95 <configuration>
96 <outputDirectory>${build.taco.gensrc.directory}</outputDirectory>
97 <resources>
98 <resource>
99 <directory>${taco.sourceDirectory}</directory>
100 <filtering>true</filtering>
101 </resource>
102 </resources>
103 </configuration>
104 </execution>
105 </executions>
106 </plugin>
107 <plugin>
108 <groupId>org.apache.maven.plugins</groupId>
109 <artifactId>maven-jar-plugin</artifactId>
110 <configuration>
111 <classesDirectory>${build.taco.gensrc.directory}/plugins/${taco.plugin.class}</classesDirectory>
112 </configuration>
113 </plugin>
114 <plugin>
115 <groupId>org.apache.maven.plugins</groupId>
116 <artifactId>maven-source-plugin</artifactId>
117 <executions>
118 <execution>
119 <id>attach-sources</id>
120 <goals>
121 <goal>jar</goal>
122 </goals>
123 </execution>
124 </executions>
125 </plugin>
126 <!-- create .taco file -->
127 <plugin>
128 <groupId>org.apache.maven.plugins</groupId>
129 <artifactId>maven-shade-plugin</artifactId>
130 <executions>
131 <execution>
132 <goals>
133 <goal>shade</goal>
134 </goals>
135 <configuration>
136 <outputFile>${project.build.directory}/${taco.plugin.class}.taco</outputFile>
137 <artifactSet>
138 <includes>
139 <include>org.apache.asterix:asterix-jdbc-taco</include>
140 </includes>
141 </artifactSet>
142 </configuration>
143 </execution>
144 </executions>
145 </plugin>
146 <plugin>
147 <groupId>org.codehaus.mojo</groupId>
148 <artifactId>exec-maven-plugin</artifactId>
149 <executions>
150 <execution>
151 <id>venv-install</id>
152 <phase>${build.taco.init.stage}</phase>
153 <goals>
154 <goal>exec</goal>
155 </goals>
156 <configuration>
157 <!--suppress UnresolvedMavenProperty -->
158 <executable>${python.path}</executable>
159 <workingDirectory>${project.build.directory}</workingDirectory>
160 <arguments>
161 <argument>-m</argument>
162 <argument>venv</argument>
163 <argument>${build.venv.directory}</argument>
164 </arguments>
165 </configuration>
166 </execution>
167 <execution>
168 <id>taco-packager-install</id>
169 <phase>${build.taco.init.stage}</phase>
170 <goals>
171 <goal>exec</goal>
172 </goals>
173 <configuration>
174 <executable>${build.venv.pyhton.path}</executable>
175 <workingDirectory>${taco.sdk.path}/connector-packager</workingDirectory>
176 <arguments>
177 <argument>setup.py</argument>
178 <argument>install</argument>
179 </arguments>
180 <environmentVariables>
181 <VIRTUALENV>${build.venv.directory}</VIRTUALENV>
182 <PATH>${build.venv.directory}${file.separator}bin:${path.separator}${env.PATH}</PATH>
183 </environmentVariables>
184 </configuration>
185 </execution>
186 <execution>
187 <id>taco-validate</id>
188 <phase>${build.taco.validate.stage}</phase>
189 <goals>
190 <goal>exec</goal>
191 </goals>
192 <configuration>
193 <executable>${build.venv.pyhton.path}</executable>
194 <workingDirectory>${taco.sdk.path}/connector-packager</workingDirectory>
195 <arguments>
196 <argument>-m</argument>
197 <argument>connector_packager.package</argument>
198 <argument>${build.taco.gensrc.directory}/plugins/asterixdb_jdbc</argument>
199 <argument>--validate-only</argument>
200 <argument>--log</argument>
201 <argument>${build.taco.log.directory}</argument>
202 <argument>--dest</argument>
203 <argument>${build.taco.directory}</argument>
204 </arguments>
205 <environmentVariables>
206 <VIRTUALENV>${build.venv.directory}</VIRTUALENV>
207 <PATH>${build.venv.directory}${file.separator}bin:${path.separator}${env.PATH}</PATH>
208 </environmentVariables>
209 </configuration>
210 </execution>
211 </executions>
212 </plugin>
213 </plugins>
214 </build>
215
216 <profiles>
217 <profile>
218 <id>taco-validate</id>
219 <activation>
220 <property>
221 <name>taco.sdk.path</name>
222 </property>
223 </activation>
224 <properties>
225 <build.taco.init.stage>initialize</build.taco.init.stage>
226 <build.taco.validate.stage>compile</build.taco.validate.stage>
227 </properties>
228 <build>
229 <plugins>
230 <plugin>
231 <groupId>org.apache.maven.plugins</groupId>
232 <artifactId>maven-enforcer-plugin</artifactId>
233 <executions>
234 <execution>
235 <id>enforce-taco-packager-exists</id>
236 <goals>
237 <goal>enforce</goal>
238 </goals>
239 <configuration>
240 <rules>
241 <requireProperty>
242 <property>python.path</property>
243 </requireProperty>
244 <requireFilesExist>
245 <files>
246 <!--suppress UnresolvedMavenProperty -->
247 <file>${python.path}</file>
248 <file>${taco.sdk.path}/connector-packager/setup.py</file>
249 </files>
250 </requireFilesExist>
251 </rules>
252 <fail>true</fail>
253 </configuration>
254 </execution>
255 </executions>
256 </plugin>
257 </plugins>
258 </build>
259 </profile>
260 </profiles>
261</project>