From 48c6c4c8958a36c26e8417c92834d18776d0e180 Mon Sep 17 00:00:00 2001 From: Andrew Block Date: Sat, 13 Jun 2015 23:39:14 -0500 Subject: [PATCH] CAMEL-8865 Removal of version from url in web based examples --- examples/camel-example-servlet-rest-tomcat/pom.xml | 3 +++ .../src/main/webapp/home.html | 3 +-- .../README.txt | 8 ++++---- .../camel-example-servlet-tomcat-no-spring/pom.xml | 7 ++++++- .../camel/example/servletlistener/HelloBean.java | 4 ++-- examples/camel-example-servlet-tomcat/README.txt | 8 ++++---- examples/camel-example-servlet-tomcat/pom.xml | 12 ++++++++++-- .../src/main/resources/camel-config.xml | 2 +- examples/camel-example-spark-rest-tomcat/README.txt | 4 ++-- examples/camel-example-spark-rest-tomcat/pom.xml | 9 +++++++++ examples/camel-example-spring-boot/README.txt | 2 +- examples/camel-example-spring-boot/pom.xml | 4 ++++ 12 files changed, 47 insertions(+), 19 deletions(-) diff --git a/examples/camel-example-servlet-rest-tomcat/pom.xml b/examples/camel-example-servlet-rest-tomcat/pom.xml index a30aa059e5841..09c8f1103601c 100755 --- a/examples/camel-example-servlet-rest-tomcat/pom.xml +++ b/examples/camel-example-servlet-rest-tomcat/pom.xml @@ -198,6 +198,9 @@ ${jetty9-version} target/classes + + /${project.artifactId} + diff --git a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/home.html b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/home.html index d87a0b898fc9b..03cb404a6c5a9 100644 --- a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/home.html +++ b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/home.html @@ -79,8 +79,7 @@

Apache Camel Example using Servlet REST & Web Container

- To use the swagger ui, follow this link. Replace the URL value with this one to access the REST local resources (http://localhost:8080/api-docs or (http://localhost:8080/camel-example-servlet-rest-tomcat/api-docs - when deployed in Apache Tomcat) + To use the swagger ui, follow this link. Replace the URL value with this one to access the REST local resources http://localhost:8080/camel-example-servlet-rest-tomcat/api-docs

diff --git a/examples/camel-example-servlet-tomcat-no-spring/README.txt b/examples/camel-example-servlet-tomcat-no-spring/README.txt index db3afa5ab73bd..243ab9453fefb 100644 --- a/examples/camel-example-servlet-tomcat-no-spring/README.txt +++ b/examples/camel-example-servlet-tomcat-no-spring/README.txt @@ -11,11 +11,11 @@ To run the example deploy it in Apache Tomcat by copying the .war to the deploy folder of Apache Tomcat. And then hit this url from a webbrowser which has further -instructions (use correct version number) - http://localhost:8080/camel-example-servlet-tomcat-no-spring-{version} +instructions + http://localhost:8080/camel-example-servlet-tomcat-no-spring -The servlet is located at (use correct version number) - http://localhost:8080/camel-example-servlet-tomcat-no-spring-{version}/camel +The servlet is located at + http://localhost:8080/camel-example-servlet-tomcat-no-spring/camel This example is documented at http://camel.apache.org/servlet-tomcat-example-no-spring.html diff --git a/examples/camel-example-servlet-tomcat-no-spring/pom.xml b/examples/camel-example-servlet-tomcat-no-spring/pom.xml index 211e597999c85..6cdaed4cb67f5 100755 --- a/examples/camel-example-servlet-tomcat-no-spring/pom.xml +++ b/examples/camel-example-servlet-tomcat-no-spring/pom.xml @@ -62,11 +62,16 @@ - + org.eclipse.jetty jetty-maven-plugin ${jetty9-version} + + + /${project.artifactId} + + diff --git a/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/HelloBean.java b/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/HelloBean.java index 828e5e3022f81..9143e16c55c68 100644 --- a/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/HelloBean.java +++ b/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/HelloBean.java @@ -21,8 +21,8 @@ public class HelloBean { - public String sayHello(@Header("name") String name, @Simple("${sysenv.HOSTNAME}") String host) { - return "Hello " + name + ", how are you? You are from host: " + host; + public String sayHello(@Header("name") String name, @Simple("${sys.user.country}") String country) { + return "Hello " + name + ", how are you? You are from: " + country; } } diff --git a/examples/camel-example-servlet-tomcat/README.txt b/examples/camel-example-servlet-tomcat/README.txt index 174d9417f205b..9673bad7300f0 100644 --- a/examples/camel-example-servlet-tomcat/README.txt +++ b/examples/camel-example-servlet-tomcat/README.txt @@ -10,11 +10,11 @@ To run the example deploy it in Apache Tomcat by copying the .war to the deploy folder of Apache Tomcat. And then hit this url from a webbrowser which has further -instructions (use correct version number) - http://localhost:8080/camel-example-servlet-tomcat-{version} +instructions + http://localhost:8080/camel-example-servlet-tomcat -The servlet is located at (use correct version number) - http://localhost:8080/camel-example-servlet-tomcat-{version}/camel/hello +The servlet is located at + http://localhost:8080/camel-example-servlet-tomcat/camel/hello This example is documented at http://camel.apache.org/servlet-tomcat-example.html diff --git a/examples/camel-example-servlet-tomcat/pom.xml b/examples/camel-example-servlet-tomcat/pom.xml index 1afaf4ad5fcde..d9d45baa28a9b 100755 --- a/examples/camel-example-servlet-tomcat/pom.xml +++ b/examples/camel-example-servlet-tomcat/pom.xml @@ -65,12 +65,20 @@ + + ${project.artifactId} + - + org.eclipse.jetty jetty-maven-plugin - ${jetty9-version} + ${jetty9-version} + + + /${project.artifactId} + + diff --git a/examples/camel-example-servlet-tomcat/src/main/resources/camel-config.xml b/examples/camel-example-servlet-tomcat/src/main/resources/camel-config.xml index e3ce6c26c851b..4d8058e6754b2 100755 --- a/examples/camel-example-servlet-tomcat/src/main/resources/camel-config.xml +++ b/examples/camel-example-servlet-tomcat/src/main/resources/camel-config.xml @@ -35,7 +35,7 @@
name
- Hello ${header.name} how are you? You are from host: ${sysenv.HOSTNAME} + Hello ${header.name} how are you? You are from: ${sys.user.country} diff --git a/examples/camel-example-spark-rest-tomcat/README.txt b/examples/camel-example-spark-rest-tomcat/README.txt index 578c7bf433afc..9cf1cbe0b7fac 100644 --- a/examples/camel-example-spark-rest-tomcat/README.txt +++ b/examples/camel-example-spark-rest-tomcat/README.txt @@ -12,8 +12,8 @@ To run the example deploy it in Apache Tomcat by copying the .war to the deploy folder of Apache Tomcat. And then hit this url from a web browser which has further -instructions (use correct version number) - http://localhost:8080/camel-example-spark-rest-tomcat-{version} +instructions + http://localhost:8080/camel-example-spark-rest-tomcat You can also try the example from Maven using mvn jetty:run diff --git a/examples/camel-example-spark-rest-tomcat/pom.xml b/examples/camel-example-spark-rest-tomcat/pom.xml index 4d81c4227cb8b..9ec5e53548ba1 100755 --- a/examples/camel-example-spark-rest-tomcat/pom.xml +++ b/examples/camel-example-spark-rest-tomcat/pom.xml @@ -78,11 +78,20 @@ + + ${project.artifactId} + org.eclipse.jetty jetty-maven-plugin ${jetty9-version} + + + /${project.artifactId} + + + diff --git a/examples/camel-example-spring-boot/README.txt b/examples/camel-example-spring-boot/README.txt index 468a8985b265d..599e241c3d040 100644 --- a/examples/camel-example-spring-boot/README.txt +++ b/examples/camel-example-spring-boot/README.txt @@ -22,7 +22,7 @@ To run the example type You can also execute the fat WAR directly: - java -jar target/camel-example-spring-boot-2.x-SNAPSHOT.war + java -jar target/camel-example-spring-boot.war You will see the message printed to the console every second. diff --git a/examples/camel-example-spring-boot/pom.xml b/examples/camel-example-spring-boot/pom.xml index d05c293cc8a1b..df79ef71f6c77 100755 --- a/examples/camel-example-spring-boot/pom.xml +++ b/examples/camel-example-spring-boot/pom.xml @@ -75,6 +75,10 @@ + + + ${project.artifactId} + org.apache.maven.plugins