Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NOID] Rely on neo4j provided libraries instead of shading #604

Merged
merged 3 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Apache-2.0
WMI4Java-1.6.3.jar
accessors-smart-2.5.0.jar
annotations-17.0.0.jar
arrow-format-14.0.2.jar
arrow-memory-core-14.0.2.jar
arrow-memory-netty-14.0.2.jar
arrow-vector-14.0.2.jar
arrow-format-15.0.0.jar
arrow-memory-core-15.0.0.jar
arrow-memory-netty-15.0.0.jar
arrow-vector-15.0.0.jar
assertj-core-3.25.1.jar
audience-annotations-0.5.0.jar
avro-1.7.7.jar
Expand All @@ -27,7 +27,6 @@ Apache-2.0
cassandra-driver-core-3.10.0.jar
commons-beanutils-1.9.4.jar
commons-cli-1.2.jar
commons-codec-1.15.jar
commons-codec-1.16.0.jar
commons-collections-3.2.2.jar
commons-collections4-4.4.jar
Expand All @@ -36,6 +35,7 @@ Apache-2.0
commons-csv-1.9.0.jar
commons-daemon-1.0.13.jar
commons-io-2.15.1.jar
commons-lang3-3.12.0.jar
commons-lang3-3.14.0.jar
commons-logging-1.2.jar
commons-math3-3.1.1.jar
Expand All @@ -49,17 +49,14 @@ Apache-2.0
docker-java-transport-3.3.3.jar
docker-java-transport-zerodep-3.3.3.jar
ehcache-3.3.1.jar
error_prone_annotations-2.18.0.jar
error_prone_annotations-2.2.0.jar
failureaccess-1.0.1.jar
failureaccess-1.0.jar
flatbuffers-java-1.12.0.jar
flatbuffers-java-23.5.26.jar
fst-2.50.jar
geronimo-jcache_1.0_spec-1.0-alpha-1.jar
gradle-tooling-api-7.3.jar
gson-2.9.0.jar
guava-27.0-jre.jar
guava-32.0.1-jre.jar
guice-4.0.jar
guice-servlet-4.0.jar
hadoop-annotations-3.3.6.jar
Expand Down Expand Up @@ -95,10 +92,8 @@ Apache-2.0
http2-server-10.0.17.jar
httpclient-4.5.13.jar
httpcore-4.4.13.jar
ipaddress-5.3.3.jar
ipaddress-5.4.0.jar
j2objc-annotations-1.1.jar
j2objc-annotations-2.8.jar
jPowerShell-3.0.jar
jProcesses-1.6.5.jar
jackson-annotations-2.16.1.jar
Expand All @@ -107,7 +102,6 @@ Apache-2.0
jackson-databind-2.16.1.jar
jackson-dataformat-cbor-2.16.1.jar
jackson-dataformat-csv-2.16.1.jar
jackson-datatype-jsr310-2.15.1.jar
jackson-datatype-jsr310-2.16.1.jar
jackson-jaxrs-base-2.16.1.jar
jackson-jaxrs-json-provider-2.16.1.jar
Expand Down Expand Up @@ -2564,7 +2558,6 @@ MIT
bcutil-jdk18on-1.77.jar
cassandra-1.19.1.jar
checker-qual-2.5.2.jar
checker-qual-3.33.0.jar
couchbase-1.19.1.jar
database-commons-1.19.1.jar
duct-tape-1.0.8.jar
Expand Down
19 changes: 6 additions & 13 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ Apache-2.0
WMI4Java-1.6.3.jar
accessors-smart-2.5.0.jar
annotations-17.0.0.jar
arrow-format-14.0.2.jar
arrow-memory-core-14.0.2.jar
arrow-memory-netty-14.0.2.jar
arrow-vector-14.0.2.jar
arrow-format-15.0.0.jar
arrow-memory-core-15.0.0.jar
arrow-memory-netty-15.0.0.jar
arrow-vector-15.0.0.jar
assertj-core-3.25.1.jar
audience-annotations-0.5.0.jar
avro-1.7.7.jar
Expand All @@ -57,7 +57,6 @@ Apache-2.0
cassandra-driver-core-3.10.0.jar
commons-beanutils-1.9.4.jar
commons-cli-1.2.jar
commons-codec-1.15.jar
commons-codec-1.16.0.jar
commons-collections-3.2.2.jar
commons-collections4-4.4.jar
Expand All @@ -66,6 +65,7 @@ Apache-2.0
commons-csv-1.9.0.jar
commons-daemon-1.0.13.jar
commons-io-2.15.1.jar
commons-lang3-3.12.0.jar
commons-lang3-3.14.0.jar
commons-logging-1.2.jar
commons-math3-3.1.1.jar
Expand All @@ -79,17 +79,14 @@ Apache-2.0
docker-java-transport-3.3.3.jar
docker-java-transport-zerodep-3.3.3.jar
ehcache-3.3.1.jar
error_prone_annotations-2.18.0.jar
error_prone_annotations-2.2.0.jar
failureaccess-1.0.1.jar
failureaccess-1.0.jar
flatbuffers-java-1.12.0.jar
flatbuffers-java-23.5.26.jar
fst-2.50.jar
geronimo-jcache_1.0_spec-1.0-alpha-1.jar
gradle-tooling-api-7.3.jar
gson-2.9.0.jar
guava-27.0-jre.jar
guava-32.0.1-jre.jar
guice-4.0.jar
guice-servlet-4.0.jar
hadoop-annotations-3.3.6.jar
Expand Down Expand Up @@ -125,10 +122,8 @@ Apache-2.0
http2-server-10.0.17.jar
httpclient-4.5.13.jar
httpcore-4.4.13.jar
ipaddress-5.3.3.jar
ipaddress-5.4.0.jar
j2objc-annotations-1.1.jar
j2objc-annotations-2.8.jar
jPowerShell-3.0.jar
jProcesses-1.6.5.jar
jackson-annotations-2.16.1.jar
Expand All @@ -137,7 +132,6 @@ Apache-2.0
jackson-databind-2.16.1.jar
jackson-dataformat-cbor-2.16.1.jar
jackson-dataformat-csv-2.16.1.jar
jackson-datatype-jsr310-2.15.1.jar
jackson-datatype-jsr310-2.16.1.jar
jackson-jaxrs-base-2.16.1.jar
jackson-jaxrs-json-provider-2.16.1.jar
Expand Down Expand Up @@ -432,7 +426,6 @@ MIT
bcutil-jdk18on-1.77.jar
cassandra-1.19.1.jar
checker-qual-2.5.2.jar
checker-qual-3.33.0.jar
couchbase-1.19.1.jar
database-commons-1.19.1.jar
duct-tape-1.0.8.jar
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,5 @@ ext {
publicDir = "${project.rootDir}"
neo4jVersionEffective = project.hasProperty("neo4jVersionOverride") ? project.getProperty("neo4jVersionOverride") : "5.18.0"
testContainersVersion = '1.19.1'
apacheArrowVersion = '15.0.0'
}
9 changes: 2 additions & 7 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ dependencies {
// We need this to avoid seeing SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" on startup
api group: 'org.slf4j', name: 'slf4j-api', version: '2.0.9'

// We need to force this dependency's version due to a vulnerability https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/3048
api group: 'org.apache.commons', name: 'commons-lang3', {
version {
strictly '3.14.0'
}
}
api group: 'com.github.seancfoley', name: 'ipaddress', version: '5.3.3'

// These will be dependencies not packaged with the .jar
// They need to be provided either through the database or in an extra .jar
Expand All @@ -49,6 +42,8 @@ dependencies {
// and remove the manual licensing check for it in licenses-3rdparties.gradle
compileOnly group: 'org.apache.hadoop', name: 'hadoop-common', version: '3.3.6', withoutServers
compileOnly group: 'com.google.cloud', name: 'google-cloud-storage', version: '2.26.1'
compileOnly group: 'com.github.seancfoley', name: 'ipaddress', version: '5.3.3'
compileOnly group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'

// These dependencies affect the tests only, they will not be packaged in the resulting .jar
testImplementation project(':test-utils')
Expand Down
8 changes: 4 additions & 4 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ dependencies {
implementation project(":common")
implementation group: 'com.opencsv', name: 'opencsv', version: '5.7.1'
implementation group: 'org.roaringbitmap', name: 'RoaringBitmap', version: '0.7.17'
implementation group: 'com.google.guava', name: 'guava', version: '32.0.1-jre'

def arrowExclusions = {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
Expand All @@ -50,12 +49,13 @@ dependencies {
exclude group: 'io.netty', module: 'netty-buffer'
}

implementation group: 'org.apache.arrow', name: 'arrow-vector', version: '14.0.2', arrowExclusions
implementation group: 'org.apache.arrow', name: 'arrow-memory-netty', version: '14.0.2', arrowExclusions

// These will be dependencies not packaged with the .jar
// They need to be provided either through the database or in an extra .jar
compileOnly group: 'org.apache.arrow', name: 'arrow-vector', version: apacheArrowVersion, arrowExclusions
compileOnly group: 'org.apache.arrow', name: 'arrow-memory-netty', version: apacheArrowVersion, arrowExclusions

compileOnly group: 'org.neo4j', name: 'neo4j', version: neo4jVersionEffective
compileOnly group: 'com.google.guava', name: 'guava', version: '33.0.0-jre'

// These dependencies affect the tests only, they will not be packaged in the resulting .jar
testImplementation project(":common").sourceSets.test.output
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/apoc/coll/Coll.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import apoc.result.ListResult;
import apoc.util.Util;
import com.google.common.util.concurrent.AtomicDouble;
import java.lang.reflect.Array;
import java.text.Collator;
import java.util.ArrayList;
Expand All @@ -48,6 +47,7 @@
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import org.apache.commons.lang3.mutable.MutableDouble;
import org.apache.commons.lang3.mutable.MutableInt;
import org.apache.commons.lang3.tuple.Pair;
import org.neo4j.graphdb.Node;
Expand Down Expand Up @@ -86,7 +86,7 @@ public Number stdev(
@Description("Returns an accumulative `LIST<INTEGER | FLOAT>`.")
public List<Number> runningTotal(@Name("list") List<Number> list) {
if (list == null || list.isEmpty()) return null;
AtomicDouble sum = new AtomicDouble();
MutableDouble sum = new MutableDouble();
return list.stream()
.map(i -> {
double value = sum.addAndGet(i.doubleValue());
Expand Down
Loading
Loading