Skip to content

Commit

Permalink
Updated group ID and README with Maven central info
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocairone committed Sep 16, 2019
1 parent a1c46a0 commit 254ea68
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
39 changes: 33 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,63 @@
# TestContainers Mule Module

![Maven Central](https://img.shields.io/maven-central/v/com.mariocairone.mule/testcontainers-mule?style=flat-square) ![GitHub](https://img.shields.io/github/license/mariocairone/testcontainers-mule) ![GitHub issues](https://img.shields.io/github/issues/mariocairone/testcontainers-mule) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/mariocairone/testcontainers-mule?style=social)
## Docker Image

Mulesoft do not provide an official docker images for the mule runtime.

The module will use by default the docker image [mariocairone/mule-ee:latest](https://cloud.docker.com/repository/docker/mariocairone/mule-ee).

## Install the Module
## Setup

As a dependency of your Maven project:

To install the module in your local maven repository runt the following command
```xml
<dependency>
<groupId>com.mariocairone.mule</groupId>
<artifactId>testcontainers-mule</artifactId>
<version>1.0.0</version>
</dependency>
```

You can also build the `.jar` file yourself, assuming you have Maven and JDK 1.8+ installed:
```shell
mvn clean install
```

The resulting `.jar` file will be located in the `target/` folder.

You can also find `SNAPSHOT` builds of the latest and greatest changes to the master branch in the SonaType snapshots repository.

To add that snapshot repository to your Maven pom.xml use the following snippet:
```xml
<repositories>
<repository>
<id>oss-sonatype</id>
<name>oss-sonatype</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
```

## Usage Example

The example below shows how to use the module to create a mule container with a deployed application in a Junit test class.

```java

package com.mariocairone.testcontainers.mule;
package com.mariocairone.mule.testcontainers;

import org.junit.ClassRule;
import org.junit.BeforeClass;
import org.junit.Test;
import org.testcontainers.containers.wait.strategy.Wait;


public class MuleServerContainerTest {


@ClassRule
public static final MuleServerContainer mule = new MuleServerContainer()
.withDeployedApplications("target", "myApp*.zip")
.withExposedPorts(8081)
Expand All @@ -42,7 +70,6 @@ public class MuleServerContainerTest {

@BeforeClass
public static void init() {
mule.start();
mulePort = mule.getFirstMappedPort();
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mariocairone.testcontainers</groupId>
<groupId>com.mariocairone.mule</groupId>
<artifactId>testcontainers-mule</artifactId>
<version>1.0.0</version>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mariocairone.testcontainers.mule;
package com.mariocairone.mule.testcontainers;

import java.io.File;
import java.io.FileFilter;
Expand Down

0 comments on commit 254ea68

Please sign in to comment.