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