Author: davsclaus Date: Thu Mar 3 16:22:36 2011 New Revision: 1076665 URL: http://svn.apache.org/viewvc?rev=1076665&view=rev Log: CAMEL-3658: Migrated the light-war archetype to the new format. And fixed so it works.
Added: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/META-INF/maven/archetype-metadata.xml (with props) camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/ReadMe.txt (with props) camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/resources/ camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/resources/log4j.properties (with props) Removed: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/META-INF/maven/archetype.xml Modified: camel/trunk/tooling/archetypes/camel-archetype-light-war/pom.xml camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/pom.xml camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml Modified: camel/trunk/tooling/archetypes/camel-archetype-light-war/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-light-war/pom.xml?rev=1076665&r1=1076664&r2=1076665&view=diff ============================================================================== --- camel/trunk/tooling/archetypes/camel-archetype-light-war/pom.xml (original) +++ camel/trunk/tooling/archetypes/camel-archetype-light-war/pom.xml Thu Mar 3 16:22:36 2011 @@ -41,28 +41,19 @@ <artifactId>archetype-packaging</artifactId> </extension> </extensions> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <phase>process-resources</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <replace file="${project.build.directory}/classes/archetype-resources/pom.xml" token="$CAMEL_VERSION_REPLACEME$" value="${project.version}" casesensitive="true" /> - <replace file="${project.build.directory}/classes/archetype-resources/pom.xml" token="$SPRING_VERSION_REPLACEME$" value="${spring-version}" casesensitive="true" /> - <replace file="${project.build.directory}/classes/archetype-resources/pom.xml" token="$JETTY_VERSION_REPLACEME$" value="${jetty-version}" casesensitive="true" /> - <replace file="${project.build.directory}/classes/archetype-resources/pom.xml" token="$MAVEN_COMPILER_PLUGIN_VERSION_REPLACEME$" value="${maven-compiler-plugin-version}" casesensitive="true" /> - </tasks> - </configuration> - </execution> - </executions> - </plugin> - </plugins> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>false</filtering> + </resource> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + <includes> + <include>**/archetype-metadata.xml</include> + </includes> + </resource> + </resources> </build> - + </project> \ No newline at end of file Added: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/META-INF/maven/archetype-metadata.xml URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1076665&view=auto ============================================================================== --- camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/META-INF/maven/archetype-metadata.xml (added) +++ camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/META-INF/maven/archetype-metadata.xml Thu Mar 3 16:22:36 2011 @@ -0,0 +1,75 @@ +<?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-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="camel-archetype-java" + xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <requiredProperties> + <requiredProperty key="camel-version"> + <defaultValue>${project.version}</defaultValue> + </requiredProperty> + <requiredProperty key="jetty-version"> + <defaultValue>${jetty-version}</defaultValue> + </requiredProperty> + <requiredProperty key="log4j-version"> + <defaultValue>${log4j-version}</defaultValue> + </requiredProperty> + <requiredProperty key="maven-compiler-plugin-version"> + <defaultValue>${maven-compiler-plugin-version}</defaultValue> + </requiredProperty> + <requiredProperty key="slf4j-version"> + <defaultValue>${slf4j-version}</defaultValue> + </requiredProperty> + <requiredProperty key="spring-version"> + <defaultValue>${spring-version}</defaultValue> + </requiredProperty> + </requiredProperties> + <fileSets> + <fileSet filtered="true" packaged="true" encoding="UTF-8"> + <directory>src/main/java</directory> + <includes> + <include>**/*.java</include> + </includes> + </fileSet> + <fileSet filtered="true" encoding="UTF-8"> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + <fileSet filtered="true" encoding="UTF-8"> + <directory>src/main/webapp</directory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + <fileSet filtered="true" packaged="true" encoding="UTF-8"> + <directory>src/test/java</directory> + <includes> + <include>**/*.java</include> + </includes> + </fileSet> + <fileSet encoding="UTF-8"> + <directory></directory> + <includes> + <include>ReadMe.txt</include> + </includes> + </fileSet> + </fileSets> +</archetype-descriptor> Propchange: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/META-INF/maven/archetype-metadata.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/META-INF/maven/archetype-metadata.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/META-INF/maven/archetype-metadata.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/ReadMe.txt URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/ReadMe.txt?rev=1076665&view=auto ============================================================================== --- camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/ReadMe.txt (added) +++ camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/ReadMe.txt Thu Mar 3 16:22:36 2011 @@ -0,0 +1,14 @@ +Camel Router WAR Project +======================== + +This project includes a sample route as as a WAR. +You can build the WAR by running + +mvn install + +You can then run the project by dropping the WAR into your +favorite web container or just run + +mvn jetty:run + +to start up and deploy to Jetty. Propchange: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/ReadMe.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/ReadMe.txt ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/pom.xml?rev=1076665&r1=1076664&r2=1076665&view=diff ============================================================================== --- camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/pom.xml (original) +++ camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/pom.xml Thu Mar 3 16:22:36 2011 @@ -31,12 +31,6 @@ <packaging>war</packaging> - <properties> - <camel-version>$CAMEL_VERSION_REPLACEME$</camel-version> - <spring-version>$SPRING_VERSION_REPLACEME$</spring-version> - <jetty-version>$JETTY_VERSION_REPLACEME$</jetty-version> - </properties> - <dependencies> <!-- Camel Dependencies --> @@ -56,12 +50,24 @@ <version>${camel-version}</version> </dependency> - <!-- Spring --> + <!-- Spring Web --> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>${spring-version}</version> + </dependency> + + <!-- logging --> <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${spring-version}</version> - </dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>${slf4j-version}</version> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>${log4j-version}</version> + </dependency> </dependencies> @@ -72,19 +78,14 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>$MAVEN_COMPILER_PLUGIN_VERSION_REPLACEME$</version> + <version>${maven-compiler-plugin-version}</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> - - <plugin> - <groupId>org.apache.camel</groupId> - <artifactId>camel-maven-plugin</artifactId> - <version>${camel-version}</version> - </plugin> - + + <!-- plugin so you can run mvn jetty:run --> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> @@ -107,4 +108,5 @@ </plugin> </plugins> </build> + </project> Added: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/resources/log4j.properties URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/resources/log4j.properties?rev=1076665&view=auto ============================================================================== --- camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/resources/log4j.properties (added) +++ camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/resources/log4j.properties Thu Mar 3 16:22:36 2011 @@ -0,0 +1,34 @@ +## ------------------------------------------------------------------------ +## 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 logging properties used for eclipse testing, We want to see debug output on the console. +# +log4j.rootLogger=INFO, out + +# uncomment the following line to turn on Camel debugging +#log4j.logger.org.apache.camel=DEBUG + +log4j.logger.org.springframework=WARN + +# CONSOLE appender not used by default +log4j.appender.out=org.apache.log4j.ConsoleAppender +log4j.appender.out.layout=org.apache.log4j.PatternLayout +log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n +#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n + +log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer Propchange: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/resources/log4j.properties ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/resources/log4j.properties ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/resources/log4j.properties ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml?rev=1076665&r1=1076664&r2=1076665&view=diff ============================================================================== --- camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml (original) +++ camel/trunk/tooling/archetypes/camel-archetype-light-war/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/applicationContext.xml Thu Mar 3 16:22:36 2011 @@ -28,9 +28,9 @@ <!-- Simple camel route which send every one minute a message on the console. --> - <camelContext trace="true" xmlns="http://camel.apache.org/schema/spring"> + <camelContext trace="false" xmlns="http://camel.apache.org/schema/spring"> <route id="timer-to-console"> - <from uri="timer://foo?fixedRate=true&period=60000" /> + <from uri="timer://foo?fixedRate=true&period=10s" /> <transform> <simple>Hello Web Application, how are you?</simple> </transform>