commit
45b5c2238e
7 changed files with 494 additions and 0 deletions
@ -0,0 +1,235 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- |
|||
|
|||
Copyright 2005-2018 Red Hat, Inc. |
|||
|
|||
Red Hat licenses this file to you under the Apache License, version |
|||
2.0 (the "License"); you may not use this file except in compliance |
|||
with the License. You may obtain a copy of the License at |
|||
|
|||
https://www.apache.org/licenses/LICENSE-2.0 |
|||
|
|||
Unless required by applicable law or agreed to in writing, software |
|||
distributed under the License is distributed on an "AS IS" BASIS, |
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|||
implied. See the License for the specific language governing |
|||
permissions and limitations under the License. |
|||
|
|||
--> |
|||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> |
|||
|
|||
<profiles> |
|||
<profile> |
|||
<id>fuse.repos</id> |
|||
|
|||
<repositories> |
|||
|
|||
<repository> |
|||
<id>maven.central</id> |
|||
<name>Maven Central</name> |
|||
<url>https://repo1.maven.org/maven2</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</repository> |
|||
|
|||
|
|||
<repository> |
|||
<id>redhat.ga</id> |
|||
<name>Red Hat General Availability Repository</name> |
|||
<url>https://maven.repository.redhat.com/ga</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</repository> |
|||
|
|||
|
|||
<repository> |
|||
<id>redhat.ea</id> |
|||
<name>Red Hat Early Access Repository</name> |
|||
<url>https://maven.repository.redhat.com/earlyaccess/all</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</repository> |
|||
|
|||
|
|||
<repository> |
|||
<id>jboss.ea</id> |
|||
<name>JBoss Early Access Repository</name> |
|||
<url>http://repository.jboss.org/nexus/content/groups/ea</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</repository> |
|||
|
|||
|
|||
<repository> |
|||
<id>jboss.brew</id> |
|||
<name>JBoss Brew Repository</name> |
|||
<url>http://download-node-02.eng.bos.redhat.com/brewroot/repos/jb-common-build/latest/maven/</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</repository> |
|||
|
|||
|
|||
<repository> |
|||
<id>fis.brew</id> |
|||
<name>FIS Brew Repository</name> |
|||
<url>http://download-node-02.eng.bos.redhat.com/brewroot/repos/jb-fis-2.0-maven-build/latest/maven/</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</repository> |
|||
|
|||
|
|||
<repository> |
|||
<id>eap.brew</id> |
|||
<name>EAP Brew Repository</name> |
|||
<url>http://download.eng.bos.redhat.com/brewroot/repos/jb-eap-7.1-rhel-7-maven-build/latest/maven/</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</repository> |
|||
|
|||
</repositories> |
|||
|
|||
<pluginRepositories> |
|||
|
|||
<pluginRepository> |
|||
<id>maven.central</id> |
|||
<name>Maven Central</name> |
|||
<url>https://repo1.maven.org/maven2</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</pluginRepository> |
|||
|
|||
|
|||
<pluginRepository> |
|||
<id>redhat.ga</id> |
|||
<name>Red Hat General Availability Repository</name> |
|||
<url>https://maven.repository.redhat.com/ga</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</pluginRepository> |
|||
|
|||
|
|||
<pluginRepository> |
|||
<id>redhat.ea</id> |
|||
<name>Red Hat Early Access Repository</name> |
|||
<url>https://maven.repository.redhat.com/earlyaccess/all</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</pluginRepository> |
|||
|
|||
|
|||
<pluginRepository> |
|||
<id>jboss.ea</id> |
|||
<name>JBoss Early Access Repository</name> |
|||
<url>http://repository.jboss.org/nexus/content/groups/ea</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</pluginRepository> |
|||
|
|||
|
|||
<pluginRepository> |
|||
<id>jboss.brew</id> |
|||
<name>JBoss Brew Repository</name> |
|||
<url>http://download-node-02.eng.bos.redhat.com/brewroot/repos/jb-common-build/latest/maven/</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</pluginRepository> |
|||
|
|||
|
|||
<pluginRepository> |
|||
<id>fis.brew</id> |
|||
<name>FIS Brew Repository</name> |
|||
<url>http://download-node-02.eng.bos.redhat.com/brewroot/repos/jb-fis-2.0-maven-build/latest/maven/</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</pluginRepository> |
|||
|
|||
|
|||
<pluginRepository> |
|||
<id>eap.brew</id> |
|||
<name>EAP Brew Repository</name> |
|||
<url>http://download.eng.bos.redhat.com/brewroot/repos/jb-eap-7.1-rhel-7-maven-build/latest/maven/</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</pluginRepository> |
|||
|
|||
</pluginRepositories> |
|||
</profile> |
|||
</profiles> |
|||
|
|||
<activeProfiles> |
|||
<activeProfile>fuse.repos</activeProfile> |
|||
</activeProfiles> |
|||
|
|||
</settings> |
|||
@ -0,0 +1,168 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<groupId>fr.itix</groupId> |
|||
<artifactId>save-next-todo</artifactId> |
|||
<version>1.0.0-SNAPSHOT</version> |
|||
<name>Camel Demo</name> |
|||
<description>Part of my Fuse Online demo</description> |
|||
<properties> |
|||
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version> |
|||
<fuse.version>7.6.0.fuse-760027-redhat-00001</fuse.version> |
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|||
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> |
|||
</properties> |
|||
<dependencyManagement> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>org.jboss.redhat-fuse</groupId> |
|||
<artifactId>fuse-springboot-bom</artifactId> |
|||
<version>7.6.0.fuse-760027-redhat-00001</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
</dependencyManagement> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-actuator</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.camel</groupId> |
|||
<artifactId>camel-jsonpath</artifactId> |
|||
<version>2.21.0.fuse-760027-redhat-00001</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.camel</groupId> |
|||
<artifactId>camel-spring-boot-starter</artifactId> |
|||
<version>2.21.0.fuse-760027-redhat-00001</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.camel</groupId> |
|||
<artifactId>camel-netty4-http</artifactId> |
|||
<version>2.21.0.fuse-760027-redhat-00001</version> |
|||
</dependency> |
|||
</dependencies> |
|||
<repositories> |
|||
<repository> |
|||
<id>red-hat-ga-repository</id> |
|||
<url>https://maven.repository.redhat.com/ga</url> |
|||
</repository> |
|||
<repository> |
|||
<id>red-hat-early-access-repository</id> |
|||
<url>https://maven.repository.redhat.com/earlyaccess/all</url> |
|||
</repository> |
|||
<repository> |
|||
<id>jboss-early-access-repository</id> |
|||
<url>https://repository.jboss.org/nexus/content/groups/ea</url> |
|||
</repository> |
|||
</repositories> |
|||
<pluginRepositories> |
|||
<pluginRepository> |
|||
<id>red-hat-ga-repository</id> |
|||
<url>https://maven.repository.redhat.com/ga</url> |
|||
</pluginRepository> |
|||
<pluginRepository> |
|||
<id>red-hat-early-access-repository</id> |
|||
<url>https://maven.repository.redhat.com/earlyaccess/all</url> |
|||
</pluginRepository> |
|||
<pluginRepository> |
|||
<id>jboss-early-access-repository</id> |
|||
<url>https://repository.jboss.org/nexus/content/groups/ea</url> |
|||
</pluginRepository> |
|||
</pluginRepositories> |
|||
<build> |
|||
<defaultGoal>spring-boot:run</defaultGoal> |
|||
<plugins> |
|||
<plugin> |
|||
<artifactId>maven-compiler-plugin</artifactId> |
|||
<version>${maven-compiler-plugin.version}</version> |
|||
<configuration> |
|||
<source>1.8</source> |
|||
<target>1.8</target> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.jboss.redhat-fuse</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<version>${fuse.version}</version> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>repackage</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.jboss.redhat-fuse</groupId> |
|||
<artifactId>fabric8-maven-plugin</artifactId> |
|||
<version>${fuse.version}</version> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>resource</goal> |
|||
<goal>build</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
<profiles> |
|||
<profile> |
|||
<id>jdk9+-build</id> |
|||
<activation> |
|||
<jdk>[9,)</jdk> |
|||
</activation> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>javax.annotation</groupId> |
|||
<artifactId>javax.annotation-api</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>javax.xml.ws</groupId> |
|||
<artifactId>jaxws-api</artifactId> |
|||
<version>2.3.0</version> |
|||
<exclusions> |
|||
<exclusion> |
|||
<artifactId>jaxb-api</artifactId> |
|||
<groupId>javax.xml.bind</groupId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>jakarta.xml.bind</groupId> |
|||
<artifactId>jakarta.xml.bind-api</artifactId> |
|||
<version>2.3.2</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.sun.activation</groupId> |
|||
<artifactId>javax.activation</artifactId> |
|||
<version>1.2.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.geronimo.specs</groupId> |
|||
<artifactId>geronimo-ws-metadata_2.0_spec</artifactId> |
|||
<version>1.1.3</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.sun.xml.messaging.saaj</groupId> |
|||
<artifactId>saaj-impl</artifactId> |
|||
<version>1.4.0-b03</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.geronimo.specs</groupId> |
|||
<artifactId>geronimo-jta_1.1_spec</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.jboss.spec.javax.rmi</groupId> |
|||
<artifactId>jboss-rmi-api_1.0_spec</artifactId> |
|||
<version>1.0.6.Final</version> |
|||
</dependency> |
|||
</dependencies> |
|||
</profile> |
|||
</profiles> |
|||
</project> |
|||
@ -0,0 +1,15 @@ |
|||
spec: |
|||
template: |
|||
spec: |
|||
containers: |
|||
- |
|||
resources: |
|||
requests: |
|||
cpu: "0.2" |
|||
# memory: 256Mi |
|||
limits: |
|||
cpu: "1.0" |
|||
# memory: 256Mi |
|||
env: |
|||
- name: SPRING_APPLICATION_JSON |
|||
value: '{"server":{"tomcat":{"max-threads":1}}}' |
|||
@ -0,0 +1,34 @@ |
|||
/** |
|||
* Copyright 2005-2018 Red Hat, Inc. |
|||
* |
|||
* Red Hat licenses this file to you under the Apache License, version |
|||
* 2.0 (the "License"); you may not use this file except in compliance |
|||
* with the License. You may obtain a copy of the License at |
|||
* |
|||
* https://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|||
* implied. See the License for the specific language governing |
|||
* permissions and limitations under the License. |
|||
*/ |
|||
package fr.itix; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.context.annotation.ImportResource; |
|||
|
|||
/** |
|||
* A spring-boot application that includes a Camel route builder to setup the Camel routes |
|||
*/ |
|||
@SpringBootApplication |
|||
@ImportResource({"classpath:spring/camel-context.xml"}) |
|||
public class Application { |
|||
|
|||
// must have a main method spring-boot can run
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(Application.class, args); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
logging.config=classpath:logback.xml |
|||
|
|||
# the options from org.apache.camel.spring.boot.CamelConfigurationProperties can be configured here |
|||
camel.springboot.name=SaveNextTodo |
|||
apicast.hostname=fuse-online-i-next-todo-3scale-apicast-staging.apps.ocp4.itix.fr |
|||
apicast.apikey=d2cff6d6f40c48632322b0d651740995 |
|||
|
|||
spring.main.web-application-type=none |
|||
camel.springboot.main-run-controller=true |
|||
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE xml> |
|||
<configuration> |
|||
|
|||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<!-- encoders are assigned the type |
|||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> |
|||
<encoder> |
|||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
<root level="info"> |
|||
<appender-ref ref="STDOUT" /> |
|||
</root> |
|||
|
|||
</configuration> |
|||
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<beans xmlns="http://www.springframework.org/schema/beans" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring https://camel.apache.org/schema/spring/camel-spring.xsd"> |
|||
<sslContextParameters id="ssl" xmlns="http://camel.apache.org/schema/spring"/> |
|||
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> |
|||
<route id="simple-route"> |
|||
<from id="route-timer" uri="timer://foo?period=30000"/> |
|||
<to id="_to1" uri="netty4-http:https:{{apicast.hostname}}:443/todo/next?ssl=true&sslContextParameters=#ssl&user_key={{apicast.apikey}}"/> |
|||
<log id="route-log" message=">>> ${body}"/> |
|||
<setBody id="_setBody2"> |
|||
<jsonpath>$.name</jsonpath> |
|||
</setBody> |
|||
<to id="_to2" uri="file:/tmp?fileName=next-todo.txt"/> |
|||
</route> |
|||
</camelContext> |
|||
</beans> |
|||
Loading…
Reference in new issue