geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r424184 - /geronimo/sandbox/svkmerge/m2migration/modules/system/pom.xml
Date Fri, 21 Jul 2006 05:19:47 GMT
Author: jdillon
Date: Thu Jul 20 22:19:46 2006
New Revision: 424184

URL: http://svn.apache.org/viewvc?rev=424184&view=rev
Log:
(GERONIMO-2214) Use antrun + propertyfile task to generate geronimo-version.properties and
product-versions.properties
Include the generated resources in build/resources so that plugins dependent on these resources
(like clover) will still function

Modified:
    geronimo/sandbox/svkmerge/m2migration/modules/system/pom.xml

Modified: geronimo/sandbox/svkmerge/m2migration/modules/system/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/modules/system/pom.xml?rev=424184&r1=424183&r2=424184&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/modules/system/pom.xml (original)
+++ geronimo/sandbox/svkmerge/m2migration/modules/system/pom.xml Thu Jul 20 22:19:46 2006
@@ -92,6 +92,11 @@
                 <directory>${pom.basedir}/src/schema</directory>
                 <targetPath>META-INF/schema</targetPath>
             </resource>
+            
+            <!-- Include the dynamically generated resources (see below) -->
+            <resource>
+                <directory>${pom.basedir}/target/resources</directory>
+            </resource>
         </resources>
         
         <testResources>
@@ -132,39 +137,51 @@
             <plugin>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
-                    
                     <execution>
-                        <id>exec-1</id>
-                        <phase>process-classes</phase>
+                        <id>generate-dynamic-properties</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
                         <configuration>
                             <tasks>
                                 <tstamp>
-                                    <format property="build.date" pattern="yyyy.MM.dd"/>
-                                    <format property="build.time" pattern="HH:mm:ss.SSSZ"/>
                                     <format property="build.year" pattern="yyyy"/>
                                 </tstamp>
-                                <echo file="${basedir}/target/classes/org/apache/geronimo/system/serverinfo/geronimo-version.properties">
-##### Generated by Maven2 ####
-version=${pom.version}
-build.date=${build.date}
-build.time=${build.time}
-copyright=Copyright (C) 2003-${build.year}, The Apache Software Foundation</echo>
-                                <echo file="${basedir}/target/classes/META-INF/product-versions.properties">
-#####Generated by Maven ####
-geronimo=${pom.version}
-activemq=${activemqVersion}
-openejb=${openejbVersion} tranql=${tranqlVersion}
-</echo>
+                                
+                                <mkdir dir="${pom.basedir}/target/resources/org/apache/geronimo/system/serverinfo"/>
+                                
+                                <propertyfile
+                                    file="${pom.basedir}/target/resources/org/apache/geronimo/system/serverinfo/geronimo-version.properties"
+                                    comment="Geronimo version information (generated, do
not modify)">
+                                    
+                                    <entry key="version" value="${pom.version}"/>
+                                    <entry key="build.date" type="date" value="now" pattern="yyyy.MM.dd"/>
+                                    <entry key="build.time" type="date" value="now" pattern="HH:mm:ss.SSSZ"/>
+                                    <entry key="copyright" value="Copyright (C) 2003-${build.year},
The Apache Software Foundation"/>
+                                </propertyfile>
+                                
+                                <mkdir dir="${pom.basedir}/target/resources/META-INF"/>
+                                
+                                <propertyfile
+                                    file="${pom.basedir}/target/resources/META-INF/product-versions.properties"
+                                    comment="Product version information (generated, do not
modify)">
+                                    
+                                    <entry key="geronimo" value="${pom.version}"/>
+                                    <entry key="activemq" value="${activeMqVersion}"/>
+                                    <entry key="openejb" value="${openejbVersion}"/>
+                                    <entry key="tranql" value="${tranqlVersion}"/>
+                                </propertyfile>
                             </tasks>
                         </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
                     </execution>
                     
                     <execution>
-                        <id>exec-2</id>
+                        <id>test-resources</id>
                         <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
                         <configuration>
                             <tasks>
                                 <delete dir="${project.build.directory}/tmp"/>
@@ -179,11 +196,16 @@
                                 </copy>
                             </tasks>
                         </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
                     </execution>
                 </executions>
+                
+                <dependencies>
+                    <dependency>
+                        <groupId>ant</groupId>
+                        <artifactId>ant-nodeps</artifactId>
+                        <version>1.6.5</version>
+                    </dependency>
+                </dependencies>
             </plugin>
         </plugins>
     </build>



Mime
View raw message