[hibernate-commits] Hibernate SVN: r18575 - in core/trunk: annotations/src/main/java/org/hibernate/cfg/annotations and 4 other directories.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Mon Jan 18 14:17:28 EST 2010
Author: hardy.ferentschik
Date: 2010-01-18 14:17:27 -0500 (Mon, 18 Jan 2010)
New Revision: 18575
Modified:
core/trunk/annotations/pom.xml
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/Version.java
core/trunk/core/pom.xml
core/trunk/entitymanager/pom.xml
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Version.java
core/trunk/parent/pom.xml
Log:
HHH-4813 - annotation and entitymanager module should use the maven-injection-plugin to generate version string
Modified: core/trunk/annotations/pom.xml
===================================================================
--- core/trunk/annotations/pom.xml 2010-01-18 19:08:55 UTC (rev 18574)
+++ core/trunk/annotations/pom.xml 2010-01-18 19:17:27 UTC (rev 18575)
@@ -107,9 +107,26 @@
<artifactId>maven-test-ext-plugin</artifactId>
</plugin>
<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-injection-plugin</artifactId>
+ <configuration>
+ <bytecodeInjections>
+ <bytecodeInjection>
+ <expression>${pom.version}</expression>
+ <targetMembers>
+ <methodBodyReturn>
+ <className>org.hibernate.cfg.annotations.Version</className>
+ <methodName>getVersionString</methodName>
+ </methodBodyReturn>
+ </targetMembers>
+ </bytecodeInjection>
+ </bytecodeInjections>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.twdata.maven</groupId>
<artifactId>maven-cli-plugin</artifactId>
- <version>0.6.3.CR2</version>
+ <version>0.6.4</version>
</plugin>
</plugins>
</build>
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/Version.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/Version.java 2010-01-18 19:08:55 UTC (rev 18574)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/Version.java 2010-01-18 19:17:27 UTC (rev 18575)
@@ -1,3 +1,4 @@
+// $Id:$
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
@@ -23,8 +24,6 @@
*/
package org.hibernate.cfg.annotations;
-import java.util.Date;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,11 +31,14 @@
* @author Emmanuel Bernard
*/
public class Version {
- public static final String VERSION = "3.5.0." + new Date();
private static Logger log = LoggerFactory.getLogger( Version.class );
+ public static String getVersionString() {
+ return "[WORKING]";
+ }
+
static {
- log.info( "Hibernate Annotations {}", VERSION );
+ log.info( "Hibernate Annotations {}", getVersionString() );
}
public static void touch() {
Modified: core/trunk/core/pom.xml
===================================================================
--- core/trunk/core/pom.xml 2010-01-18 19:08:55 UTC (rev 18574)
+++ core/trunk/core/pom.xml 2010-01-18 19:17:27 UTC (rev 18575)
@@ -98,15 +98,6 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-injection-plugin</artifactId>
- <version>1.0.2</version>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>bytecode</goal>
- </goals>
- </execution>
- </executions>
<configuration>
<bytecodeInjections>
<bytecodeInjection>
Modified: core/trunk/entitymanager/pom.xml
===================================================================
--- core/trunk/entitymanager/pom.xml 2010-01-18 19:08:55 UTC (rev 18574)
+++ core/trunk/entitymanager/pom.xml 2010-01-18 19:17:27 UTC (rev 18575)
@@ -86,6 +86,23 @@
</testResources>
<plugins>
<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-injection-plugin</artifactId>
+ <configuration>
+ <bytecodeInjections>
+ <bytecodeInjection>
+ <expression>${pom.version}</expression>
+ <targetMembers>
+ <methodBodyReturn>
+ <className>org.hibernate.ejb.Version</className>
+ <methodName>getVersionString</methodName>
+ </methodBodyReturn>
+ </targetMembers>
+ </bytecodeInjection>
+ </bytecodeInjections>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<!-- Define one configuration outside executions and without a phase in order to allow 'mvn antrun:run' -->
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Version.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Version.java 2010-01-18 19:08:55 UTC (rev 18574)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Version.java 2010-01-18 19:17:27 UTC (rev 18575)
@@ -1,3 +1,4 @@
+// $Id:$
/*
* Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
@@ -23,8 +24,6 @@
//$Id$
package org.hibernate.ejb;
-import java.util.Date;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -33,11 +32,14 @@
* @author Emmanuel Bernard
*/
public class Version {
- public static final String VERSION = "3.5.0." + new Date();
- private static final Logger log = LoggerFactory.getLogger( Version.class );
+ private static Logger log = LoggerFactory.getLogger( Version.class );
+ public static String getVersionString() {
+ return "[WORKING]";
+ }
+
static {
- log.info( "Hibernate EntityManager {}", VERSION );
+ log.info( "Hibernate EntityManager {}", getVersionString() );
}
public static void touch() {
Modified: core/trunk/parent/pom.xml
===================================================================
--- core/trunk/parent/pom.xml 2010-01-18 19:08:55 UTC (rev 18574)
+++ core/trunk/parent/pom.xml 2010-01-18 19:17:27 UTC (rev 18575)
@@ -323,6 +323,19 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-injection-plugin</artifactId>
+ <version>1.0.2</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>bytecode</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</pluginManagement>
More information about the hibernate-commits
mailing list