redis-maven-plugin Maven Plugin

Embedded Java implementation Redis server for development.

License

License

Categories

Categories

Maven Build Tools Redis Data Databases
GroupId

GroupId

org.kualigan.maven.plugins
ArtifactId

ArtifactId

redis-maven-plugin
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

redis-maven-plugin Maven Plugin
Embedded Java implementation Redis server for development.
Project URL

Project URL

http://r351574nc3.github.io/redis-maven-plugin
Project Organization

Project Organization

Github
Source Code Management

Source Code Management

https://github.com/r351574nc3/redis-maven-plugin

Download redis-maven-plugin

How to add to project

<plugin>
    <groupId>org.kualigan.maven.plugins</groupId>
    <artifactId>redis-maven-plugin</artifactId>
    <version>1.0.2</version>
</plugin>

Dependencies

compile (4)

Group / Artifact Type Version
com.github.spullara.redis : netty4-server jar 0.7
org.sonatype.aether : aether-api jar 1.13.1
org.apache.maven : maven-plugin-api jar 3.1.1
org.codehaus.plexus : plexus-utils jar 3.0.15

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

test (1)

Group / Artifact Type Version
junit : junit jar 4.8.2

Project Modules

There are no modules declared in this project.

redis-maven-plugin Build Status

Maven plugin to embed a redis-server based on the redis-protocol project. This is an in-memory redis server. That means that when the server shutsdown or closes, the data is no longer available.

Checkout the maven plugin page at [http://r351574nc3.github.io/redis-maven-plugin]

Running with Integration Tests

Just add the following plugin. The redis plugin is automatically attached to the pre-integration-test and post-integration-test phases.

<plugin>
    <groupId>org.kualigan.maven.plugins</groupId>
    <artifactId>redis-maven-plugin</artifactId>
    <version>${redis-maven-plugin.version}</version>
</plugin>

Attaching to Another Phase

In case (for whatever reason), you don't want your redis server started/stopped with integration tests, here's how you would configure it.

<plugin>
    <groupId>org.kualigan.maven.plugins</groupId>
    <artifactId>redis-maven-plugin</artifactId>
    <version>${redis-maven-plugin.version}</version>
    <executions>
        <execution>
            <id>start-redis</id>
            <phase>generate-resources</phase>
            <goals>
                <goal>start</goal>
            </goals>
        </execution>
        <execution>
            <id>stop-redis</id>
            <phase>compile</phase>
            <goals>
                <goal>stop</goal>
            </goals>
        </execution>      
    </executions>
</plugin>

Running Unforked

Sometimes there is a need to just crank up a redis server while you're running your project, but you're not running integration tests. For example, maybe you're running a tomcat7 instance of your application that requires an embedded redis server. We can do that! Or maybe you just need a quick redis server for whatever.

Add the following to your $HOME/.m2/settings.xml

<settings>
    <pluginGroups>
        <pluginGroup>org.kualigan.maven.plugins</pluginGroup>
    </pluginGroups>
...
...
</settings>

Execute the following

mvn redis-server:start-no-fork

SNAPSHOTS

The latest snapshots can be found at [https://oss.sonatype.org/content/repositories/snapshots/org/kualigan/maven/plugins/redis-maven-plugin/] (Sonatype Nexus SNAPSHOTS)

<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-16006964-5', 'auto'); ga('send', 'pageview'); </script>

Versions

Version
1.0.2
1.0.1
0.1.20
0.1.18
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12