incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r956982 - in /incubator/bval/trunk: bundle/pom.xml bval-core/pom.xml pom.xml
Date Tue, 22 Jun 2010 19:15:38 GMT
Author: dwoods
Date: Tue Jun 22 19:15:38 2010
New Revision: 956982

URL: http://svn.apache.org/viewvc?rev=956982&view=rev
Log:
BVAL-59 Use buildnumber-maven-plugin to retrieve the svn revision

Modified:
    incubator/bval/trunk/bundle/pom.xml
    incubator/bval/trunk/bval-core/pom.xml
    incubator/bval/trunk/pom.xml

Modified: incubator/bval/trunk/bundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bundle/pom.xml?rev=956982&r1=956981&r2=956982&view=diff
==============================================================================
--- incubator/bval/trunk/bundle/pom.xml (original)
+++ incubator/bval/trunk/bundle/pom.xml Tue Jun 22 19:15:38 2010
@@ -59,7 +59,8 @@
                     <instructions>
                         <!-- OSGi Bundle Metadata -->
                         <Main-Class>org.apache.bval.util.BeanValidationVersion</Main-Class>
-                        <Implementation-Title>Apache Bean Validation Bundle</Implementation-Title>
+                        <Implementation-Title>Apache Bean Validation</Implementation-Title>
+                        <Implementation-Build>${buildNumber}</Implementation-Build>
                         <Specification-Title>JSR-303 Bean Validation</Specification-Title>
                         <Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
                         <Specification-Version>1.0</Specification-Version>

Modified: incubator/bval/trunk/bval-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-core/pom.xml?rev=956982&r1=956981&r2=956982&view=diff
==============================================================================
--- incubator/bval/trunk/bval-core/pom.xml (original)
+++ incubator/bval/trunk/bval-core/pom.xml Tue Jun 22 19:15:38 2010
@@ -80,24 +80,18 @@
                         <phase>compile</phase>
                         <configuration>
                             <tasks>
-                                <property name="tmpdir" value="${java.io.tmpdir}/bvalmvntmp"
/>
-                                <condition property="outdir" value="${project.build.outputDirectory}">
-                                    <available type="dir" file="${project.build.outputDirectory}"
/>
-                                </condition>
-                                <property name="outdir" value="${tmpdir}" />
-                                <property name="svnversion.executable" value="svnversion"
/>
-                                <exec outputproperty="subversion.revision" failonerror="false"
failifexecutionfails="false" executable="${svnversion.executable}">
-                                    <arg line="-c ${basedir}/.." />
-                                </exec>
-                                <property name="subversion.revision" value="unknown" />
-                                <echo>Revision: ${subversion.revision}</echo>
                                 <echo>Version: ${project.version}</echo>
-                                <mkdir dir="${outdir}/META-INF" />
-                                <echo file="${outdir}/META-INF/org.apache.bval.revision.properties">
-svn.revision=${subversion.revision}
+                                <echo>Revision: ${buildNumber}</echo>
+                                <echo>Date: ${timestamp}</echo>
+                                <mkdir dir="${project.build.outputDirectory}/META-INF"
/>
+                                <echo file="${project.build.outputDirectory}/META-INF/org.apache.bval.revision.properties">
+# Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
+project.name=Apache Bean Validation
 project.version=${project.version}
+svn.revision=${buildNumber}
+svn.branch=${scmBranch}
+build.timestamp=${timestamp}
                                 </echo>
-                                <delete dir="${tmpdir}" />
                             </tasks>
                         </configuration>
                         <goals>
@@ -120,8 +114,12 @@ project.version=${project.version}
                         <configuration>
                             <archive>
                                 <manifest>
+                                   <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                    <mainClass>org.apache.bval.util.BeanValidationVersion</mainClass>
                                 </manifest>
+                                <manifestEntries>
+                                    <Implementation-Build>${buildNumber}</Implementation-Build>
+                                </manifestEntries>
                             </archive>
                         </configuration>
                     </execution>

Modified: incubator/bval/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/pom.xml?rev=956982&r1=956981&r2=956982&view=diff
==============================================================================
--- incubator/bval/trunk/pom.xml (original)
+++ incubator/bval/trunk/pom.xml Tue Jun 22 19:15:38 2010
@@ -303,6 +303,23 @@
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <configuration>
+                        <archive>
+                            <manifest>
+                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                            </manifest>
+                            <manifestEntries>
+                                <Implementation-Build>${buildNumber}</Implementation-Build>
+                                <Specification-Title>JSR-303 Bean Validation</Specification-Title>
+                                <Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
+                                <Specification-Version>1.0</Specification-Version>
+                            </manifestEntries>
+                        </archive>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-javadoc-plugin</artifactId>
                     <configuration>
                         <encoding>${project.build.sourceEncoding}</encoding>
@@ -456,6 +473,11 @@
                     <artifactId>findbugs-maven-plugin</artifactId>
                     <version>2.3.1</version>
                 </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>buildnumber-maven-plugin</artifactId>
+                    <version>1.0-beta-4</version>
+                </plugin>
             </plugins>
         </pluginManagement>
 
@@ -494,6 +516,22 @@
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>ianal-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>buildnumber-maven-plugin</artifactId>
+                <configuration>
+                    <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
+                    <revisionOnScmFailure>offline</revisionOnScmFailure>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>create</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
             <!-- Don't include in all builds for now
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>



Mime
View raw message