All Projects → sourcemuse → GradleMongoPlugin

sourcemuse / GradleMongoPlugin

Licence: other
Gradle plugin for running a managed instance of Mongo.

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to GradleMongoPlugin

Versionberg
Gradle plugin for versioning your library/application on every git commit
Stars: ✭ 78 (+62.5%)
Mutual labels:  gradle-plugin
dmn-check
A tool which performs static analyses on Decision Model Notation (DMN) files to detect bugs
Stars: ✭ 34 (-29.17%)
Mutual labels:  gradle-plugin
kmp-fatframework-cocoa
A Gradle plugin to generate and publish an iOs FatFramework or XCFramework on Kotlin Multiplatform projects.
Stars: ✭ 26 (-45.83%)
Mutual labels:  gradle-plugin
pymongo inmemory
A mongo mocking library with an ephemeral MongoDB running in memory.
Stars: ✭ 25 (-47.92%)
Mutual labels:  mongo
mango
Use mongo-go-driver like mgo
Stars: ✭ 37 (-22.92%)
Mutual labels:  mongo
Registration-and-Login-using-MERN-stack
Simple Registration and Login component with MERN stack
Stars: ✭ 210 (+337.5%)
Mutual labels:  mongo
flatbson
Recursively flatten a Go struct using its BSON tags
Stars: ✭ 54 (+12.5%)
Mutual labels:  mongo
gradle-j2cl-plugin
Gradle J2CL Plugin
Stars: ✭ 18 (-62.5%)
Mutual labels:  gradle-plugin
derivejs
DeriveJS is a reactive ODM - Object Document Mapper - framework, a "wrapper" around a database, that removes all the hassle of data-persistence by handling it transparently in the background, in a DRY manner.
Stars: ✭ 54 (+12.5%)
Mutual labels:  mongo
koa-session-mongoose
Mongoose store for Koa sessions
Stars: ✭ 29 (-39.58%)
Mutual labels:  mongo
kuberig
Deploy to Kubernetes/OpenShift by leveraging your developer skills - no yaml required!
Stars: ✭ 31 (-35.42%)
Mutual labels:  gradle-plugin
sql2mongo
Use SQL to query MongoDB
Stars: ✭ 14 (-70.83%)
Mutual labels:  mongo
tutorials
Collection of tutorials for various libraries and technologies
Stars: ✭ 98 (+104.17%)
Mutual labels:  mongo
gradle-grammar-kit-plugin
Gradle plugin for generating lexers (with JFlex) and BNF parsers (with Grammar-Kit) for IntelliJ language plugins
Stars: ✭ 76 (+58.33%)
Mutual labels:  gradle-plugin
mongo-playground
Helps developers run mongo queries
Stars: ✭ 16 (-66.67%)
Mutual labels:  mongo
gradle-android-git
Gradle plugin for Android apps to manage Git dependency (gag)
Stars: ✭ 22 (-54.17%)
Mutual labels:  gradle-plugin
gradle-semantic-build-versioning
Gradle plugin to generate version-numbers and tags using semantic versioning
Stars: ✭ 19 (-60.42%)
Mutual labels:  gradle-plugin
gradle-plugin-starter
Gradle plugin template project
Stars: ✭ 34 (-29.17%)
Mutual labels:  gradle-plugin
gradle-cpd-plugin
Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD).
Stars: ✭ 88 (+83.33%)
Mutual labels:  gradle-plugin
TinyPngPlugin
TinyPng gradle plugin for android
Stars: ✭ 240 (+400%)
Mutual labels:  gradle-plugin

Gradle Mongo Plugin

Maven Central Build Status

The Gradle Mongo Plugin allows you to run a managed instance of Mongo from your gradle build.

It's available on both Maven Central and the Gradle Plugin Portal.

Usage

Enable the plugin in your gradle build:

plugins {
  id 'com.sourcemuse.mongo' version '2.0.0'
}

Hey presto, you can now declare a dependency on a running mongo instance from any of your tasks:

task integrationTest(type: Test) {
    runWithMongoDb = true
}

Configuration

Configure your Mongo instances inside a mongo block:

mongo {
    port 12345
    logging 'console'
    ...
}

The mongo configuration block can be declared at either the project or the task level. Task-level configuration inherits from any project-level configuration provided.

The following properties are configurable:

  • args: A <String,String> map of mongod command-line options (value can be empty for arguments without values) (defaults to [:])
  • artifactStorePath The location where Mongo will be downloaded to
  • auth: Enables access control (defaults to false)
  • bindIp: The ip address Mongo binds itself to (defaults to '127.0.0.1')
  • downloadUrl: The URL from where Mongo will be downloaded
  • journalingEnabled: Toggles journaling (defaults to false)
  • logFilePath: The desired log file path (defaults to 'embedded-mongo.log')
  • logging: The type of logging to be produced: 'console', 'file' or 'none' (defaults to 'file')
  • mongodVerbosity: The verbosity level of the mongod process. Supported options are as per the mongod configuration documentation (default level is non-verbose)
  • mongoVersion: The version of Mongo to run. Can be 'DEVELOPMENT' or 'PRODUCTION' for the latest versions of the respective branch, or take the form '1.2-LATEST' or '1.2.3' for specific versions
  • params: A <String,String> map of MongoDB Server Parameters (defaults to [:])
  • port: The port Mongo will listen on (defaults to 27017). For random port assignment, set this value to 'RANDOM' (the actual port value used will be available during the build through the project.mongo.port property)
  • proxyHost: The proxy host name for Mongo downloads
  • proxyPort: The proxy port for Mongo downloads
  • storageEngine: The name of the storage engine to use. Can be 'wiredTiger' or 'mmapv1' for MongoDB Community Edition (default is 'wiredTiger' for Mongo 3.2 and later; otherwise it is 'mmapv1'). Alternative distributions might support additional engines
  • storageLocation: The directory location from where embedded Mongo will run, such as /tmp/storage (defaults to a java temp directory)
  • syncDelay: The interval in seconds between fsync operations where mongod flushes its working memory to disk. See syncdelay parameter for more information

Tasks

For your convenience the plugin also adds the following tasks to your buildscript:

$ gradle tasks
...
Mongo tasks
-----------
startManagedMongoDb - Starts a local MongoDb instance which will stop when the build process completes
startMongoDb - Starts a local MongoDb instance
stopMongoDb - Stops the local MongoDb instance
...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].