Skip to content

Commit

Permalink
Release v4.0.0
Browse files Browse the repository at this point in the history
- Java 17
- Apache Camel 4.1.0
- ActiveMQ Artemis 2.31.0
- Cucumber 7.14.0
- Knative Client 6.9.0
- Netty 4.1.100.Final
- SLF4J 2.0.9
- SnakeYAML 2.2
- Spring Framework 6.0.13
- Testcontainers 1.19.1
- PostrgeSQL 42.6.0
  • Loading branch information
christophd committed Oct 25, 2023
1 parent d23642b commit cb18802
Show file tree
Hide file tree
Showing 452 changed files with 4,522 additions and 9,794 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up JDK 11
uses: AdoptOpenJDK/install-jdk@v1
- name: Set up JDK
uses: actions/setup-java@v3
with:
version: "11"
java-version: '17'
distribution: 'temurin'
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down Expand Up @@ -90,7 +91,6 @@ jobs:
./mvnw --no-transfer-progress verify -Dsystem.under.test.mode=embedded -f samples-http
./mvnw --no-transfer-progress verify -Dsystem.under.test.mode=embedded -f samples-json
./mvnw --no-transfer-progress verify -Dsystem.under.test.mode=embedded -f samples-junit
./mvnw --no-transfer-progress verify -Dsystem.under.test.mode=embedded -f samples-remote
./mvnw --no-transfer-progress verify -Dsystem.under.test.mode=embedded -f samples-soap
./mvnw --no-transfer-progress verify -Dsystem.under.test.mode=embedded -f samples-testng
./mvnw --no-transfer-progress verify -Dsystem.under.test.mode=embedded -f samples-xml
Binary file modified .mvn/wrapper/maven-wrapper.jar
100755 → 100644
Binary file not shown.
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
5 changes: 2 additions & 3 deletions demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.consol.citrus.samples</groupId>
<groupId>org.citrusframework.samples</groupId>
<artifactId>citrus-sample-demo</artifactId>
<version>3.4.0</version>
<version>4.0.0</version>
<name>Citrus Samples:: Demos</name>
<packaging>pom</packaging>

Expand All @@ -14,6 +14,5 @@
<module>sample-greeting</module>
<module>sample-bookstore</module>
<module>sample-incident</module>
<module>sample-javaee</module>
</modules>
</project>
78 changes: 31 additions & 47 deletions demo/sample-bakery/integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

<parent>
<artifactId>citrus-sample-bakery</artifactId>
<groupId>com.consol.citrus.samples</groupId>
<version>3.4.0</version>
<groupId>org.citrusframework.samples</groupId>
<version>4.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -15,56 +15,70 @@

<properties>
<jetty.embedded.disabled>false</jetty.embedded.disabled>
<activemq.embedded.disabled>false</activemq.embedded.disabled>
<system.under.test.mode>embedded</system.under.test.mode>
</properties>

<dependencies>
<!-- Citrus -->
<dependency>
<groupId>com.consol.citrus</groupId>
<groupId>org.citrusframework</groupId>
<artifactId>citrus-base</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<groupId>org.citrusframework</groupId>
<artifactId>citrus-spring</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<groupId>org.citrusframework</groupId>
<artifactId>citrus-endpoint-catalog</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<groupId>org.citrusframework</groupId>
<artifactId>citrus-testng</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<groupId>org.citrusframework</groupId>
<artifactId>citrus-http</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<groupId>org.citrusframework</groupId>
<artifactId>citrus-jms</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<groupId>org.citrusframework</groupId>
<artifactId>citrus-mail</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<groupId>org.citrusframework</groupId>
<artifactId>citrus-validation-json</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<groupId>org.citrusframework</groupId>
<artifactId>citrus-validation-xml</artifactId>
</dependency>

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<artifactId>artemis-jakarta-client</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jakarta-server</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>src/jetty</directory>
<filtering>true</filtering>
<includes>
<include>jetty.xml</include>
</includes>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -90,44 +104,14 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<war>${pom.basedir}/src/jolokia/jolokia-war-1.3.1.war</war>
<webApp>
<contextPath>/jolokia</contextPath>
<tempDirectory>${project.build.directory}/tmp/jolokia</tempDirectory>
</webApp>
<httpConnector>
<port>${bakery.server.port}</port>
<port>8080</port>
<idleTimeout>60000</idleTimeout>
</httpConnector>
<!-- jetty.xml for using multiple ports inside of one jetty -->
<jettyXml>${pom.basedir}/src/jetty/jetty-embedded.xml</jettyXml>
<contextHandlers>
<contextHandler implementation="org.eclipse.jetty.maven.plugin.JettyWebAppContext">
<war>${settings.localRepository}/com/consol/citrus/samples/citrus-bakery-web/${project.version}/citrus-bakery-web-${project.version}.war</war>
<contextPath>/bakery</contextPath>
<tempDirectory>${project.build.directory}/tmp/bakery</tempDirectory>
</contextHandler>
<contextHandler implementation="org.eclipse.jetty.maven.plugin.JettyWebAppContext">
<war>${settings.localRepository}/com/consol/citrus/samples/citrus-bakery-report/${project.version}/citrus-bakery-report-${project.version}.war</war>
<contextPath>/report</contextPath>
<tempDirectory>${project.build.directory}/tmp/report</tempDirectory>
</contextHandler>
</contextHandlers>
<systemProperties>
<systemProperty>
<name>ACTIVEMQ_BROKER_PORT</name>
<value>${activemq.server.port}</value>
</systemProperty>
<systemProperty>
<name>REPORT_SERVER_PORT</name>
<value>${report.server.port}</value>
</systemProperty>
<systemProperty>
<name>MAIL_SERVER_PORT</name>
<value>${mail.server.port}</value>
</systemProperty>
</systemProperties>
<!-- jetty.xml for using multiple deployed wars in single jetty instance -->
<jettyXmls>${build.outputDirectory}/jetty.xml</jettyXmls>
</configuration>
</plugin>
</plugins>
Expand Down
Binary file not shown.
22 changes: 0 additions & 22 deletions demo/sample-bakery/integration/src/jetty/jetty-embedded.xml

This file was deleted.

56 changes: 56 additions & 0 deletions demo/sample-bakery/integration/src/jetty/jetty.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">

<Set name="connectors">
<Array type="org.eclipse.jetty.server.Connector">
<Item>
<New class="org.eclipse.jetty.server.ServerConnector">
<Arg>
<Ref refid="Server"/>
</Arg>
<Set name="port">18001</Set>
<Set name="name">BakeryServerConnector</Set>
</New>
</Item><Item>
<New class="org.eclipse.jetty.server.ServerConnector">
<Arg>
<Ref refid="Server"/>
</Arg>
<Set name="port">18002</Set>
<Set name="name">ReportServerConnector</Set>
</New>
</Item>
</Array>
</Set>

<Set name="handler">
<New class="org.eclipse.jetty.server.handler.HandlerCollection">
<Arg>
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
<Arg>
<Array type="org.eclipse.jetty.server.handler.ContextHandler">
<Item>
<New class="org.eclipse.jetty.maven.plugin.MavenWebAppContext">
<Set name="contextPath">/web</Set>
<Set name="war">${settings.localRepository}/org/citrusframework/samples/citrus-bakery-web/${project.version}/citrus-bakery-web-${project.version}.war</Set>
</New>
</Item>
<Item>
<New class="org.eclipse.jetty.maven.plugin.MavenWebAppContext">
<Set name="contextPath">/</Set>
<Set name="war">${settings.localRepository}/org/citrusframework/samples/citrus-bakery-report/${project.version}/citrus-bakery-report-${project.version}.war</Set>
</New>
</Item>
</Array>
</Arg>
</New>
</Item>
</Array>
</Arg>
</New>
</Set>

</Configure>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,33 @@

package com.consol.citrus.samples.bakery;

import javax.jms.ConnectionFactory;

import com.consol.citrus.dsl.endpoint.CitrusEndpoints;
import com.consol.citrus.http.client.HttpClient;
import com.consol.citrus.jms.endpoint.JmsEndpoint;
import com.consol.citrus.mail.server.MailServer;
import com.consol.citrus.report.MessageTracingTestListener;
import com.consol.citrus.variable.GlobalVariables;
import org.apache.activemq.ActiveMQConnectionFactory;
import java.util.Collections;

import jakarta.jms.ConnectionFactory;
import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration;
import org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ;
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule;
import org.citrusframework.dsl.endpoint.CitrusEndpoints;
import org.citrusframework.http.client.HttpClient;
import org.citrusframework.jms.endpoint.JmsEndpoint;
import org.citrusframework.mail.server.MailServer;
import org.citrusframework.report.MessageTracingTestListener;
import org.citrusframework.variable.GlobalVariables;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.PropertySource;
import org.springframework.http.HttpMethod;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.web.bind.annotation.RequestMethod;

/**
* @author Christoph Deppisch
*/
@ContextConfiguration
@PropertySource(value = "citrus.properties")
@PropertySource(value = "classpath:citrus.properties")
public class CitrusEndpointConfig {

@Value("${mail.server.port}")
Expand All @@ -62,18 +69,32 @@ public MessageTracingTestListener messageTracingTestListener() {
return new MessageTracingTestListener();
}

@Bean(initMethod = "start", destroyMethod = "stop")
public EmbeddedActiveMQ messageBroker(ActiveMQSecurityManager securityManager) {
EmbeddedActiveMQ broker = new EmbeddedActiveMQ();
broker.setSecurityManager(securityManager);
return broker;
}

@Bean
public ActiveMQSecurityManager securityManager() {
SecurityConfiguration securityConfiguration = new SecurityConfiguration(Collections.singletonMap("citrus", "citrus"),
Collections.singletonMap("citrus", Collections.singletonList("citrus")));
securityConfiguration.setDefaultUser("citrus");
return new ActiveMQJAASSecurityManager(InVMLoginModule.class.getName(), securityConfiguration);
}

@Bean
@DependsOn("messageBroker")
public ConnectionFactory connectionFactory() {
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(String.format("tcp://localhost:%s", activemqServerPort));
connectionFactory.setWatchTopicAdvisories(false);
return connectionFactory;
return new ActiveMQConnectionFactory(String.format("tcp://localhost:%s", activemqServerPort), "citrus", "citrus");
}

@Bean
public HttpClient bakeryClient() {
return CitrusEndpoints.http()
.client()
.requestUrl(String.format("http://localhost:%s/bakery/services", bakeryServerPort))
.requestUrl(String.format("http://localhost:%s/web/bakery/services", bakeryServerPort))
.build();
}

Expand All @@ -99,7 +120,7 @@ public JmsEndpoint unknownOrderEndpoint(ConnectionFactory connectionFactory) {
public HttpClient reportingClient() {
return CitrusEndpoints.http()
.client()
.requestMethod(HttpMethod.GET)
.requestMethod(RequestMethod.GET)
.requestUrl(String.format("http://localhost:%s/report/services", reportServerPort))
.build();
}
Expand All @@ -109,6 +130,7 @@ public MailServer mailServer() {
return CitrusEndpoints.mail()
.server()
.port(mailServerPort)
.authRequired(false)
.autoAccept(true)
.autoStart(true)
.build();
Expand Down
Loading

0 comments on commit cb18802

Please sign in to comment.