-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5333db1
commit c936dff
Showing
16 changed files
with
822 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Set root logger level to DEBUG and its only appender to A1. | ||
log4j.rootLogger=INFO, A1 | ||
# A1 is set to be a ConsoleAppender. | ||
log4j.appender.A1=org.apache.log4j.ConsoleAppender | ||
# A1 uses PatternLayout. | ||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout | ||
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
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"> | ||
<parent> | ||
<artifactId>framework-tools-test</artifactId> | ||
<groupId>uk.gov.justice</groupId> | ||
<version>2.1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>uk.gov.justice.framework.tools</groupId> | ||
<artifactId>framework-tools-test-listener</artifactId> | ||
<version>1.0.0</version> | ||
|
||
<packaging>war</packaging> | ||
|
||
<properties> | ||
<cpp.service-component>EVENT_LISTENER</cpp.service-component> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>uk.gov.justice.services</groupId> | ||
<artifactId>event-listener</artifactId> | ||
<version>${framework.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax</groupId> | ||
<artifactId>javaee-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
20 changes: 20 additions & 0 deletions
20
...ner/src/main/java/uk/gov/justice/framework/tools/listener/FrameworkToolsTestListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package uk.gov.justice.framework.tools.listener; | ||
|
||
import uk.gov.justice.services.core.annotation.Component; | ||
import uk.gov.justice.services.core.annotation.Handles; | ||
import uk.gov.justice.services.core.annotation.ServiceComponent; | ||
import uk.gov.justice.services.messaging.JsonEnvelope; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
@ServiceComponent(value = Component.EVENT_LISTENER) | ||
public class FrameworkToolsTestListener { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(FrameworkToolsTestListener.class); | ||
|
||
@Handles("framework.example-test") | ||
public void handle(final JsonEnvelope envelope) { | ||
logger.info("caught a fish!"); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...tools-test/framework-event-listener/src/main/raml/framework-event-listener.messaging.raml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#%RAML 0.8 | ||
title: API Using media type in the URL | ||
baseUri: message://event/listener/message/cakeshop | ||
version: v1 | ||
/example.event: | ||
post: | ||
body: | ||
application/vnd.framework.example-test+json: | ||
schema: !include json/schema/framework.example-test.json | ||
example: !include json/framework.example-test.json |
3 changes: 3 additions & 0 deletions
3
framework-tools-test/framework-event-listener/src/main/raml/json/framework.example-test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"test":"test" | ||
} |
9 changes: 9 additions & 0 deletions
9
...tools-test/framework-event-listener/src/main/raml/json/schema/framework.example-test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"test": { | ||
"type": "string" | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
framework-tools-test/framework-event-listener/src/main/resources/META-INF/beans.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- Marker file indicating CDI should be enabled --> | ||
|
||
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://xmlns.jcp.org/xml/ns/javaee" | ||
xsi:schemaLocation=" | ||
http://xmlns.jcp.org/xml/ns/javaee | ||
http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd" bean-discovery-mode="all"> | ||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
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"> | ||
<parent> | ||
<artifactId>framework-tools-test</artifactId> | ||
<groupId>uk.gov.justice</groupId> | ||
<version>2.1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>framework-tools-it</artifactId> | ||
|
||
<dependencies> | ||
<!--<dependency>--> | ||
<!--<groupId>org.wildfly.swarm</groupId>--> | ||
<!--<artifactId>h2</artifactId>--> | ||
<!--<version>2016.10.0</version>--> | ||
<!--</dependency>--> | ||
<dependency> | ||
<groupId>com.h2database</groupId> | ||
<artifactId>h2</artifactId> | ||
<scope>test</scope> | ||
<version>1.4.187</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>uk.gov.justice.utils</groupId> | ||
<artifactId>test-utils-core</artifactId> | ||
<version>${test.utils.core.version}</version> | ||
<scope>test</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>com.h2database</groupId> | ||
<artifactId>h2</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-library</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>uk.gov.justice.services</groupId> | ||
<artifactId>framework-api-messaging</artifactId> | ||
<version>${framework.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>uk.gov.justice.services</groupId> | ||
<artifactId>test-utils-core</artifactId> | ||
<version>${framework.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>uk.gov.justice.services</groupId> | ||
<artifactId>event-repository-liquibase</artifactId> | ||
<version>${framework.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>uk.gov.justice.services</groupId> | ||
<artifactId>aggregate-snapshot-repository-liquibase</artifactId> | ||
<version>${framework.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>uk.gov.justice.services</groupId> | ||
<artifactId>event-buffer-liquibase</artifactId> | ||
<version>${framework.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>uk.gov.justice.utils</groupId> | ||
<artifactId>test-utils-logging-simple</artifactId> | ||
<type>pom</type> | ||
<scope>test</scope> | ||
<version>1.5.0</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.edugility</groupId> | ||
<artifactId>h2-maven-plugin</artifactId> | ||
<configuration> | ||
<port>8092</port> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>Spawn a new H2 TCP server</id> | ||
<phase>pre-integration-test</phase> | ||
<goals> | ||
<goal>spawn</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>Stop a spawned H2 TCP server</id> | ||
<phase>post-integration-test</phase> | ||
<goals> | ||
<goal>stop</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.h2database</groupId> | ||
<artifactId>h2</artifactId> | ||
<version>1.4.187</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy</id> | ||
<phase>generate-test-sources</phase> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>uk.gov.justice.framework.tools</groupId> | ||
<artifactId>framework-tools-test-listener</artifactId> | ||
<version>1.0.0</version> | ||
<type>war</type> | ||
<overWrite>true</overWrite> | ||
<outputDirectory>${project.basedir}/target/test-classes</outputDirectory> | ||
</artifactItem> | ||
<artifactItem> | ||
<artifactId>framework-tools</artifactId> | ||
<groupId>uk.gov.justice</groupId> | ||
<version>${project.version}</version> | ||
<artifactId>framework-tools-replay</artifactId> | ||
<type>jar</type> | ||
<classifier>swarm</classifier> | ||
<overWrite>true</overWrite> | ||
<outputDirectory>${project.basedir}/target/test-classes</outputDirectory> | ||
</artifactItem> | ||
</artifactItems> | ||
<!--<outputDirectory>${project.build.directory}/wars</outputDirectory>--> | ||
<overWriteReleases>false</overWriteReleases> | ||
<overWriteSnapshots>true</overWriteSnapshots> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.