Moco Maven Plugin

A maven plugin for managing a Moco stub server.

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка
Группа

Группа

com.garrettheel
Идентификатор

Идентификатор

moco-maven-plugin
Последняя версия

Последняя версия

0.9.3
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

Moco Maven Plugin
A maven plugin for managing a Moco stub server.
Ссылка на сайт

Ссылка на сайт

https://github.com/GarrettHeel/moco-maven-plugin
Система контроля версий

Система контроля версий

http://github.com/GarrettHeel/moco-maven-plugin.git

Скачать moco-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.garrettheel</groupId>
    <artifactId>moco-maven-plugin</artifactId>
    <version>0.9.3</version>
</plugin>

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 2.2.1
com.github.dreamhead : moco-runner jar [0.9.2,0.9.9)
org.apache.httpcomponents : fluent-hc jar 4.3.6

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

test (2)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 1.3
junit : junit jar 4.8.1

Модули Проекта

Данный проект не имеет модулей.

Overview

This is a simple Maven plugin for managing a [Moco] (https://github.com/dreamhead/moco) server. It can be used to consistently run a Moco server on demand or to automatically launch the server during some part of the Maven lifecycle (such as integration-test).

Build Status

Usage

To get started, add the plugin to your pom.xml.

<plugin>
    <groupId>com.garrettheel</groupId>
    <artifactId>moco-maven-plugin</artifactId>
    <version>0.9.3</version>
    <configuration>
        <port>8081</port>
        <configFile>config.json</configFile>
    </configuration>
</plugin>

You may also need to add the Sonatype repository, depending on your environment.

<pluginRepositories>
    <pluginRepository>
        <id>sonatype</id>
        <url>https://oss.sonatype.org/content/repositories/public/</url>
    </pluginRepository>
</pluginRepositories>

Running manually

Starting the server manually is easy! Simply run the following command:

mvn com.garrettheel:moco-maven-plugin:run

This will run the the server indefinitely until the process is terminated.

Running during the maven lifecycle

You can also configure maven to start and stop the Moco server during the build lifecycle. For example, the following configuration would support using the server for integration testing:

<plugin>
    <groupId>com.garrettheel</groupId>
    <!-- ... -->
    <executions>
        <execution>
            <id>start-moco</id>
            <phase>pre-integration-test</phase>
            <goals>
                <goal>start</goal>
            </goals>
        </execution>
        <execution>
            <id>stop-moco</id>
            <phase>post-integration-test</phase>
            <goals>
                <goal>stop</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Версии библиотеки

Версия
0.9.3
0.9.2
0.9
0.8.0