Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/databases/cassandra4/files/maven/build-resolver.xml
16465 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
<!--
3
Licensed to the Apache Software Foundation (ASF) under one or more
4
contributor license agreements. See the NOTICE file distributed with
5
this work for additional information regarding copyright ownership.
6
The ASF licenses this file to You under the Apache License, Version 2.0
7
(the "License"); you may not use this file except in compliance with
8
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, software
13
distributed under the License is distributed on an "AS IS" BASIS,
14
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
See the License for the specific language governing permissions and
16
limitations under the License.
17
-->
18
<project basedir="." name="apache-cassandra--resolver-tasks"
19
xmlns:resolver="antlib:org.apache.maven.resolver.ant"
20
xmlns:if="ant:if"
21
xmlns:unless="ant:unless">
22
23
<!-- details of what version of Resolver ANT Tasks to fetch -->
24
<property name="resolver-ant-tasks.version" value="1.3.0" />
25
<property name="resolver-ant-tasks.local" value="${local.repository}/org/apache/maven/resolver/maven-resolver-ant-tasks/${resolver-ant-tasks.version}/maven-resolver-ant-tasks-${resolver-ant-tasks.version}.jar"/>
26
<property name="resolver-ant-tasks.url" value="https://repo1.maven.org/maven2/org/apache/maven/resolver/maven-resolver-ant-tasks" />
27
<condition property="resolver-ant-tasks.jar.exists">
28
<available file="${resolver-ant-tasks.local}" />
29
</condition>
30
31
<property name="artifact.python.pypi" value="https://files.pythonhosted.org/packages" />
32
<property name="artifact.github.release" value="https://github.com" />
33
34
<!-- some artifacts are fetched from github as blobs; these are all in the cassandra project, but in an older commit -->
35
<property name="lib.download.sha" value="1371883db3d8bf7d7c54e0baaca89c6c2d2a5abe"/>
36
<property name="lib.download.base.url" value="https://raw.githubusercontent.com/apache/cassandra/${lib.download.sha}" />
37
<property name="lib.download.url.postfix" value="" />
38
39
<path id="resolver-ant-tasks.classpath" path="${resolver-ant-tasks.local}" />
40
41
<!--
42
Fetch Resolver Ant Tasks and Cassandra's dependencies.
43
-->
44
45
<target name="_resolver_download" unless="resolver-ant-tasks.jar.exists" description="Fetch Resolver ANT Tasks from Maven Central Repository">
46
<echo>Downloading Resolver ANT Tasks...</echo>
47
<mkdir dir="${local.repository}/org/apache/maven/resolver/maven-resolver-ant-tasks/${resolver-ant-tasks.version}" />
48
49
<get src="${resolver-ant-tasks.url}/${resolver-ant-tasks.version}/maven-resolver-ant-tasks-${resolver-ant-tasks.version}-uber.jar"
50
dest="${resolver-ant-tasks.local}" usetimestamp="true" quiet="true"/>
51
</target>
52
53
<target name="resolver-init" depends="init,_resolver_download" unless="resolver-ant-tasks.initialized" description="Initialize Resolver ANT Tasks">
54
55
<typedef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml" classpathref="resolver-ant-tasks.classpath" />
56
<resolver:remoterepos id="all">
57
<remoterepo id="resolver-central" url="${artifact.remoteRepository.central}"/>
58
<remoterepo id="resolver-apache" url="${artifact.remoteRepository.apache}"/>
59
</resolver:remoterepos>
60
61
<macrodef name="resolve">
62
<!--
63
maven-resolver-ant-tasks's resolve logic doesn't have retry logic and does not respect settings.xml,
64
this causes issues when overriding maven central is required (such as when behind a corporate firewall);
65
it is critical to always provide the 'all' remoterepos to override resolve's default hard coded logic.
66
67
This macro simplifies this logic by centralizing retries and forcing the remoterepo 'all' to be used.
68
-->
69
<attribute name="failonmissingattachments" default="true"/>
70
<element name="elements" implicit="yes"/>
71
<sequential>
72
<retry retrycount="3">
73
<resolver:resolve failonmissingattachments="@{failonmissingattachments}">
74
<resolver:remoterepos refid="all"/>
75
<elements/>
76
</resolver:resolve>
77
</retry>
78
</sequential>
79
</macrodef>
80
<macrodef name="resolvepom">
81
<attribute name="file"/>
82
<attribute name="id"/>
83
<element name="elements" implicit="yes" optional="yes"/>
84
<sequential>
85
<retry retrycount="3">
86
<resolver:pom file="@{file}" id="@{id}">
87
<remoterepos refid="all"/>
88
<elements/>
89
</resolver:pom>
90
</retry>
91
</sequential>
92
</macrodef>
93
94
<resolve>
95
<dependencies>
96
<dependency groupId="com.datastax.wikitext" artifactId="wikitext-core-ant" version="1.3"/>
97
<dependency groupId="org.fusesource.wikitext" artifactId="textile-core" version="1.3"/>
98
</dependencies>
99
<path refid="wikitext.classpath" classpath="runtime"/>
100
</resolve>
101
<resolve>
102
<dependencies>
103
<dependency groupId="org.apache.rat" artifactId="apache-rat-tasks" version="0.6" />
104
</dependencies>
105
<path refid="rat.classpath" classpath="runtime"/>
106
</resolve>
107
<resolve>
108
<dependencies>
109
<dependency groupId="org.jacoco" artifactId="org.jacoco.ant" version="${jacoco.version}" />
110
</dependencies>
111
<path refid="jacocoant.classpath" classpath="runtime"/>
112
</resolve>
113
<resolve>
114
<dependencies>
115
<dependency groupId="org.antlr" artifactId="antlr" version="3.5.2"/>
116
<dependency groupId="org.antlr" artifactId="antlr-runtime" version="3.5.2"/>
117
<dependency groupId="org.antlr" artifactId="ST4" version="4.0.8"/>
118
</dependencies>
119
<path refid="cql3-grammar.classpath" classpath="runtime"/>
120
</resolve>
121
<resolve>
122
<dependencies>
123
<dependency groupId="de.jflex" artifactId="jflex" version="${jflex.version}" />
124
</dependencies>
125
<path refid="jflex.classpath" classpath="runtime"/>
126
</resolve>
127
128
<macrodef name="install">
129
<attribute name="pomFile"/>
130
<attribute name="file"/>
131
<attribute name="classifier" default=""/>
132
<attribute name="packaging" default="jar"/>
133
<sequential>
134
<exec dir="." executable="sh">
135
<arg line="-c 'mvn org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file -DpomFile=@{pomFile} -Dfile=@{file} -Dclassifier=@{classifier} -Dpackaging=@{packaging}'" />
136
</exec>
137
</sequential>
138
</macrodef>
139
140
<macrodef name="deploy">
141
<attribute name="pomFile"/>
142
<attribute name="file"/>
143
<attribute name="classifier" default=""/>
144
<attribute name="packaging" default="jar"/>
145
<sequential>
146
<exec dir="." executable="sh">
147
<arg line="-c 'mvn org.apache.maven.plugins:maven-gpg-plugin:1.6:sign-and-deploy-file -DretryFailedDeploymentCount=5 -Durl=${maven-repository-url} -DrepositoryId=${maven-repository-id} -DpomFile=@{pomFile} -Dfile=@{file} -Dclassifier=@{classifier} -Dpackaging=@{packaging}'" />
148
</exec>
149
</sequential>
150
</macrodef>
151
152
<macrodef name="sign-dist">
153
<attribute name="file"/>
154
<sequential>
155
<echo message="gpg signing @{file}" />
156
<exec dir="." executable="sh">
157
<!-- dummy out the deploy parameters, only the signing is required here -->
158
<arg line="-c 'mvn -q org.apache.maven.plugins:maven-gpg-plugin:1.6:sign-and-deploy-file -Dfile=@{file} -DgroupId=org.apache.cassandra -DartifactId=cassandra-parent -Dversion=${version} -Durl=file:///tmp/ -DrepositoryId=tmp'" />
159
</exec>
160
</sequential>
161
</macrodef>
162
163
<property name="resolver-ant-tasks.initialized" value="true"/>
164
</target>
165
166
<target name="resolver-retrieve-build" depends="resolver-init,write-poms">
167
<resolvepom file="${build.dir}/${final.name}.pom" id="all-pom" />
168
<resolvepom file="${build.dir}/tmp-${final.name}-deps.pom" id="pom-deps" />
169
170
<resolve>
171
<dependencies pomRef="all-pom"/>
172
<files dir="${build.dir.lib}/jars" layout="{artifactId}-{version}-{classifier}.{extension}" scopes="compile,provided,!system"/>
173
</resolve>
174
<resolve>
175
<dependencies pomRef="pom-deps"/>
176
<files dir="${test.lib}/jars" layout="{artifactId}-{version}-{classifier}.{extension}" scopes="test,!provide,!system"/>
177
</resolve>
178
179
180
<!-- jacoco agent jar comes wrapped in a jar -->
181
<unzip src="${local.repository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}.jar" dest="${build.dir.lib}/jars">
182
<patternset>
183
<include name="*.jar"/>
184
</patternset>
185
<mapper type="flatten"/>
186
</unzip>
187
</target>
188
189
<target name="resolver-dist-lib" depends="resolver-retrieve-build,write-poms">
190
<resolvepom file="${build.dir}/${final.name}.pom" id="all-pom" />
191
192
<resolve failOnMissingAttachments="true">
193
<dependencies pomRef="all-pom"/>
194
<files dir="${build.lib}" layout="{artifactId}-{version}-{classifier}.{extension}" scopes="compile,!provide,!system"/>
195
</resolve>
196
<mkdir dir="${local.repository}/org/apache/cassandra/deps/sigar-bin"/>
197
<mkdir dir="${build.lib}/sigar-bin"/>
198
199
<!-- files.pythonhosted.org -->
200
<get src="${artifact.python.pypi}/59/a0/cf4cd997e1750f0c2d91c6ea5abea218251c43c3581bcc2f118b00baf5cf/futures-2.1.6-py2.py3-none-any.whl" dest="${local.repository}/org/apache/cassandra/deps/futures-2.1.6-py2.py3-none-any.zip" usetimestamp="true" quiet="true" skipexisting="true"/>
201
<get src="${artifact.python.pypi}/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl" dest="${local.repository}/org/apache/cassandra/deps/six-1.12.0-py2.py3-none-any.zip" usetimestamp="true" quiet="true" skipexisting="true"/>
202
203
<!-- apache/cassandra/lib -->
204
<get src="${lib.download.base.url}/lib/geomet-0.1.0.zip" dest="${local.repository}/org/apache/cassandra/deps/geomet-0.1.0.zip" usetimestamp="true" quiet="true" skipexisting="true"/>
205
<get dest="${local.repository}/org/apache/cassandra/deps/sigar-bin/" quiet="true" usetimestamp="true" skipexisting="true">
206
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-amd64-freebsd-6.so"/>
207
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-amd64-linux.so"/>
208
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-amd64-solaris.so"/>
209
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-ia64-hpux-11.sl"/>
210
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-ia64-linux.so"/>
211
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-pa-hpux-11.sl"/>
212
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-ppc-aix-5.so"/>
213
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-ppc-linux.so"/>
214
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-ppc64-aix-5.so"/>
215
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-ppc64-linux.so"/>
216
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-ppc64le-linux.so"/>
217
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-s390x-linux.so"/>
218
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-sparc-solaris.so"/>
219
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-sparc64-solaris.so"/>
220
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-universal-macosx.dylib"/>
221
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-universal64-macosx.dylib"/>
222
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-x86-freebsd-5.so"/>
223
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-x86-freebsd-6.so"/>
224
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-x86-linux.so"/>
225
<url url="${lib.download.base.url}/lib/sigar-bin/libsigar-x86-solaris.so"/>
226
<url url="${lib.download.base.url}/lib/sigar-bin/sigar-amd64-winnt.dll"/>
227
<url url="${lib.download.base.url}/lib/sigar-bin/sigar-x86-winnt.dll"/>
228
<url url="${lib.download.base.url}/lib/sigar-bin/sigar-x86-winnt.lib"/>
229
</get>
230
231
<copy todir="${build.lib}" quiet="true">
232
<file file="${local.repository}/org/apache/cassandra/deps/futures-2.1.6-py2.py3-none-any.zip"/>
233
<file file="${local.repository}/org/apache/cassandra/deps/six-1.12.0-py2.py3-none-any.zip"/>
234
<file file="${local.repository}/org/apache/cassandra/deps/geomet-0.1.0.zip"/>
235
</copy>
236
<copy todir="${build.lib}/sigar-bin/" quiet="true">
237
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-amd64-freebsd-6.so"/>
238
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-amd64-linux.so"/>
239
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-amd64-solaris.so"/>
240
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-ia64-hpux-11.sl"/>
241
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-ia64-linux.so"/>
242
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-pa-hpux-11.sl"/>
243
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-ppc-aix-5.so"/>
244
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-ppc-linux.so"/>
245
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-ppc64-aix-5.so"/>
246
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-ppc64-linux.so"/>
247
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-ppc64le-linux.so"/>
248
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-s390x-linux.so"/>
249
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-sparc-solaris.so"/>
250
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-sparc64-solaris.so"/>
251
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-universal-macosx.dylib"/>
252
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-universal64-macosx.dylib"/>
253
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-x86-freebsd-5.so"/>
254
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-x86-freebsd-6.so"/>
255
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-x86-linux.so"/>
256
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/libsigar-x86-solaris.so"/>
257
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/sigar-amd64-winnt.dll"/>
258
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/sigar-x86-winnt.dll"/>
259
<file file="${local.repository}/org/apache/cassandra/deps/sigar-bin/sigar-x86-winnt.lib"/>
260
</copy>
261
</target>
262
</project>
263
264