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

Java 9 dependencies, Gradle build example and Kotlin usage example #867

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<img src="https://raw.githubusercontent.com/jankotek/mapdb-site/gh-pages/images/art/rocket-small.png" width=90 height=90 align="left"/>

MapDB: database engine
=======================
# MapDB: database engine

[![Build Status](https://travis-ci.org/jankotek/mapdb.svg?branch=master)](https://travis-ci.org/jankotek/mapdb)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.mapdb/mapdb/badge.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.mapdb%22%20AND%20a%3Amapdb)
[![Join the chat at https://gitter.im/jankotek/mapdb](https://badges.gitter.im/jankotek/mapdb.svg)](https://gitter.im/jankotek/mapdb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Expand All @@ -16,8 +16,9 @@ It is free under Apache 2 license. MapDB is flexible and can be used in many rol
* RDBMs replacement with transactions, MVCC, incremental backups etc…
* Local data processing and filtering. MapDB has utilities to process huge quantities of data in reasonable time.

Hello world
-------------------
## Dependency

### Maven

Maven snippet, VERSION is [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.mapdb/mapdb/badge.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.mapdb%22%20AND%20a%3Amapdb)

Expand All @@ -29,26 +30,45 @@ Maven snippet, VERSION is [![Maven Central](https://maven-badges.herokuapp.com/m
</dependency>
```

Hello world:
### Gradle

Gradle snippet, VERSION is [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.mapdb/mapdb/badge.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.mapdb%22%20AND%20a%3Amapdb)

```groovy
compile "org.mapdb:mapdb:VERSION"
```

## Hello World

### Java

```java
//import org.mapdb.*
DB db = DBMaker.memoryDB().make();
ConcurrentMap map = db.hashMap("map").make();
ConcurrentMap map = db.hashMap("map").createOrOpen();
map.put("something", "here");
```

### Kotlin

```kotlin
//import org.mapdb.*
val db = DBMaker.memoryDB().make()
val map = db.hashMap("map").createOrOpen() as HTreeMap<String, String>
map["something"] = "here"
```

## Documentation

You can continue with [quick start](https://jankotek.gitbooks.io/mapdb/content/quick-start/) or refer to the [documentation](https://jankotek.gitbooks.io/mapdb/).

Support
------------
## Support

More [details](http://www.mapdb.org/support/).

Development
--------------------
## Development

MapDB is written in Kotlin. You will need IntelliJ Idea 15 and newer to edit it.
MapDB is written in Kotlin. You will need IntelliJ Idea 15 or newer to edit it.

You can use Maven to build MapDB by issuing command `mvn install`.

Expand Down
26 changes: 23 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
</scm>

<properties>
<kotlin.version>1.2.0</kotlin.version>
<kotlin.plugin.version>1.2.0</kotlin.plugin.version>
<kotlin.version>1.2.30</kotlin.version>
<kotlin.plugin.version>1.2.31</kotlin.plugin.version>

<java.target.version>1.8</java.target.version>
<java.source.version>1.8</java.source.version>
Expand All @@ -56,7 +56,7 @@
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>

Expand Down Expand Up @@ -338,6 +338,26 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jdeps-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<goals>
<goal>jdkinternals</goal>
<goal>test-jdkinternals</goal>
</goals>
</execution>
</executions>
<configuration>
<dotOutput>target/jdeps</dotOutput>
<failOnWarning>false</failOnWarning>
<recursive>true</recursive>
<verbose>true</verbose>
</configuration>
</plugin>

</plugins>

</build>
Expand Down