Permalink
Browse files

HCNN-38 changing to use jboss logging from slf4j

add .gitignore
add maven-source-plugin
add maven-injection-plugin
add maven-jar-plugin
  • Loading branch information...
1 parent ddc0800 commit 7cb7bc5ae6de68f87253662a8fe4d73fe7c0a514 @stliu stliu committed Aug 31, 2011
View
@@ -0,0 +1,33 @@
+# Typically *NIX text editors, by default, append '~' to files on saving to make backups
+*~
+
+# Gradle work directory
+.gradle
+
+# Build output directies
+/target
+*/target
+/build
+*/build
+
+# IntelliJ specific files/directories
+out
+.idea
+*.ipr
+*.iws
+*.iml
+atlassian-ide-plugin.xml
+
+# Eclipse specific files/directories
+.classpath
+.project
+.settings
+.metadata
+bin
+
+# NetBeans specific files/directories
+.nbattrs
+
+# Miscellaneous
+*.log
+.clover
View
130 pom.xml
@@ -104,8 +104,14 @@
<dependencies>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ <version>${jbossLoggingVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ <version>${jbossLoggingProcessorVersion}</version>
</dependency>
<!-- test-scoped dependencies for common testing dependencies -->
<dependency>
@@ -114,43 +120,9 @@
<version>3.8.1</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>${slf4jVersion}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${slf4jVersion}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
<!-- / test-scoped dependencies for common testing dependencies -->
</dependencies>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4jVersion}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<distributionManagement>
<repository>
<id>jboss-releases-repository</id>
@@ -165,17 +137,97 @@
</distributionManagement>
<properties>
- <slf4jVersion>1.5.8</slf4jVersion>
+ <jbossLoggingVersion>3.0.0.GA</jbossLoggingVersion>
+ <jbossLoggingProcessorVersion>1.0.0.Beta7</jbossLoggingProcessorVersion>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Implementation-Title>${project.name}</Implementation-Title>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ <Implementation-Vendor>hibernate.org</Implementation-Vendor>
+ <Implementation-Vendor-Id>hibernate.org</Implementation-Vendor-Id>
+ <Implementation-URL>http://hibernate.org</Implementation-URL>
+ </manifestEntries>
+ <manifest>
+ <mainClass>org.hibernate.annotations.common.Version</mainClass>
+ </manifest>
+
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build-test-jar</id>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </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>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <bytecodeInjections>
+ <bytecodeInjection>
+ <expression>${project.version}</expression>
+ <targetMembers>
+ <methodBodyReturn>
+ <className>org.hibernate.annotations.common.Version</className>
+ <methodName>getVersionString</methodName>
+ </methodBodyReturn>
+ </targetMembers>
+ </bytecodeInjection>
+ </bytecodeInjections>
</configuration>
</plugin>
</plugins>
@@ -22,9 +22,7 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.annotations.common;
-
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
+import org.jboss.logging.Logger;
/**
@@ -37,7 +35,7 @@
*/
public class AssertionFailure extends RuntimeException {
- private static final Logger log = LoggerFactory.getLogger(AssertionFailure.class);
+ private static final Logger log = Logger.getLogger( AssertionFailure.class );
private static final String MESSAGE = "an assertion failure occured (this may indicate a bug in Hibernate)";
@@ -23,20 +23,26 @@
*/
package org.hibernate.annotations.common;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.jboss.logging.Logger;
/**
* @author Emmanuel Bernard
*/
public class Version {
- public static final String VERSION = "3.2.1-SNAPSHOT";
- private static Logger log = LoggerFactory.getLogger( Version.class );
+ private static final Logger log = Logger.getLogger( Version.class );
static {
- log.info( "Hibernate Commons Annotations {}", VERSION );
+ log.info( "Hibernate Commons Annotations {" + getVersionString() + "}" );
}
+ public static String getVersionString(){
+ return "[WORKING]";
+ }
+
public static void touch() {
}
+
+ public static void main(String[] args) {
+ System.out.println( "Hibernate Commons Annotations {" + getVersionString() + "}" );
+ }
}

0 comments on commit 7cb7bc5

Please sign in to comment.