Author: dkulp
Date: Tue May  8 18:14:18 2012
New Revision: 1335671

URL: http://svn.apache.org/viewvc?rev=1335671&view=rev
Log:
Speed up the build very slightly by not using regexes and antrun to create
the camel.osgi.version.clean property in every module.  (bundle plugin
can create it)  Only create the camel.schema.version property in the one
component that needs it.

Modified:
    camel/trunk/components/camel-spring/pom.xml
    camel/trunk/parent/pom.xml
    camel/trunk/pom.xml

Modified: camel/trunk/components/camel-spring/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/pom.xml?rev=1335671&r1=1335670&r2=1335671&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/pom.xml (original)
+++ camel/trunk/components/camel-spring/pom.xml Tue May  8 18:14:18 2012
@@ -262,8 +262,8 @@
             </goals>
           </execution>
           <execution>
-            <id>process-sources</id>
-            <phase>process-sources</phase>
+            <id>generate-sources</id>
+            <phase>generate-sources</phase>
             <configuration>
               <target>
                 <taskdef name="schemagen" 
classname="com.sun.tools.jxc.SchemaGenTask" 
classpathref="maven.plugin.classpath" />
@@ -294,6 +294,20 @@
                   </fileset>
                 </copy>
 
+
+                <taskdef resource="net/sf/antcontrib/antcontrib.properties" 
classpathref="maven.plugin.classpath" />
+                <property name="ant.regexp.regexpimpl" 
value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" />
+                <property name="mv" value="${project.version}" />
+                <propertyregex property="ov.p1" input="${mv}" 
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace="\1" 
defaultValue="0" />
+                <propertyregex property="ov.p2" input="${mv}" 
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\2" 
defaultValue=".0" />
+                <propertyregex property="ov.p1a" input="${ov.p1}" 
regexp="(.+)" replace="\1" defaultValue="0" />
+                <propertyregex property="ov.p2a" input="${ov.p2}" 
regexp="(\..+)" replace="\1" defaultValue=".0" />
+                <property name="camel.schema.version" 
value="${ov.p1a}${ov.p2a}" />
+                <mkdir dir="target" />
+                <echo file="target/camel.osgi.version.txt">
+                      camel.schema.version = ${camel.schema.version}
+                </echo>
+
                 <echo>Generating XSD schema</echo>
                 <mkdir dir="${project.build.directory}/schema" />
                 <schemagen srcdir="${project.build.directory}/schema-src" 
destdir="${project.build.directory}/schema">
@@ -311,7 +325,23 @@
           </execution>
         </executions>              
       </plugin>
-
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>properties-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>read-project-properties</goal>
+            </goals>
+            <configuration>
+              <files>
+                <file>target/camel.osgi.version.txt</file>
+              </files>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <!-- add the sources from camel-core-osgi and camel-core-xml as source 
code in the camel-spring-sources.jar -->
       <plugin>
         <groupId>org.codehaus.mojo</groupId>

Modified: camel/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1335671&r1=1335670&r2=1335671&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Tue May  8 18:14:18 2012
@@ -1599,64 +1599,6 @@
   </dependencyManagement>
 
   <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>
-            <id>create-prop</id>
-            <phase>initialize</phase>
-            <configuration>
-              <target>
-                <taskdef resource="net/sf/antcontrib/antcontrib.properties" 
classpathref="maven.plugin.classpath" />
-                <property name="ant.regexp.regexpimpl" 
value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" />
-                <property name="mv" value="${project.version}" />
-                <echo message="Maven version: ${mv}" />
-                <propertyregex property="ov.p1" input="${mv}" 
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace="\1" 
defaultValue="0" />
-                <propertyregex property="ov.p2" input="${mv}" 
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\2" 
defaultValue=".0" />
-                <propertyregex property="ov.p3" input="${mv}" 
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\3" 
defaultValue=".0" />
-                <propertyregex property="ov.p4" input="${mv}" 
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\4" 
defaultValue="" />
-                <propertyregex property="ov.p1a" input="${ov.p1}" 
regexp="(.+)" replace="\1" defaultValue="0" />
-                <propertyregex property="ov.p2a" input="${ov.p2}" 
regexp="(\..+)" replace="\1" defaultValue=".0" />
-                <propertyregex property="ov.p3a" input="${ov.p3}" 
regexp="(\..+)" replace="\1" defaultValue=".0" />
-                <propertyregex property="ov.p4a" input="${ov.p4}" 
regexp="(\..+)" replace="\1" defaultValue="" />
-                <property name="ov" 
value="${ov.p1a}${ov.p2a}${ov.p3a}${ov.p4a}" />
-                <property name="os" value="${ov.p1a}${ov.p2a}" />
-                <echo message="OSGi version: ${ov}" />
-                <mkdir dir="target" />
-                <echo file="target/camel.osgi.version.txt">
-                  camel.osgi.version.clean = ${ov}
-                  camel.schema.version = ${os}
-                 </echo>
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>properties-maven-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>
-            <phase>initialize</phase>
-            <goals>
-              <goal>read-project-properties</goal>
-            </goals>
-            <configuration>
-              <files>
-                <file>target/camel.osgi.version.txt</file>
-              </files>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
     <pluginManagement>
       <plugins>
         <plugin>

Modified: camel/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/pom.xml?rev=1335671&r1=1335670&r2=1335671&view=diff
==============================================================================
--- camel/trunk/pom.xml (original)
+++ camel/trunk/pom.xml Tue May  8 18:14:18 2012
@@ -482,6 +482,20 @@
             <_failok>${camel.osgi.failok}</_failok>
           </instructions>
            </configuration>
+        <executions>
+            <execution>
+                <id>versions</id>
+                <phase>validate</phase>
+                <goals>
+                    <goal>cleanVersions</goal>
+                </goals>
+                <configuration>
+                    <versions>
+                        
<camel.osgi.version.clean>${project.version}</camel.osgi.version.clean>
+                    </versions>
+                </configuration>
+            </execution>
+        </executions>
       </plugin>
 
       <plugin>


Reply via email to