Skip to content

Commit

Permalink
clean maven deps to solve spring conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
qishipengqsp authored and tugraph committed May 19, 2023
1 parent b5138d8 commit a5757fd
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 110 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ devenv.local
.vscode/
build.log
*.flattened-pom.xml
dependencies.txt
*/dependencies.txt
*/*/dependencies.txt
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tugraph-client-java
# TuGraph Java Client

This repo is a Java client for developers to connect to TuGraph.

Expand Down Expand Up @@ -41,20 +41,18 @@ If you are using Maven to manage the dependency in your Java project, you can ad
</dependency>
```

### Usage

#### Java client usage
### Java client usage

Please refer to the code example:

[Java Client Test](rpc-client-test/src/main/java/com/antgroup/tugraph/TuGraphDbRpcClientTest.java)

#### OGM usage
### OGM usage

Please refer to the code example:
[OGM Test](ogm/tugraph-db-ogm-test/src/main/java/test/TestBase.java)

#### OGM API Reference
### OGM API Reference

| Feature | API |
|----------------------------------------|----------------------------------------------------------------------------------|
Expand All @@ -71,6 +69,13 @@ Please refer to the code example:
| Cypher query | Result query(String cypher, Map<String, ?> parameters) |


## FAQ

### Upgrade the version

Revision feature is used in this project to keep all the versions in submodules consistent.
If you want to upgrade the version, e.g. for SNAPSHOT version, just set the `${revision}` property instead of using `mvn version:set`.

## Version Map

| Client Version | TuGraph Version |
Expand Down
6 changes: 0 additions & 6 deletions ogm/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@
<artifactId>assertj-core</artifactId>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
Expand Down
6 changes: 0 additions & 6 deletions ogm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down
13 changes: 0 additions & 13 deletions ogm/tugraph-db-ogm-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@
<scope>compile</scope>
<version>3.20.2</version>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
15 changes: 0 additions & 15 deletions ogm/tugraph-db-rpc-driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,9 @@
<artifactId>neo4j-java-driver</artifactId>
<version>4.4.5</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.antgroup.tugraph</groupId>
<artifactId>tugraph-db-java-rpc-client</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.8</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@
package com.antgroup.tugraph.ogm.drivers.rpc.response;

import com.antgroup.tugraph.ogm.response.model.QueryStatisticsModel;
import com.fasterxml.jackson.databind.ObjectMapper;

import com.antgroup.tugraph.ogm.config.ObjectMapperFactory;
import com.antgroup.tugraph.ogm.result.adapter.ResultAdapter;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StatisticsModelAdapter implements ResultAdapter<String, QueryStatisticsModel> {
protected static final ObjectMapper mapper = ObjectMapperFactory.objectMapper();

public Integer[] mappingStats(Integer[] stats, String result) {
for (int i = 0; i < stats.length; i++) {
stats[i] = 0;
Expand Down
27 changes: 0 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,6 @@
<artifactId>brpc-java</artifactId>
<version>2.5.9</version>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-java-naming-zookeeper</artifactId>
<version>2.5.9</version>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-java-naming-consul</artifactId>
<version>2.5.9</version>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-spring</artifactId>
<version>2.5.9</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
Expand Down Expand Up @@ -392,17 +377,5 @@
<groupId>com.baidu</groupId>
<artifactId>brpc-java</artifactId>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-spring</artifactId>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-java-naming-zookeeper</artifactId>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-java-naming-consul</artifactId>
</dependency>
</dependencies>
</project>
32 changes: 0 additions & 32 deletions rpc-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,43 +82,11 @@
<groupId>com.baidu</groupId>
<artifactId>brpc-java</artifactId>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-spring</artifactId>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-java-naming-zookeeper</artifactId>
</dependency>
<dependency>
<groupId>com.baidu</groupId>
<artifactId>brpc-java-naming-consul</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
Expand Down

0 comments on commit a5757fd

Please sign in to comment.