You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/03/22 17:05:42 UTC
[50/54] [partial] camel git commit: CAMEL-7263: Remove not maintained
and deprecated camel-web module.
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web-standalone/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-web-standalone/pom.xml b/components/camel-web-standalone/pom.xml
deleted file mode 100755
index d1beae9..0000000
--- a/components/camel-web-standalone/pom.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF 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
-
- http://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.
--->
-<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">
-
- <parent>
- <artifactId>components</artifactId>
- <groupId>org.apache.camel</groupId>
- <version>2.16-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>camel-web-standalone</artifactId>
- <packaging>jar</packaging>
-
- <name>Camel :: Web :: Standalone</name>
- <description>Standalone Camel Web</description>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-web</artifactId>
- <version>${project.version}</version>
- <type>war</type>
- </dependency>
-
- <dependency>
- <!-- not org.eclipse.jetty at present -->
- <groupId>${jetty-runner-groupId}</groupId>
- <artifactId>jetty-runner</artifactId>
- <version>${jetty-version}</version>
- </dependency>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- </dependencies>
-
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>src/main/assembly/assembly.xml</descriptor>
- </descriptors>
- <archive>
- <manifest>
- <mainClass>org.apache.camel.web.Main</mainClass>
- </manifest>
- </archive>
- </configuration>
-
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web-standalone/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/components/camel-web-standalone/src/main/assembly/assembly.xml b/components/camel-web-standalone/src/main/assembly/assembly.xml
deleted file mode 100755
index 826ce8a..0000000
--- a/components/camel-web-standalone/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF 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
-
- http://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.
--->
-<assembly>
- <id>camel-web-standalone</id>
- <formats>
- <format>jar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>src/main/assembly</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>embedded.properties</include>
- </includes>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <outputDirectory></outputDirectory>
- <unpack>true</unpack>
- <outputFileNameMapping></outputFileNameMapping>
- <includes>
- <include>org.apache.camel:camel-web-standalone</include>
- <include>log4j:log4j</include>
- </includes>
- </dependencySet>
- <dependencySet>
- <unpack>true</unpack>
- <outputDirectory></outputDirectory>
- <outputFileNameMapping></outputFileNameMapping>
- <includes>
- <!-- not org.eclipse.jetty:jetty-runner at present -->
- <include>org.mortbay.jetty:jetty-runner</include>
- </includes>
- </dependencySet>
- <dependencySet>
- <outputDirectory></outputDirectory>
- <outputFileNameMapping>camel-web.war</outputFileNameMapping>
- <includes>
- <include>org.apache.camel:camel-web</include>
- </includes>
- </dependencySet>
- </dependencySets>
-</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web-standalone/src/main/java/org/apache/camel/web/Main.java
----------------------------------------------------------------------
diff --git a/components/camel-web-standalone/src/main/java/org/apache/camel/web/Main.java b/components/camel-web-standalone/src/main/java/org/apache/camel/web/Main.java
deleted file mode 100755
index 1defda8..0000000
--- a/components/camel-web-standalone/src/main/java/org/apache/camel/web/Main.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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
- *
- * http://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 org.apache.camel.web;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * A bootstrap class for starting Jetty Runner using an embedded war
- *
- * @version
- */
-public final class Main {
- private static final String WAR_POSTFIX = ".war";
- private static final String WAR_NAME = "camel-web";
- private static final String WAR_FILENAME = WAR_NAME + WAR_POSTFIX;
- private static final int KB = 1024;
-
- private Main() {
- // is started from main
- }
-
- public static void main(String[] args) throws Exception {
- System.out.println("Welcome to Apache Camel!");
-
- ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- URL resource = classLoader.getResource(WAR_FILENAME);
- if (resource == null) {
- System.err.println("Could not find the " + WAR_FILENAME + " on classpath!");
- System.exit(1);
- }
-
- File warFile = File.createTempFile(WAR_NAME + "-", WAR_POSTFIX);
- System.out.println("Extracting " + WAR_FILENAME + " to " + warFile + " ...");
-
- writeStreamTo(resource.openStream(), new FileOutputStream(warFile), 8 * KB);
-
- System.out.println("Extracted " + WAR_FILENAME);
- System.out.println("Launching Jetty Runner...");
-
- List<String> argsList = new ArrayList<String>();
- if (args != null) {
- argsList.addAll(Arrays.asList(args));
- }
- argsList.add(warFile.getCanonicalPath());
-
- Class<?> runnerCls = null;
- try {
- runnerCls = Class.forName("org.mortbay.jetty.runner.Runner");
- } catch (Throwable t) {
- runnerCls = Class.forName("org.eclipse.jetty.runner.Runner");
- }
-
- runnerCls.getMethod("main", String[].class)
- .invoke(null, new Object[] {argsList.toArray(new String[argsList.size()])});
- System.exit(0);
- }
-
- public static int writeStreamTo(final InputStream input, final OutputStream output, int bufferSize) throws IOException {
- int available = Math.min(input.available(), 256 * KB);
- byte[] buffer = new byte[Math.max(bufferSize, available)];
- int answer = 0;
- int count = input.read(buffer);
- while (count >= 0) {
- output.write(buffer, 0, count);
- answer += count;
- count = input.read(buffer);
- }
- return answer;
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web-standalone/src/main/resources/META-INF/LICENSE.txt
----------------------------------------------------------------------
diff --git a/components/camel-web-standalone/src/main/resources/META-INF/LICENSE.txt b/components/camel-web-standalone/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/components/camel-web-standalone/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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
-
- http://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.
-
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web-standalone/src/main/resources/META-INF/NOTICE.txt
----------------------------------------------------------------------
diff --git a/components/camel-web-standalone/src/main/resources/META-INF/NOTICE.txt b/components/camel-web-standalone/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf..0000000
--- a/components/camel-web-standalone/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-web/pom.xml b/components/camel-web/pom.xml
deleted file mode 100644
index 50f38ca..0000000
--- a/components/camel-web/pom.xml
+++ /dev/null
@@ -1,927 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF 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
-
- http://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.
--->
-<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">
-
- <parent>
- <artifactId>components</artifactId>
- <groupId>org.apache.camel</groupId>
- <version>2.16-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>camel-web</artifactId>
-
- <name>Camel :: Web</name>
- <description>Camel Web Application with REST support</description>
- <packaging>war</packaging>
-
- <properties>
- <camel.osgi.export.pkg>org.apache.camel.web.*</camel.osgi.export.pkg>
- <scalate-version>1.7.0</scalate-version>
- <jersey-version>1.17.1</jersey-version>
- <jetty-port>8080</jetty-port>
- <webdriver-version>0.9.7376</webdriver-version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jaxb</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>jersey-spring</artifactId>
- <version>${jersey-version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-json</artifactId>
- <version>${jersey-version}</version>
- <exclusions>
- <!-- exclude jackson so we can use the version by camel-jackson -->
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-jaxrs</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-xc</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- jackson for jersey-json -->
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- <version>${jackson-version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- <version>${jackson-version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-jaxrs</artifactId>
- <version>${jackson-version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-xc</artifactId>
- <version>${jackson-version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-atom</artifactId>
- <version>${jersey-version}</version>
- <exclusions>
- <exclusion>
- <groupId>rome</groupId>
- <artifactId>rome</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.scalatra.scalate</groupId>
- <artifactId>scalate-core_2.11</artifactId>
- <version>${scalate-version}</version>
- </dependency>
-
- <!-- even when pre-compiling the tempaltes this still seems to be a requirement - maybe can remove it later? -->
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-compiler</artifactId>
- <version>${scala-version}</version>
- </dependency>
-
- <!-- log4j needed by mvn jetty:run -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
-
- <!-- testing web framework -->
- <dependency>
- <groupId>org.seleniumhq.webdriver</groupId>
- <artifactId>webdriver-htmlunit</artifactId>
- <version>${webdriver-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.seleniumhq.webdriver</groupId>
- <artifactId>webdriver-support</artifactId>
- <version>${webdriver-version}</version>
- <scope>test</scope>
- </dependency>
-
- <!-- testing web container -->
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${jetty-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
- <version>${jetty-version}</version>
- <scope>test</scope>
- </dependency>
-
- <!-- testing -->
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-client</artifactId>
- <version>${jersey-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- </resource>
- </resources>
-
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!--
- these settings are mandatory to avoid SureFire giving a bogus
- system property to the web container
- -->
- <useSystemClassLoader>false</useSystemClassLoader>
- <useManifestOnlyJar>false</useManifestOnlyJar>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <attachClasses>true</attachClasses>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.scalatra.scalate</groupId>
- <artifactId>maven-scalate-plugin_2.11</artifactId>
- <version>${scalate-version}</version>
- <executions>
- <execution>
- <goals>
- <goal>precompile</goal>
- </goals>
- <phase>process-classes</phase>
- </execution>
- </executions>
- </plugin>
-
- <!-- mvn tomcat7:run -->
- <plugin>
- <groupId>org.apache.tomcat.maven</groupId>
- <artifactId>tomcat7-maven-plugin</artifactId>
- </plugin>
-
-
- <!-- mvn jetty:run -->
- <plugin>
- <groupId>${jetty-runner-groupId}</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <configuration>
- <!--
- <connectors> <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
- <port>${jetty.port}</port> <maxIdleTime>60000</maxIdleTime>
- </connector> </connectors>
- -->
-
- <webAppConfig>
- <contextPath>/</contextPath>
- </webAppConfig>
-
- <systemProperties>
- <!-- enable easy JMX connection to JConsole -->
- <systemProperty>
- <name>com.sun.management.jmxremote</name>
- <value />
- </systemProperty>
- </systemProperties>
- <!--
- <scanIntervalSeconds>10</scanIntervalSeconds>
- -->
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>tomcat-maven-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>java</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <classpathScope>test</classpathScope>
- <mainClass>org.apache.camel.web.Main</mainClass>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <goals>
- <goal>javadoc</goal>
- </goals>
- <phase>package</phase>
- </execution>
- </executions>
-
- <configuration>
- <encoding>UTF-8</encoding>
- <verbose>false</verbose>
- <show>public</show>
- <subpackages>org.apache.camel.web.resources</subpackages>
- <!-- see http://jira.codehaus.org/browse/MJAVADOC-229 -->
- <useStandardDocletOptions>false</useStandardDocletOptions>
- <doclet>com.sun.jersey.wadl.resourcedoc.ResourceDoclet</doclet>
- <docletArtifacts>
- <docletArtifact>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>maven-wadl-plugin</artifactId>
- <version>${jersey-version}</version>
- </docletArtifact>
- <docletArtifact>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>wadl-resourcedoc-doclet</artifactId>
- <version>${jersey-version}</version>
- </docletArtifact>
- <!--
- Also specify jersey and xerces as doclet artifacts as the
- ResourceDoclet uses classes provided by them to generate the
- resourcedoc.
- -->
- <docletArtifact>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- <version>${jersey-version}</version>
- </docletArtifact>
- <docletArtifact>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <version>${xerces-version}</version>
- </docletArtifact>
- <docletArtifact>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>${jaxb-version}</version>
- </docletArtifact>
- <docletArtifact>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- <version>${jaxb-version}</version>
- </docletArtifact>
- <docletArtifact>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- <version>${stax-api-version}</version>
- </docletArtifact>
- </docletArtifacts>
- <additionalparam>-output
- ${project.build.outputDirectory}${file.separator}resourcedoc.xml
- </additionalparam>
- </configuration>
- </plugin>
-<!-- Disable wadl generation for now, fails on Java 8-->
-<!--
- <plugin>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>maven-wadl-plugin</artifactId>
- <version>${jersey-version}</version>
- <executions>
- <execution>
- <id>generate</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <phase>package</phase>
- </execution>
- </executions>
- <configuration>
- <wadlFile>${project.build.outputDirectory}/application.wadl</wadlFile>
- <formatWadlFile>true</formatWadlFile>
- <baseUri>http://www.example.com/api</baseUri>
- <packagesResourceConfig>
- <param>org.apache.camel.web.resources</param>
- </packagesResourceConfig>
- <wadlGenerators>
- <wadlGeneratorDescription>
- <className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc</className>
- <properties>
- <property>
- <name>applicationDocsFile</name>
- <value>${basedir}/src/main/resources/application-doc.xml</value>
- </property>
- </properties>
- </wadlGeneratorDescription>
- <wadlGeneratorDescription>
- <className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport</className>
- <properties>
- <property>
- <name>grammarsFile</name>
- <value>${basedir}/src/main/resources/application-grammars.xml</value>
- </property>
- </properties>
- </wadlGeneratorDescription>
- <wadlGeneratorDescription>
- <className>
- com.sun.jersey.server.wadl.generators.resourcedoc.WadlGeneratorResourceDocSupport
- </className>
- <properties>
- <property>
- <name>resourceDocFile</name>
- <value>${project.build.outputDirectory}/resourcedoc.xml</value>
- </property>
- </properties>
- </wadlGeneratorDescription>
- </wadlGenerators>
- </configuration>
- </plugin>
--->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifact</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/schema/camel-web.xsd</file>
- <type>xsd</type>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>true</inherited>
- <dependencies>
- <!-- need JAXB on the classpath to use the xjc SchemaGenTask -->
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-core</artifactId>
- <version>${jaxb-version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- <version>${jaxb-version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-xjc</artifactId>
- <version>${jaxb-version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>process-sources</id>
- <phase>process-classes</phase>
- <configuration>
- <target>
- <taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask" classpathref="maven.plugin.classpath" />
-
- <echo>Copying to code together for the XSD generation</echo>
- <mkdir dir="${project.build.directory}/schema-src" />
- <mkdir dir="${project.build.directory}/schema" />
- <copy todir="${project.build.directory}/schema-src">
- <fileset dir="${basedir}/src/main/java">
- <include name="org/apache/camel/web/model/Camel.java" />
- <include name="org/apache/camel/web/model/EndpointLink.java" />
- <include name="org/apache/camel/web/model/Endpoints.java" />
- <include name="org/apache/camel/web/model/Route.java" />
- <include name="org/apache/camel/web/model/package-info.java" />
- </fileset>
- </copy>
-
- <echo>Generating XSD schema</echo>
- <schemagen srcdir="${project.build.directory}/schema-src" destdir="${project.build.directory}/schema">
- <schema namespace="http://camel.apache.org/schema/web" file="camel-web.xsd" />
- <classpath refid="maven.compile.classpath" />
- </schemagen>
-
- <copy todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/schema" />
- </copy>
-
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
-
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-web</artifactId>
- <version>${project.version}</version>
- <type>xsd</type>
- <overWrite>false</overWrite>
- <outputDirectory>${project.build.directory}/schema</outputDirectory>
- <destFileName>camel-web.xsd</destFileName>
- </artifactItem>
- </artifactItems>
- </configuration>
- </plugin>
- <!-- Eclipse m2e Lifecycle Management -->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>${lifecycle-mapping-version}</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <versionRange>${maven-antrun-plugin-version}</versionRange>
- <goals>
- <goal>run</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore />
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.scalatra.scalate</groupId>
- <artifactId>maven-scalate-plugin_2.11</artifactId>
- <versionRange>${scalate-version}</versionRange>
- <goals>
- <goal>precompile</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore />
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <profiles>
- <profile>
- <id>osgi</id>
- <properties>
- <osgi.export.pkg>
- org.apache.camel.web.resources
- </osgi.export.pkg>
- <osgi.import.pkg>
- com.sun.jersey.api.view;resolution:=optional,
- com.sun.jersey.api.core;resolution:=optional,
- com.sun.jersey.server.impl.container;resolution:=optional,
- com.sun.jersey.server.impl.container.config;resolution:=optional,
- com.sun.jersey.spi.container;resolution:=optional,
- com.sun.jersey.spi.inject;resolution:=optional,
- com.sun.jersey.spi.resource;resolution:=optional,
- com.sun.jersey.spi.spring.container.servlet;resolution:=optional,
- com.sun.org.apache.xerces.internal.jaxp;resolution:=optional,
- com.sun.research.ws.wadl;resolution:=optional,
- com.sun.xml.bind.v2.ContextFactory;resolution:=optional,
- javax.annotation;resolution:=optional,
- javax.el;resolution:=optional,
- javax.naming;resolution:=optional,
- javax.servlet;resolution:=optional,
- javax.servlet.http;resolution:=optional,
- javax.servlet.jsp;resolution:=optional,
- javax.servlet.jsp.el;resolution:=optional,
- javax.servlet.jsp.tagext;resolution:=optional,
- javax.servlet.jsp.jstl.core;resolution:=optional,
- javax.servlet.resources;resolution:=optional,
- javax.ws.rs;resolution:=optional,
- javax.ws.rs.core;resolution:=optional,
- javax.ws.rs.ext;resolution:=optional,
- javax.xml;resolution:=optional,
- javax.xml.bind;resolution:=optional,
- javax.xml.bind.annotation;resolution:=optional,
- javax.xml.bind.annotation.adapters;resolution:=optional,
- javax.xml.bind.attachment;resolution:=optional,
- javax.xml.bind.helpers;resolution:=optional,
- javax.xml.bind.util;resolution:=optional,
- javax.xml.namespace;resolution:=optional,
- javax.xml.parsers;resolution:=optional,
- org.apache.camel;version="[2.8, 3.0)",
- org.apache.camel.builder;version="[2.8, 3.0)",
- org.apache.camel.impl;version="[2.8, 3.0)",
- org.apache.camel.impl.converter;version="[2.8, 3.0)",
- org.apache.camel.model;version="[2.8, 3.0)",
- org.apache.camel.spi;version="[2.8, 3.0)",
- org.apache.camel.spring;version="[2.8, 3.0)",
- org.apache.camel.osgi;version="[2.8, 3.0)",
- org.apache.camel.util;version="[2.8, 3.0)",
- org.apache.camel.web.resources;resolution:=optional,
- org.apache.commons.logging;resolution:=optional,
- org.osgi.service.http;version="[1.0.0,2.0.0)",
- org.ops4j.pax.web.service;resolution:=optional,
- org.w3c.dom;resolution:=optional,
- org.xml.sax;resolution:=optional,
- org.xml.sax.helpers;resolution:=optional,
- org.springframework.aop.support;version="[3, 4)",
- org.springframework.context;version="[3, 4)",
- org.springframework.util;version="[3, 4)",
- org.springframework.beans.factory;version="[3, 4)",
- org.springframework.beans.factory.config;version="[3, 4)",
- org.springframework.beans.factory.xml;version="[3, 4)",
- org.springframework.jmx.export.metadata;version="[3, 4)",
- org.springframework.web.context;version="[3, 4)",
- org.springframework.web.context.support;version="[3, 4)",
- org.springframework.osgi.web.context.support;version="[1.0, 2.0)"
- </osgi.import.pkg>
- <osgi.classpath>
- .,
- WEB-INF/classes,
- WEB-INF/lib/jline-${jline-version}.jar,
- WEB-INF/lib/jersey-core-${jersey-version}.jar,
- WEB-INF/lib/jersey-server-${jersey-version}.jar,
- WEB-INF/lib/jersey-spring-${jersey-version}.jar,
- WEB-INF/lib/jersey-json-${jersey-version}.jar,
- </osgi.classpath>
- <osgi.private.pkg />
- <osgi.dynamic>*</osgi.dynamic>
- <webApplicationContext>camelweb</webApplicationContext>
- </properties>
-
- <!-- Add scope provided to avoid that jar is copied to WEB-INF/lib -->
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>jersey-spring</artifactId>
- <version>${jersey-version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.activation-api-1.1</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- <version>${jersey-version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.activation-api-1.1</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- <version>${jersey-version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.activation-api-1.1</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-json</artifactId>
- <version>${jersey-version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.activation-api-1.1</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-jaxrs</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-xc</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <!-- jackson for jersey-json -->
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- <version>${jackson-version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- <version>${jackson-version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-jaxrs</artifactId>
- <version>${jackson-version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-xc</artifactId>
- <version>${jackson-version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-atom</artifactId>
- <version>${jersey-version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- <optional>true</optional>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>jline</groupId>
- <artifactId>jline</artifactId>
- <version>${jline-version}</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <!-- to generate the MANIFEST-FILE required by the bundle -->
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <executions>
- <execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
- <goals>
- <goal>manifest</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <manifestLocation>META-INF</manifestLocation>
- <supportedProjectTypes>
- <supportedProjectType>bundle</supportedProjectType>
- <supportedProjectType>war</supportedProjectType>
- </supportedProjectTypes>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-ClassPath>${osgi.classpath}</Bundle-ClassPath>
- <Import-Package>${osgi.import.pkg}</Import-Package>
- <Export-Package>${osgi.export.pkg}</Export-Package>
- <Webapp-Context>${webApplicationContext}</Webapp-Context>
- <DynamicImport-Package>${osgi.dynamic}</DynamicImport-Package>
- <_failok>true</_failok>
- </instructions>
- </configuration>
-
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <attachClasses>true</attachClasses>
- <!-- <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes> -->
- <archive>
- <!-- add the generated manifest to the war -->
- <manifestFile>META-INF/MANIFEST.MF</manifestFile>
- </archive>
- <webResources>
- <resource>
- <directory>${basedir}/src/main/webapp</directory>
- <excludes>
- <exclude>**/web.xml</exclude>
- <exclude>**/applicationContext.xml</exclude>
- </excludes>
- </resource>
- <!-- web.xml file modified for OSGI -->
- <resource>
- <directory>${basedir}/src/profiles/osgi/webapp</directory>
- </resource>
- <resource>
- <directory>${basedir}/src/main/resources</directory>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/java/org/apache/camel/web/model/Camel.java
----------------------------------------------------------------------
diff --git a/components/camel-web/src/main/java/org/apache/camel/web/model/Camel.java b/components/camel-web/src/main/java/org/apache/camel/web/model/Camel.java
deleted file mode 100644
index 0f8275e0..0000000
--- a/components/camel-web/src/main/java/org/apache/camel/web/model/Camel.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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
- *
- * http://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 org.apache.camel.web.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.camel.CamelContext;
-
-/**
- *
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Camel {
- @XmlAttribute
- private String name;
- @XmlAttribute
- private String version;
-
- public Camel() {
- }
-
- public Camel(CamelContext camelContext) {
- setName(camelContext.getName());
- }
-
- public Camel(CamelContext camelContext, String version) {
- setName(camelContext.getName());
- setVersion(version);
- }
-
- @Override
- public String toString() {
- return "CamelContext: " + getName();
-
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/java/org/apache/camel/web/model/EndpointLink.java
----------------------------------------------------------------------
diff --git a/components/camel-web/src/main/java/org/apache/camel/web/model/EndpointLink.java b/components/camel-web/src/main/java/org/apache/camel/web/model/EndpointLink.java
deleted file mode 100644
index 0e0bcd2..0000000
--- a/components/camel-web/src/main/java/org/apache/camel/web/model/EndpointLink.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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
- *
- * http://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 org.apache.camel.web.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.spi.HasId;
-import org.apache.camel.web.util.UriCharactersEncoder;
-
-/**
- *
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class EndpointLink {
- @XmlAttribute
- private String uri;
- @XmlAttribute
- private String href;
-
- public EndpointLink() {
- }
-
- public EndpointLink(Endpoint endpoint) {
- this();
- load(endpoint);
- }
-
- public EndpointLink(String key, Endpoint endpoint) {
- this();
- load(key, endpoint);
- }
-
- @Override
- public String toString() {
- return "EndpointLink{href='" + href + "' uri='" + uri + "'}";
- }
-
- public void load(Endpoint endpoint) {
- this.uri = endpoint.getEndpointUri();
- this.href = createHref(uri, endpoint);
- }
-
- public void load(String key, Endpoint endpoint) {
- this.uri = endpoint.getEndpointUri();
- this.href = createHref(key, endpoint);
- }
-
- public String getHref() {
- return href;
- }
-
- public void setHref(String href) {
- this.href = href;
- }
-
- public String getUri() {
- return uri;
- }
-
- public void setUri(String uri) {
- this.uri = uri;
- }
-
- protected String createHref(String uri, Endpoint endpoint) {
- if (endpoint instanceof HasId) {
- HasId hasId = (HasId) endpoint;
- String id = hasId.getId();
- return "/endpoints/" + id;
- } else {
- // must not include :// in endpoint link
- // TODO: might need to use org.apache.camel.util.UnsafeUriCharactersEncoder to safely encode URI for the web
- return "/endpoints/" + UriCharactersEncoder.encode(uri);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/java/org/apache/camel/web/model/Endpoints.java
----------------------------------------------------------------------
diff --git a/components/camel-web/src/main/java/org/apache/camel/web/model/Endpoints.java b/components/camel-web/src/main/java/org/apache/camel/web/model/Endpoints.java
deleted file mode 100644
index 9a93e24..0000000
--- a/components/camel-web/src/main/java/org/apache/camel/web/model/Endpoints.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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
- *
- * http://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 org.apache.camel.web.model;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Endpoint;
-import org.apache.camel.util.ObjectHelper;
-
-/**
- *
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Endpoints {
- @XmlElement(name = "endpoint")
- private List<EndpointLink> endpoints = new ArrayList<EndpointLink>();
-
- public Endpoints() {
- }
-
- public Endpoints(CamelContext camelContext) {
- this();
- load(camelContext);
- }
-
- @Override
- public String toString() {
- return "Endpoints" + endpoints;
-
- }
-
- public List<EndpointLink> getEndpoints() {
- return endpoints;
- }
-
- public void setEndpoints(List<EndpointLink> endpoints) {
- this.endpoints = endpoints;
- }
-
- public void load(CamelContext camelContext) {
- ObjectHelper.notNull(camelContext, "camelContext has not been injected!");
-
- Map<String, Endpoint> map = camelContext.getEndpointMap();
- Set<Map.Entry<String, Endpoint>> entries = map.entrySet();
- for (Map.Entry<String, Endpoint> entry : entries) {
- addEndpoint(createEndpointLink(entry.getKey(), entry.getValue()));
- }
- }
-
- protected EndpointLink createEndpointLink(String key, Endpoint endpoint) {
- EndpointLink answer = new EndpointLink();
- answer.load(key, endpoint);
- return answer;
- }
-
- public void addEndpoint(EndpointLink endpointLink) {
- getEndpoints().add(endpointLink);
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/java/org/apache/camel/web/model/Route.java
----------------------------------------------------------------------
diff --git a/components/camel-web/src/main/java/org/apache/camel/web/model/Route.java b/components/camel-web/src/main/java/org/apache/camel/web/model/Route.java
deleted file mode 100644
index 89ea379..0000000
--- a/components/camel-web/src/main/java/org/apache/camel/web/model/Route.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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
- *
- * http://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 org.apache.camel.web.model;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ServiceStatus;
-import org.apache.camel.model.DescriptionDefinition;
-import org.apache.camel.model.RouteDefinition;
-import org.apache.camel.web.util.JMXRouteStatistics;
-import org.apache.camel.web.util.RouteStatistics;
-
-/**
- * Represents a route.
- * <p/>
- * We need this model to link the RouteDefinition with a CamelContext
- */
-public class Route {
- private CamelContext camelContext;
- private RouteDefinition route;
- private final RouteStatistics statistics = new JMXRouteStatistics();
-
- public Route() {
- }
-
- public Route(CamelContext camelContext, RouteDefinition route) {
- this.camelContext = camelContext;
- this.route = route;
- }
-
- public String getId() {
- return route.getId();
- }
-
- public String idOrCreate() {
- return route.idOrCreate(camelContext.getNodeIdFactory());
- }
-
- public DescriptionDefinition getDescription() {
- return route.getDescription();
- }
-
- public String getDescriptionText() {
- DescriptionDefinition definition = getDescription();
- return (definition != null) ? definition.getText() : "";
- }
-
- public ServiceStatus getStatus() {
- return route.getStatus(camelContext);
- }
-
- public boolean isStartable() {
- return route.isStartable(camelContext);
- }
-
- public boolean isStoppable() {
- return route.isStoppable(camelContext);
- }
-
- public Object getStatistic(String attribute) {
- Object answer = statistics.getRouteStatistic(camelContext, route.getId(), attribute);
- if (answer == null) {
- // we don't want null on web pages so we return an empty string
- return "";
- }
- return answer;
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/java/org/apache/camel/web/model/package-info.java
----------------------------------------------------------------------
diff --git a/components/camel-web/src/main/java/org/apache/camel/web/model/package-info.java b/components/camel-web/src/main/java/org/apache/camel/web/model/package-info.java
deleted file mode 100644
index 70b7222..0000000
--- a/components/camel-web/src/main/java/org/apache/camel/web/model/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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
- *
- * http://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.
- */
-
-/**
- * The JAXB POJOs for the
- * <a href="http://camel.apache.org/rest.html">Camel REST Support</a>
- */
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://camel.apache.org/schema/web", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.apache.camel.web.model;
-
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelChildResourceSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelChildResourceSupport.java b/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelChildResourceSupport.java
deleted file mode 100644
index 6478373..0000000
--- a/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelChildResourceSupport.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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
- *
- * http://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 org.apache.camel.web.resources;
-
-import com.sun.jersey.api.view.ImplicitProduces;
-import org.apache.camel.CamelContext;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.impl.converter.DefaultTypeConverter;
-import org.apache.camel.spi.TypeConverterRegistry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A useful base class for any sub resource of the root {@link org.apache.camel.web.resources.CamelContextResource}
- */
-@ImplicitProduces(Constants.HTML_MIME_TYPES)
-public class CamelChildResourceSupport {
- private static final Logger LOG = LoggerFactory.getLogger(CamelChildResourceSupport.class);
-
- private final CamelContext camelContext;
- private final ProducerTemplate template;
- private CamelContextResource contextResource;
-
- public CamelChildResourceSupport(CamelContextResource contextResource) {
- this.contextResource = contextResource;
- camelContext = contextResource.getCamelContext();
- template = contextResource.getTemplate();
- }
-
- public CamelContext getCamelContext() {
- return camelContext;
- }
-
- public ProducerTemplate getTemplate() {
- return template;
- }
-
- public CamelContextResource getContextResource() {
- return contextResource;
- }
-
- public DefaultTypeConverter getDefaultTypeConverter() {
- TypeConverterRegistry converterRegistry = getCamelContext().getTypeConverterRegistry();
- if (converterRegistry instanceof DefaultTypeConverter) {
- return (DefaultTypeConverter) converterRegistry;
- } else {
- LOG.info("Not a default type converter as it is: " + converterRegistry);
- }
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelContextResource.java
----------------------------------------------------------------------
diff --git a/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelContextResource.java b/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelContextResource.java
deleted file mode 100644
index 6442a81..0000000
--- a/components/camel-web/src/main/java/org/apache/camel/web/resources/CamelContextResource.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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
- *
- * http://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 org.apache.camel.web.resources;
-
-import java.util.Map;
-import java.util.TreeMap;
-import javax.annotation.PreDestroy;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import com.sun.jersey.api.core.InjectParam;
-import com.sun.jersey.api.view.ImplicitProduces;
-import com.sun.jersey.spi.resource.Singleton;
-import org.apache.camel.CamelContext;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.support.ServiceSupport;
-import org.apache.camel.web.model.Camel;
-
-/**
- * The root Camel resource from which all other resources can be navigated such as for <code>endpoints</code>
- * or <code>routes</code>
- */
-@Path("/")
-@ImplicitProduces(Constants.HTML_MIME_TYPES)
-@Singleton
-public class CamelContextResource {
-
- private CamelContext camelContext;
- private ProducerTemplate template;
-
- public CamelContextResource(@InjectParam CamelContext camelContext) throws Exception {
- this.camelContext = camelContext;
- this.template = camelContext.createProducerTemplate();
- template.start();
- }
-
- public CamelContext getCamelContext() {
- return camelContext;
- }
-
- public ProducerTemplate getTemplate() {
- return template;
- }
-
- public String getName() {
- return camelContext.getName();
- }
-
- public String getVersion() {
- if (camelContext instanceof ServiceSupport) {
- ServiceSupport serviceSupport = (ServiceSupport) camelContext;
- return serviceSupport.getVersion();
- }
- return null;
- }
-
- @PreDestroy
- public void close() throws Exception {
- if (template != null) {
- template.stop();
- }
- }
-
- /**
- * Returns the system properties
- */
- public Map<Object, Object> getSystemProperties() {
- return new TreeMap<Object, Object>(System.getProperties());
- }
-
- // representations
- //-------------------------------------------------------------------------
-
- /**
- * Returns the XML or JSON representation of the CamelContext
- */
- @GET
- // TODO we can replace this long expression with a static constant
- // when Jersey supports JAX-RS 1.1
- @Produces({MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- public Camel getCamel() {
- return new Camel(camelContext, getVersion());
- }
-
- /**
- * Returns the active components
- */
- @Path("components")
- public ComponentsResource getComponents() {
- return new ComponentsResource(this);
- }
-
- /**
- * Returns the active type converters
- */
- @Path("converters")
- public ConvertersResource getConvertersResource() {
- return new ConvertersResource(this);
- }
-
- /**
- * Returns the active endpoints
- */
- @Path("endpoints")
- public EndpointsResource getEndpointsResource() {
- return new EndpointsResource(this);
- }
-
- /**
- * Returns the active languages
- */
- @Path("languages")
- public LanguagesResource getLanguages() {
- return new LanguagesResource(this);
- }
-
- /**
- * Returns the active routes
- */
- @Path("routes")
- public RoutesResource getRoutesResource() {
- return new RoutesResource(this);
- }
-
-
-}