Skip to content

Commit

Permalink
NO AUTO Cleans up common, core and full after the code split (#3123)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon committed Aug 11, 2022
1 parent 9032fb6 commit 4899849
Show file tree
Hide file tree
Showing 51 changed files with 127 additions and 306 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ bin
progress.csv
logs/
store_lock
.hprof
*.hprof
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id 'com.github.johnrengelman.shadow' version '7.1.0' apply false
id 'maven-publish'
id 'antlr'
id "org.sonarqube" version "2.7"
id "com.github.hierynomus.license-report" version"0.16.1"
}

Expand Down Expand Up @@ -71,7 +70,7 @@ subprojects {

// neo4jDockerImage system property is used in TestContainerUtil
systemProperties 'user.language' : 'en' ,
'user.country ' : 'US',
'user.country' : 'US',
'neo4jDockerImage' : System.getProperty("NEO4JVERSION") ? 'neo4j:' + System.getProperty("NEO4JVERSION") + '-enterprise' : 'neo4j:5.0.0-dev-enterprise',
'neo4jCommunityDockerImage': System.getProperty("NEO4JVERSION") ? 'neo4j:' + System.getProperty("NEO4JVERSION") : 'neo4j:5.0.0-dev'

Expand Down
119 changes: 28 additions & 91 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id 'java'
id 'maven-publish'
id 'antlr'
id "org.sonarqube"
id "com.diffplug.spotless" version "6.7.2"
}

Expand Down Expand Up @@ -30,123 +29,61 @@ generateGrammarSource {
}

dependencies {
testImplementation project(':test-utils')
apt project(':processor')

apt group: 'org.neo4j', name: 'neo4j', version: neo4jVersionEffective
implementation group: 'commons-codec', name: 'commons-codec', version: '1.14'
implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.7.0'
implementation group: 'net.minidev', name: 'json-smart', version: '2.4.8'
implementation group: 'org.hdrhistogram', name: 'HdrHistogram', version: '2.1.9'

antlr "org.antlr:antlr4:4.7.2", {
exclude group: 'org.glassfish'
exclude group: 'com.ibm.icu'
exclude group: 'org.abego.treelayout'
}
// compileOnly "org.antlr:antlr4-runtime:4.7.2"
// testCompile "org.antlr:antlr4-runtime:4.7.2"

implementation group: 'org.roaringbitmap', name: 'RoaringBitmap', version: '0.7.17'
implementation(group: 'org.apache.commons', name: 'commons-configuration2', version: '2.8.0') {
exclude group: "org.yaml"
exclude module: "snakeyaml"
exclude module: "commons-lang3"
def withoutServers = {
exclude group: 'org.eclipse.jetty'
exclude group: 'org.eclipse.jetty.aggregate'
exclude group: 'org.apache.hive', module: 'hive-service'
}
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.26'
testImplementation group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
implementation group: 'com.github.seancfoley', name: 'ipaddress', version: '5.3.3'

testImplementation 'net.sourceforge.jexcelapi:jxl:2.6.12'
def withoutJacksons = {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}

// This was reported here https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/3048
implementation(group: 'org.apache.commons', name: 'commons-lang3') {
// These will be dependencies packaged with the .jar
api group: 'com.jayway.jsonpath', name: 'json-path', version: '2.7.0'
api group: 'org.hdrhistogram', name: 'HdrHistogram', version: '2.1.9'
api group: 'org.apache.commons', name: 'commons-collections4', version: '4.2'
api group: 'org.apache.commons', name: 'commons-configuration2', version: '2.8.0', {
exclude module: "commons-lang3"
}
// We need to force this dependency's verion 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.12.0'
}
}
api group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
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
compileOnly group: 'org.neo4j', name: 'neo4j', version: neo4jVersionEffective
compileOnly group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
compileOnly group: 'org.apache.hadoop', name: 'hadoop-common', version: '3.3.2', withoutServers
compileOnly group: 'com.google.cloud', name: 'google-cloud-storage', version: '2.6.1'

testImplementation group: 'org.reflections', name: 'reflections', version: '0.9.12'
// These dependencies affect the tests only, they will not be packaged in the resulting .jar
testImplementation project(':test-utils')
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testImplementation group: 'org.neo4j.test', name: 'neo4j-harness', version: neo4jVersionEffective
testImplementation group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.2.22.v20170606'
testImplementation group: 'org.apache.derby', name: 'derby', version: '10.12.1.1'

testImplementation group: 'org.neo4j', name: 'neo4j-common', version: neo4jVersionEffective, classifier: "tests"
testImplementation group: 'org.neo4j.community', name: 'it-test-support', version: neo4jVersionEffective // , classifier: "tests"
testImplementation group: 'org.neo4j', name: 'log-test-utils', version: neo4jVersionEffective // , classifier: "tests"


testImplementation group: 'org.neo4j', name: 'neo4j-kernel', version: neo4jVersionEffective, classifier: "tests"
testImplementation group: 'org.neo4j', name: 'neo4j-io', version: neo4jVersionEffective, classifier: "tests"


def withoutServers = {
exclude group: 'org.eclipse.jetty'
exclude group: 'org.eclipse.jetty.aggregate'
exclude group: 'org.apache.hive', module: 'hive-service'
}

def withoutJacksons = {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}

compileOnly group: 'org.neo4j', name: 'neo4j', version: neo4jVersionEffective

testImplementation 'org.mock-server:mockserver-netty:5.6.0'
testImplementation 'org.mock-server:mockserver-client-java:5.6.0'

compileOnly group: 'com.amazonaws', name: 'aws-java-sdk-comprehend', version: '1.12.214' , withoutJacksons
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk-comprehend', version: '1.12.214' , withoutJacksons

testImplementation group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version: '1.9.7'
implementation group: 'com.opencsv', name: 'opencsv', version: '4.6'
compileOnly group: 'org.ow2.asm', name: 'asm', version: '5.0.2'

testImplementation group: 'org.apache.hive', name: 'hive-jdbc', version: '1.2.2', withoutServers

compileOnly group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: '3.3.2', withoutServers
compileOnly group: 'org.apache.hadoop', name: 'hadoop-common', version: '3.3.2', withoutServers

implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
//compileOnly group: 'org.apache.commons', name: 'commons-text', version: '1.7'
// jmh group: 'org.neo4j', name: 'neo4j-lucene-index', version: neo4jVersionEffective
// jmh group: 'org.neo4j', name: 'neo4j-kernel', version: neo4jVersionEffective, classifier: "tests"

testImplementation group: 'org.xmlunit', name: 'xmlunit-core', version: '2.2.1'
testImplementation group: 'com.github.adejanovski', name: 'cassandra-jdbc-wrapper', version: '3.1.0'

testImplementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-csv', version: '2.13.2'
testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.0'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.13.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.2.0'

compileOnly group: 'com.google.cloud', name: 'google-cloud-storage', version: '2.6.1'
testImplementation group: 'com.google.cloud', name: 'google-cloud-storage', version: '2.6.1', {
exclude group: 'com.google.guava', module: 'guava'
}

implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'

implementation group: 'org.apache.arrow', name: 'arrow-vector', version: '7.0.0', {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
exclude group: 'io.netty', module: 'netty-common'
}
implementation group: 'org.apache.arrow', name: 'arrow-memory-netty', version: '7.0.0', {
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'io.netty', module: 'netty-common'
exclude group: 'io.netty', module: 'netty-buffer'
}
testImplementation group: 'org.apache.arrow', name: 'arrow-vector', version: '7.0.0'
testImplementation group: 'org.apache.arrow', name: 'arrow-memory-netty', version: '7.0.0'

configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-nop'
exclude group: 'ch.qos.logback', module: 'logback-classic'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package apoc.convert.utils;
package apoc.convert;

import org.neo4j.internal.helpers.collection.Iterators;

Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/apoc/trigger/TriggerMetadata.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package apoc.trigger;

import apoc.convert.utils.ConvertUtils;
import apoc.convert.ConvertUtils;
import apoc.result.VirtualNode;
import apoc.result.VirtualRelationship;
import apoc.util.Util;
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/apoc/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import apoc.ApocConfig;
import apoc.Pools;
import apoc.convert.utils.ConvertUtils;
import apoc.convert.ConvertUtils;
import apoc.export.util.CountingInputStream;
import apoc.export.util.ExportConfig;
import apoc.result.VirtualNode;
Expand Down
103 changes: 17 additions & 86 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id 'java'
id 'maven-publish'
id 'antlr'
id "org.sonarqube"
id "com.diffplug.spotless" version "6.7.2"
}

Expand Down Expand Up @@ -45,62 +44,15 @@ generateGrammarSource {
}

dependencies {
implementation project(":common")
testImplementation project(":common").sourceSets.test.output
testImplementation project(':test-utils')

apt project(':processor')

apt group: 'org.neo4j', name: 'neo4j', version: neo4jVersionEffective
implementation group: 'commons-codec', name: 'commons-codec', version: '1.14'
implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.7.0'
implementation group: 'net.minidev', name: 'json-smart', version: '2.4.8'
implementation group: 'org.hdrhistogram', name: 'HdrHistogram', version: '2.1.9'

antlr "org.antlr:antlr4:4.7.2", {
exclude group: 'org.glassfish'
exclude group: 'com.ibm.icu'
exclude group: 'org.abego.treelayout'
}

implementation group: 'org.roaringbitmap', name: 'RoaringBitmap', version: '0.7.17'
implementation(group: 'org.apache.commons', name: 'commons-configuration2', version: '2.8.0') {
exclude group: "org.yaml"
exclude module: "snakeyaml"
exclude module: "commons-lang3"
}
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.26'
testImplementation group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
implementation group: 'com.github.seancfoley', name: 'ipaddress', version: '5.3.3'

testImplementation 'net.sourceforge.jexcelapi:jxl:2.6.12'

// This was reported here https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/3048
implementation(group: 'org.apache.commons', name: 'commons-lang3') {
version {
strictly '3.12.0'
}
}

compileOnly group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'

testImplementation group: 'org.reflections', name: 'reflections', version: '0.9.12'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testImplementation group: 'org.neo4j.test', name: 'neo4j-harness', version: neo4jVersionEffective
testImplementation group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.2.22.v20170606'
testImplementation group: 'org.apache.derby', name: 'derby', version: '10.12.1.1'

testImplementation group: 'org.neo4j', name: 'neo4j-common', version: neo4jVersionEffective, classifier: "tests"
testImplementation group: 'org.neo4j.community', name: 'it-test-support', version: neo4jVersionEffective // , classifier: "tests"
testImplementation group: 'org.neo4j', name: 'log-test-utils', version: neo4jVersionEffective // , classifier: "tests"


testImplementation group: 'org.neo4j', name: 'neo4j-kernel', version: neo4jVersionEffective, classifier: "tests"
testImplementation group: 'org.neo4j', name: 'neo4j-io', version: neo4jVersionEffective, classifier: "tests"


def withoutServers = {
exclude group: 'org.eclipse.jetty'
exclude group: 'org.eclipse.jetty.aggregate'
Expand All @@ -112,52 +64,31 @@ dependencies {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}

compileOnly group: 'org.neo4j', name: 'neo4j', version: neo4jVersionEffective

testImplementation 'org.mock-server:mockserver-netty:5.6.0'
testImplementation 'org.mock-server:mockserver-client-java:5.6.0'

compileOnly group: 'com.amazonaws', name: 'aws-java-sdk-comprehend', version: '1.12.214' , withoutJacksons
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk-comprehend', version: '1.12.214' , withoutJacksons

testImplementation group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version: '1.9.7'
// These will be dependencies packaged with the .jar
implementation project(":common")
implementation group: 'com.opencsv', name: 'opencsv', version: '4.6'
compileOnly group: 'org.ow2.asm', name: 'asm', version: '5.0.2'

testImplementation group: 'org.apache.hive', name: 'hive-jdbc', version: '1.2.2', withoutServers

compileOnly group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: '3.3.2', withoutServers
compileOnly group: 'org.apache.hadoop', name: 'hadoop-common', version: '3.3.2', withoutServers

implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
testImplementation group: 'org.xmlunit', name: 'xmlunit-core', version: '2.2.1'
testImplementation group: 'com.github.adejanovski', name: 'cassandra-jdbc-wrapper', version: '3.1.0'

testImplementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-csv', version: '2.13.2'
testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.0'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.13.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.2.0'

compileOnly group: 'com.google.cloud', name: 'google-cloud-storage', version: '2.6.1'
testImplementation group: 'com.google.cloud', name: 'google-cloud-storage', version: '2.6.1', {
exclude group: 'com.google.guava', module: 'guava'
}

implementation group: 'org.roaringbitmap', name: 'RoaringBitmap', version: '0.7.17'
implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'

implementation group: 'org.apache.arrow', name: 'arrow-vector', version: '7.0.0', {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
exclude group: 'io.netty', module: 'netty-common'
}
implementation group: 'org.apache.arrow', name: 'arrow-memory-netty', version: '7.0.0', {
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'io.netty', module: 'netty-common'
exclude group: 'io.netty', module: 'netty-buffer'
}
testImplementation group: 'org.apache.arrow', name: 'arrow-vector', version: '7.0.0'
testImplementation group: 'org.apache.arrow', name: 'arrow-memory-netty', version: '7.0.0'

// 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.neo4j', name: 'neo4j', version: neo4jVersionEffective

// These dependencies affect the tests only, they will not be packaged in the resulting .jar
testImplementation project(":common").sourceSets.test.output
testImplementation project(':test-utils')
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
testImplementation group: 'org.mock-server', name: 'mockserver-netty', version: '5.6.0'
testImplementation group: 'com.github.adejanovski', name: 'cassandra-jdbc-wrapper', version: '3.1.0'
testImplementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-csv', version: '2.13.2'

configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-nop'
Expand Down
1 change: 0 additions & 1 deletion core/src/main/java/apoc/convert/Convert.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package apoc.convert;

import apoc.coll.SetBackedList;
import apoc.convert.utils.ConvertUtils;
import apoc.meta.Types;
import apoc.util.Util;
import org.neo4j.graphdb.Entity;
Expand Down
1 change: 0 additions & 1 deletion core/src/main/java/apoc/convert/Json.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package apoc.convert;

import apoc.convert.utils.ConvertUtils;
import apoc.meta.Types;
import apoc.result.MapResult;
import apoc.util.JsonUtil;
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/apoc/load/LoadJson.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
import java.util.Map;
import java.util.stream.Stream;

import static apoc.load.LoadJsonUtils.loadJsonStream;import static apoc.util.CompressionConfig.COMPRESSION;
import static apoc.load.LoadJsonUtils.loadJsonStream;
import static apoc.util.CompressionConfig.COMPRESSION;

public class LoadJson {

Expand Down

0 comments on commit 4899849

Please sign in to comment.