Skip to content

Commit

Permalink
Package jar via shadow plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
InverseIntegral committed Oct 31, 2023
1 parent 27c7450 commit 1a743f7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ Required Software:
- The graph database you want to test ([Neo4J](https://neo4j.com/) and [JanusGraph](https://janusgraph.org/) are both embedded into the JAR for ease of use)
- We recommend testing [RedisGraph](https://redis.io/docs/stack/graph/) via a Docker container

The following commands clone the repository, build a JAR file and start GDBLancer:
```
git clone https://github.com/InverseIntegral/gdbmeter.git
cd gdbmeter
./gradlew clean assemble
The following commands clone the repository, build a JAR file and start GDBMeter:

```shell
./gradlew clean shadowJar
cd build/libs
java -jar gdbmeter-*.jar -db neo4j -o partition
java -jar gdbmeter-*.jar -db neo4j -o partition -v
```
This will run GDBMeter until a bug has been found.

When running GDBMeter in verbose mode (`-v`) the queries that were executed are printed periodically.
If GDBMeter does not find any bugs, it executes infinitely. To see all available options one can use the `-h` option.

## Testing Approach

Expand All @@ -41,6 +42,12 @@ approach has been successfully applied to SQL databases and has been termed [Ter
| [RedisGraph](https://github.com/RedisGraph/RedisGraph) | 2.8.13 | Working | This implementation is based on the common Cypher logic. Running this implementation will most likely uncover more unreported logic bugs. |
| [JanusGraph](https://github.com/JanusGraph/janusgraph) | 0.6.2 | Working | Supports a (small) subset of the Gremlin query language. Currently, only the inmemory version with the lucene index backend are tested. |

To test the RedisGraph database, an external server has to be started. To do this we recommend the following docker command which starts the server in the appropriate version:

```shell
docker run -p 6379:6379 -it --rm redis/redis-stack-server:6.2.2-v5
```

## Using GDBMeter

### Logs
Expand Down
17 changes: 9 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer

plugins {
java
`java-library`
application

id("com.github.johnrengelman.shadow") version ("8.1.1")
}

group = "ch.ethz.ast"
Expand Down Expand Up @@ -33,15 +38,11 @@ application {
mainClass.set("ch.ethz.ast.gdbmeter.Main")
}

tasks.withType<Jar> {
tasks.withType<ShadowJar> {
mergeServiceFiles()
manifest { attributes(mapOf("Main-Class" to application.mainClass)) }
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })

// Exclude other META-INFs
exclude("META-INF/*.RSA")
exclude("META-INF/*.SF")
exclude("META-INF/*.DSA")
transform(Log4j2PluginsCacheFileTransformer::class.java)
isZip64 = true
}

tasks.test {
Expand Down

0 comments on commit 1a743f7

Please sign in to comment.