package init
This commit is contained in:
parent
771ba1d577
commit
78913f1451
BIN
3.4.0.tar.gz
Normal file
BIN
3.4.0.tar.gz
Normal file
Binary file not shown.
91
cassandra-java-driver-3.4.0-Remove-Guava-code-for-v18.patch
Normal file
91
cassandra-java-driver-3.4.0-Remove-Guava-code-for-v18.patch
Normal file
@ -0,0 +1,91 @@
|
||||
From 14cf13929f03bbfce7a309ab6628d0e4ffe513d4 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Janco <jjanco@redhat.com>
|
||||
Date: Tue, 13 Feb 2018 11:54:45 +0100
|
||||
Subject: [PATCH] Remove Guava code for <v18
|
||||
|
||||
---
|
||||
.../datastax/driver/core/GuavaCompatibility.java | 48 +---------------------
|
||||
pom.xml | 2 +-
|
||||
2 files changed, 2 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java
|
||||
index 0744197c7..465e8ba1f 100644
|
||||
--- a/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java
|
||||
+++ b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java
|
||||
@@ -133,59 +133,13 @@ public abstract class GuavaCompatibility {
|
||||
return new Version19OrHigher();
|
||||
} else if (isGuava_16_0_1_OrHigher()) {
|
||||
logger.info("Detected Guava < 19 in the classpath, using legacy compatibility layer");
|
||||
- return new Version18OrLower();
|
||||
+ throw new java.lang.UnsupportedOperationException();
|
||||
} else {
|
||||
throw new DriverInternalError("Detected incompatible version of Guava in the classpath. " +
|
||||
"You need 16.0.1 or higher.");
|
||||
}
|
||||
}
|
||||
|
||||
- private static class Version18OrLower extends GuavaCompatibility {
|
||||
-
|
||||
- @Override
|
||||
- public <V> ListenableFuture<V> withFallback(ListenableFuture<? extends V> input,
|
||||
- final AsyncFunction<Throwable, V> fallback) {
|
||||
- return Futures.withFallback(input, new FutureFallback<V>() {
|
||||
- @Override
|
||||
- public ListenableFuture<V> create(Throwable t) throws Exception {
|
||||
- return fallback.apply(t);
|
||||
- }
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public <V> ListenableFuture<V> withFallback(ListenableFuture<? extends V> input,
|
||||
- final AsyncFunction<Throwable, V> fallback,
|
||||
- Executor executor) {
|
||||
- return Futures.withFallback(input, new FutureFallback<V>() {
|
||||
- @Override
|
||||
- public ListenableFuture<V> create(Throwable t) throws Exception {
|
||||
- return fallback.apply(t);
|
||||
- }
|
||||
- }, executor);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public <I, O> ListenableFuture<O> transformAsync(ListenableFuture<I> input, AsyncFunction<? super I, ? extends O> function) {
|
||||
- return Futures.transform(input, function);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public <I, O> ListenableFuture<O> transformAsync(ListenableFuture<I> input, AsyncFunction<? super I, ? extends O> function, Executor executor) {
|
||||
- return Futures.transform(input, function, executor);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean isSupertypeOf(TypeToken<?> target, TypeToken<?> argument) {
|
||||
- return target.isAssignableFrom(argument);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public Executor sameThreadExecutor() {
|
||||
- return MoreExecutors.sameThreadExecutor();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
private static class Version19OrHigher extends GuavaCompatibility {
|
||||
|
||||
@Override
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 735005db3..e9647bcde 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -50,7 +50,7 @@
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<slf4j-log4j12.version>1.7.25</slf4j-log4j12.version>
|
||||
- <guava.version>19.0</guava.version>
|
||||
+ <guava.version>20.0</guava.version>
|
||||
<netty.version>4.0.47.Final</netty.version>
|
||||
<metrics.version>3.2.2</metrics.version>
|
||||
<snappy.version>1.1.2.6</snappy.version>
|
||||
--
|
||||
2.14.3
|
||||
|
||||
101
cassandra-java-driver.spec
Normal file
101
cassandra-java-driver.spec
Normal file
@ -0,0 +1,101 @@
|
||||
Name: cassandra-java-driver
|
||||
Version: 3.4.0
|
||||
Release: 1
|
||||
Summary: DataStax Java Driver for Apache Cassandra
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/datastax/java-driver
|
||||
Source0: https://github.com/datastax/java-driver/archive/%{version}.tar.gz
|
||||
Patch0: %{name}-%{version}-Remove-Guava-code-for-v18.patch
|
||||
BuildRequires: maven-local mvn(io.dropwizard.metrics:metrics-core)
|
||||
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind) mvn(com.google.guava:guava)
|
||||
BuildRequires: mvn(io.netty:netty-handler) mvn(io.netty:netty-transport-native-epoll)
|
||||
BuildRequires: mvn(javax.json:javax.json-api) mvn(joda-time:joda-time) mvn(log4j:log4j:1.2.17)
|
||||
BuildRequires: mvn(net.jpountz.lz4:lz4) mvn(org.apache.commons:commons-exec)
|
||||
BuildRequires: mvn(org.assertj:assertj-core) mvn(org.hdrhistogram:HdrHistogram)
|
||||
BuildRequires: mvn(org.mockito:mockito-all) mvn(org.ow2.asm:asm-all) mvn(org.slf4j:slf4j-api)
|
||||
BuildRequires: mvn(org.slf4j:slf4j-log4j12) mvn(org.sonatype.oss:oss-parent:pom:)
|
||||
BuildRequires: mvn(org.testng:testng) mvn(org.xerial.snappy:snappy-java)
|
||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) mvn(com.github.jnr:jnr-ffi)
|
||||
BuildRequires: mvn(com.github.jnr:jnr-posix) mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin)
|
||||
BuildRequires: mvn(org.apache.felix:org.apache.felix.framework)
|
||||
BuildRequires: mvn(ch.qos.logback:logback-classic)
|
||||
BuildArch: noarch
|
||||
%description
|
||||
A driver for Apache Cassandra 1.2+ that works exclusively with the
|
||||
Cassandra Query Language version 3 (CQL3) and Cassandra's binary protocol.
|
||||
|
||||
%package extras
|
||||
Summary: DataStax Java Driver for Apache Cassandra - Extras
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%description extras
|
||||
Extended functionality for the Java driver.
|
||||
|
||||
%package mapping
|
||||
Summary: DataStax Java Driver for Apache Cassandra - Object Mapping
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%description mapping
|
||||
Object mapper for the DataStax CQL Java Driver.
|
||||
|
||||
%package parent
|
||||
Summary: DataStax Java Driver for Apache Cassandra - Parent POM
|
||||
%description parent
|
||||
Parent POM for the DataStax Java Driver.
|
||||
|
||||
%package tests
|
||||
Summary: DataStax Java Driver for Apache Cassandra - Tests
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%description tests
|
||||
Tests for the DataStax Java Driver.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
%description javadoc
|
||||
This package contains javadoc for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -qn java-driver-%{version}
|
||||
%patch0 -p1
|
||||
%pom_disable_module driver-dist
|
||||
%pom_disable_module driver-examples
|
||||
%pom_disable_module stress driver-tests
|
||||
%pom_disable_module shading driver-tests
|
||||
%pom_remove_plugin -r :animal-sniffer-maven-plugin:
|
||||
%pom_remove_plugin -r :clirr-maven-plugin
|
||||
%pom_remove_plugin -r :license-maven-plugin
|
||||
%pom_xpath_remove -r "pom:build/pom:extensions"
|
||||
%pom_remove_plugin -r :maven-source-plugin
|
||||
%pom_remove_plugin -r :maven-release-plugin
|
||||
%pom_remove_plugin :gmaven-plugin driver-mapping
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:executions/pom:execution/pom:goals"
|
||||
%pom_remove_plugin -r :maven-shade-plugin driver-core
|
||||
rm manual/statements/.nav
|
||||
rm manual/object_mapper/.nav
|
||||
%mvn_package ":cassandra-driver-tests-parent" tests
|
||||
%mvn_package ":cassandra-driver-tests-osgi" tests
|
||||
|
||||
%build
|
||||
%mvn_build -fs
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
%files -f .mfiles-cassandra-driver-core
|
||||
%doc README.md changelog faq manual upgrade_guide
|
||||
%license LICENSE
|
||||
|
||||
%files extras -f .mfiles-cassandra-driver-extras
|
||||
|
||||
%files mapping -f .mfiles-cassandra-driver-mapping
|
||||
|
||||
%files parent -f .mfiles-cassandra-driver-parent
|
||||
%license LICENSE
|
||||
|
||||
%files tests -f .mfiles-tests
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Tue Aug 25 2020 wangyue <wangyue92@huawei.com> - 3.4.0-1
|
||||
- package init
|
||||
5
cassandra-java-driver.yaml
Normal file
5
cassandra-java-driver.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
git_url: https://github.com/
|
||||
version_control: github
|
||||
src_repo:
|
||||
tag_prefix: "^v"
|
||||
seperator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user