Repository: camel Updated Branches: refs/heads/camel-2.15.x e82251b7d -> f2fedc76a refs/heads/master e47aa24a7 -> 5522312cb
CAMEL-8865 Removal of version from url in web based examples Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/48c6c4c8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/48c6c4c8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/48c6c4c8 Branch: refs/heads/master Commit: 48c6c4c8958a36c26e8417c92834d18776d0e180 Parents: e47aa24 Author: Andrew Block <andy.bl...@gmail.com> Authored: Sat Jun 13 23:39:14 2015 -0500 Committer: Claus Ibsen <davscl...@apache.org> Committed: Sun Jun 14 08:59:19 2015 +0200 ---------------------------------------------------------------------- examples/camel-example-servlet-rest-tomcat/pom.xml | 3 +++ .../src/main/webapp/home.html | 3 +-- .../camel-example-servlet-tomcat-no-spring/README.txt | 8 ++++---- examples/camel-example-servlet-tomcat-no-spring/pom.xml | 7 ++++++- .../apache/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(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-servlet-rest-tomcat/pom.xml ---------------------------------------------------------------------- diff --git a/examples/camel-example-servlet-rest-tomcat/pom.xml b/examples/camel-example-servlet-rest-tomcat/pom.xml index a30aa05..09c8f11 100755 --- a/examples/camel-example-servlet-rest-tomcat/pom.xml +++ b/examples/camel-example-servlet-rest-tomcat/pom.xml @@ -198,6 +198,9 @@ <version>${jetty9-version}</version> <configuration> <webAppSourceDirectory>target/classes</webAppSourceDirectory> + <webApp> + <contextPath>/${project.artifactId}</contextPath> + </webApp> </configuration> </plugin> </plugins> http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-servlet-rest-tomcat/src/main/webapp/home.html ---------------------------------------------------------------------- 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 d87a0b8..03cb404 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 @@ </ul> <p/> - 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 <ul> <li><a href="index.html">swagger</a> - swagger ui page</li> </ul> http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-servlet-tomcat-no-spring/README.txt ---------------------------------------------------------------------- diff --git a/examples/camel-example-servlet-tomcat-no-spring/README.txt b/examples/camel-example-servlet-tomcat-no-spring/README.txt index db3afa5..243ab94 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 http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-servlet-tomcat-no-spring/pom.xml ---------------------------------------------------------------------- diff --git a/examples/camel-example-servlet-tomcat-no-spring/pom.xml b/examples/camel-example-servlet-tomcat-no-spring/pom.xml index 211e597..6cdaed4 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 @@ <build> <plugins> - <!-- allows running this example with mvn:jetty-run --> + <!-- allows running this example with mvn jetty:run --> <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>${jetty9-version}</version> + <configuration> + <webApp> + <contextPath>/${project.artifactId}</contextPath> + </webApp> + </configuration> </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/HelloBean.java ---------------------------------------------------------------------- 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 828e5e3..9143e16 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 @@ import org.apache.camel.language.Simple; 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; } } http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-servlet-tomcat/README.txt ---------------------------------------------------------------------- diff --git a/examples/camel-example-servlet-tomcat/README.txt b/examples/camel-example-servlet-tomcat/README.txt index 174d941..9673bad 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 http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-servlet-tomcat/pom.xml ---------------------------------------------------------------------- diff --git a/examples/camel-example-servlet-tomcat/pom.xml b/examples/camel-example-servlet-tomcat/pom.xml index 1afaf4a..d9d45ba 100755 --- a/examples/camel-example-servlet-tomcat/pom.xml +++ b/examples/camel-example-servlet-tomcat/pom.xml @@ -65,12 +65,20 @@ </dependencies> <build> + + <finalName>${project.artifactId}</finalName> + <plugins> - <!-- allows running this example with mvn:jetty-run --> + <!-- allows running this example with mvn jetty:run --> <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> - <version>${jetty9-version}</version> + <version>${jetty9-version}</version> + <configuration> + <webApp> + <contextPath>/${project.artifactId}</contextPath> + </webApp> + </configuration> </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-servlet-tomcat/src/main/resources/camel-config.xml ---------------------------------------------------------------------- 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 e3ce6c2..4d8058e 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 @@ <header>name</header> <!-- yes so return back a message to the user --> <transform> - <simple>Hello ${header.name} how are you? You are from host: ${sysenv.HOSTNAME}</simple> + <simple>Hello ${header.name} how are you? You are from: ${sys.user.country}</simple> </transform> </when> <otherwise> http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-spark-rest-tomcat/README.txt ---------------------------------------------------------------------- diff --git a/examples/camel-example-spark-rest-tomcat/README.txt b/examples/camel-example-spark-rest-tomcat/README.txt index 578c7bf..9cf1cbe 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 http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-spark-rest-tomcat/pom.xml ---------------------------------------------------------------------- diff --git a/examples/camel-example-spark-rest-tomcat/pom.xml b/examples/camel-example-spark-rest-tomcat/pom.xml index 4d81c42..9ec5e53 100755 --- a/examples/camel-example-spark-rest-tomcat/pom.xml +++ b/examples/camel-example-spark-rest-tomcat/pom.xml @@ -78,11 +78,20 @@ </dependencies> <build> + <!-- we do not want version in the WAR name --> + <finalName>${project.artifactId}</finalName> + <plugins> <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>${jetty9-version}</version> + <configuration> + <webApp> + <contextPath>/${project.artifactId}</contextPath> + </webApp> + </configuration> + </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-spring-boot/README.txt ---------------------------------------------------------------------- diff --git a/examples/camel-example-spring-boot/README.txt b/examples/camel-example-spring-boot/README.txt index 468a898..599e241 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. http://git-wip-us.apache.org/repos/asf/camel/blob/48c6c4c8/examples/camel-example-spring-boot/pom.xml ---------------------------------------------------------------------- diff --git a/examples/camel-example-spring-boot/pom.xml b/examples/camel-example-spring-boot/pom.xml index d05c293..df79ef7 100755 --- a/examples/camel-example-spring-boot/pom.xml +++ b/examples/camel-example-spring-boot/pom.xml @@ -75,6 +75,10 @@ </dependencies> <build> + + <!-- we do not want version in the WAR name --> + <finalName>${project.artifactId}</finalName> + <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId>