You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/11/14 15:59:29 UTC
svn commit: r714024 - in /servicemix/archetypes/trunk: ./
servicemix-osgi-camel-archetype/ servicemix-osgi-camel-archetype/src/
servicemix-osgi-camel-archetype/src/main/
servicemix-osgi-camel-archetype/src/main/resources/
servicemix-osgi-camel-archetyp...
Author: gnodet
Date: Fri Nov 14 06:59:28 2008
New Revision: 714024
URL: http://svn.apache.org/viewvc?rev=714024&view=rev
Log:
SMX4-150: Add an OSGi base camel archetype for smx4
Added:
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/ (with props)
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/pom.xml (with props)
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/META-INF/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/META-INF/maven/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/META-INF/maven/archetype.xml (with props)
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/pom.xml (with props)
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/java/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/java/MyTransform.java (with props)
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/resources/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/
servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml (with props)
Removed:
servicemix/archetypes/trunk/servicemix-osgi-camel-service-unit/
Modified:
servicemix/archetypes/trunk/pom.xml
Modified: servicemix/archetypes/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/archetypes/trunk/pom.xml?rev=714024&r1=714023&r2=714024&view=diff
==============================================================================
--- servicemix/archetypes/trunk/pom.xml (original)
+++ servicemix/archetypes/trunk/pom.xml Fri Nov 14 06:59:28 2008
@@ -71,7 +71,7 @@
<module>servicemix-snmp-service-unit</module>
<module>servicemix-validation-service-unit</module>
<module>servicemix-archetype-catalog</module>
- <module>servicemix-osgi-camel-service-unit</module>
+ <module>servicemix-osgi-camel-archetype</module>
<module>servicemix-project-root</module>
<module>servicemix-archetypes-itests</module>
</modules>
Propchange: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 14 06:59:28 2008
@@ -0,0 +1,6 @@
+.classpath
+.project
+target
+.settings
+*.iml
+
Added: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/pom.xml?rev=714024&view=auto
==============================================================================
--- servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/pom.xml (added)
+++ servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/pom.xml Fri Nov 14 06:59:28 2008
@@ -0,0 +1,44 @@
+<?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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.servicemix</groupId>
+ <artifactId>archetypes</artifactId>
+ <version>2008.01-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.apache.servicemix.tooling</groupId>
+ <artifactId>servicemix-osgi-camel-archetype</artifactId>
+ <name>ServiceMix :: Archetypes :: CamelOSGiArchetype</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-maven-plugin</artifactId>
+ <version>${camel-version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Propchange: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Added: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/META-INF/maven/archetype.xml
URL: http://svn.apache.org/viewvc/servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/META-INF/maven/archetype.xml?rev=714024&view=auto
==============================================================================
--- servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/META-INF/maven/archetype.xml (added)
+++ servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/META-INF/maven/archetype.xml Fri Nov 14 06:59:28 2008
@@ -0,0 +1,29 @@
+<?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.
+
+-->
+<archetype>
+ <id>camel-osgi-service-unit</id>
+
+ <sources>
+ <source>src/main/java/MyTransform.java</source>
+ </sources>
+ <resources>
+ <resource>src/main/resources/META-INF/spring/camel-context.xml</resource>
+ </resources>
+</archetype>
Propchange: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/META-INF/maven/archetype.xml
------------------------------------------------------------------------------
svn:executable = *
Added: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/pom.xml?rev=714024&view=auto
==============================================================================
--- servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/pom.xml (added)
+++ servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/pom.xml Fri Nov 14 06:59:28 2008
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <!--
+
+ 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.
+ -->
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>${groupId}</groupId>
+ <artifactId>${artifactId}</artifactId>
+ <packaging>bundle</packaging>
+ <version>${version}</version>
+ <name>A Camel OSGi Service Unit</name>
+ <url>http://www.myorganization.org</url>
+
+ @{repositories}
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>${commons.logging.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core</artifactId>
+ <version>${camel-version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ <Import-Package>*,org.apache.camel.osgi</Import-Package>
+ <Private-Package>${packageName}</Private-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties>
+ <commons.logging.version>1.1</commons.logging.version>
+ <camel-version>1.5.0</camel-version>
+ </properties>
+
+</project>
Propchange: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Added: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/java/MyTransform.java
URL: http://svn.apache.org/viewvc/servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/java/MyTransform.java?rev=714024&view=auto
==============================================================================
--- servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/java/MyTransform.java (added)
+++ servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/java/MyTransform.java Fri Nov 14 06:59:28 2008
@@ -0,0 +1,56 @@
+/**
+ * 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 ${packageName};
+
+import java.util.Date;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @version $Revision: 640450 $
+ */
+public class MyTransform {
+ private static final transient Log LOG = LogFactory.getLog(MyTransform.class);
+ private boolean verbose = true;
+ private String prefix = "MyTransform";
+
+ public Object transform(Object body) {
+ String answer = prefix + " set body: " + new Date();
+ if (verbose) {
+ System.out.println(">>>> " + answer);
+ }
+ LOG.info(">>>> " + answer);
+ return answer;
+ }
+
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ public String getPrefix() {
+ return prefix;
+ }
+
+ public void setPrefix(String prefix) {
+ this.prefix = prefix;
+ }
+}
Propchange: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/java/MyTransform.java
------------------------------------------------------------------------------
svn:executable = *
Added: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml?rev=714024&view=auto
==============================================================================
--- servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml (added)
+++ servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml Fri Nov 14 06:59:28 2008
@@ -0,0 +1,47 @@
+<?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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:osgi="http://activemq.apache.org/camel/schema/osgi"
+ xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+ http://activemq.apache.org/camel/schema/osgi http://activemq.apache.org/camel/schema/osgi/camel-osgi.xsd
+ http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd">
+
+ <osgi:camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
+ <route>
+ <from uri="timer://myTimer?fixedRate=true&period=2000"/>
+ <bean ref="myTransform" method="transform"/>
+ <to uri="log:ExampleRouter"/>
+ </route>
+ </osgi:camelContext>
+
+ <bean id="myTransform" class="${packageName}.MyTransform">
+ <property name="prefix" value="${prefix}"/>
+ </bean>
+
+ <osgix:property-placeholder persistent-id="${packageName}">
+ <osgix:default-properties>
+ <prop key="prefix">MyTransform</prop>
+ </osgix:default-properties>
+ </osgix:property-placeholder>
+
+</beans>
Propchange: servicemix/archetypes/trunk/servicemix-osgi-camel-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
svn:executable = *