Author: janstey
Date: Tue Feb 22 14:14:00 2011
New Revision: 1073333

URL: http://svn.apache.org/viewvc?rev=1073333&view=rev
Log:
CAMEL-3568 - switch camel-archetype-java to use new descriptor format

Added:
    
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/META-INF/maven/archetype-metadata.xml
Removed:
    
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/META-INF/maven/archetype.xml
Modified:
    camel/trunk/tooling/archetypes/camel-archetype-java/pom.xml
    
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml
    
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java

Modified: camel/trunk/tooling/archetypes/camel-archetype-java/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-java/pom.xml?rev=1073333&r1=1073332&r2=1073333&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-java/pom.xml (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-java/pom.xml Tue Feb 22 
14:14:00 2011
@@ -41,31 +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 casesensitive="true" 
file="${project.build.directory}/classes/archetype-resources/pom.xml">
-                  <replacefilter token="$CAMEL_VERSION_REPLACEME$" 
value="${project.version}" /> 
-                  <replacefilter token="$LOG4J_VERSION_REPLACEME$" 
value="${log4j-version}" />
-                  <replacefilter token="$JAXB_API_VERSION_REPLACEME$" 
value="${jaxb-api-version}" /> 
-                  <replacefilter token="$JAXB_IMPL_VERSION_REPLACEME$" 
value="${jaxb-version}" />
-                  <replacefilter 
token="$MAVEN_COMPILER_PLUGIN_VERSION_REPLACEME$" 
value="${maven-compiler-plugin-version}" />
-                </replace>
-              </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>

Added: 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1073333&view=auto
==============================================================================
--- 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/META-INF/maven/archetype-metadata.xml
 (added)
+++ 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/META-INF/maven/archetype-metadata.xml
 Tue Feb 22 14:14:00 2011
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="log4j-version">
+      <defaultValue>${log4j-version}</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="maven-compiler-plugin-version">
+      <defaultValue>${maven-compiler-plugin-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>**/*.xml</include>
+        <include>**/*.properties</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory>src/data</directory>
+      <includes>
+        <include>**/*.xml</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory></directory>
+      <includes>
+        <include>ReadMe.txt</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</archetype-descriptor>

Modified: 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml?rev=1073333&r1=1073332&r2=1073333&view=diff
==============================================================================
--- 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml
 (original)
+++ 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml
 Tue Feb 22 14:14:00 2011
@@ -29,13 +29,6 @@
   <name>A Camel Route</name>
   <url>http://www.myorganization.org</url>
 
-  <properties>
-    <camel-version>$CAMEL_VERSION_REPLACEME$</camel-version>
-    <log4j-version>$LOG4J_VERSION_REPLACEME$</log4j-version>
-    <jaxb-api-version>$JAXB_API_VERSION_REPLACEME$</jaxb-api-version>
-    <jaxb-impl-version>$JAXB_IMPL_VERSION_REPLACEME$</jaxb-impl-version>
-  </properties>
-
   <dependencies>
     <dependency>
       <groupId>org.apache.camel</groupId>
@@ -61,7 +54,7 @@
       <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>

Modified: 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java?rev=1073333&r1=1073332&r2=1073333&view=diff
==============================================================================
--- 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java
 (original)
+++ 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java
 Tue Feb 22 14:14:00 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package ${packageName};
+package ${package};
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.spring.Main;


Reply via email to