HHH-6787 upgrade to JBoss Logging tools 1.0.0.CR3

This commit is contained in:
Strong Liu 2011-11-01 14:53:31 +08:00 committed by Sanne Grinovero
parent 388ceaf186
commit 2d084cb8d9
3 changed files with 15 additions and 12 deletions

View File

@ -83,9 +83,9 @@ libraries = [
jacc: 'org.jboss.spec.javax.security.jacc:jboss-jacc-api_1.4_spec:1.0.0.Final', jacc: 'org.jboss.spec.javax.security.jacc:jboss-jacc-api_1.4_spec:1.0.0.Final',
// logging // logging
logging: 'org.jboss.logging:jboss-logging:3.0.0.GA', logging: 'org.jboss.logging:jboss-logging:3.1.0.Beta3',
logging_generator: 'org.jboss.logging:jboss-logging-generator:1.0.0.Beta7', logging_generator: 'org.jboss.logging:jboss-logging-generator:1.0.0.CR3',
logging_processor: 'org.jboss.logging:jboss-logging-processor:1.0.0.Beta7', logging_processor: 'org.jboss.logging:jboss-logging-processor:1.0.0.CR3',
slf4j_api: 'org.slf4j:slf4j-api:' + slf4jVersion, slf4j_api: 'org.slf4j:slf4j-api:' + slf4jVersion,
slf4j_log4j12: 'org.slf4j:slf4j-log4j12:' + slf4jVersion, slf4j_log4j12: 'org.slf4j:slf4j-log4j12:' + slf4jVersion,
jcl_slf4j: 'org.slf4j:jcl-over-slf4j:' + slf4jVersion, jcl_slf4j: 'org.slf4j:jcl-over-slf4j:' + slf4jVersion,
@ -168,20 +168,21 @@ subprojects { subProject ->
} }
task generateMainLoggingClasses(type: Compile) { task generateMainLoggingClasses(type: Compile) {
classpath = compileJava.classpath + configurations.jbossLoggingTool classpath = compileJava.classpath + configurations.jbossLoggingTool
source = sourceSets.main.originalJavaSrcDirs source = sourceSets.main.originalJavaSrcDirs
destinationDir = aptDumpDir destinationDir = aptDumpDir
options.define( options.define(
compilerArgs: [ compilerArgs: [
"-nowarn", "-nowarn",
"-proc:only", "-proc:only",
"-encoding", "UTF-8", "-encoding", "UTF-8",
"-processor", "org.jboss.logging.LoggingToolsProcessor", "-processor", "org.jboss.logging.generator.apt.LoggingToolsProcessor",
"-s", "$sourceSets.main.generatedLoggingSrcDir.absolutePath" "-s", "$sourceSets.main.generatedLoggingSrcDir.absolutePath"
] ]
); );
outputs.dir sourceSets.main.generatedLoggingSrcDir; outputs.dir sourceSets.main.generatedLoggingSrcDir;
doFirst { doFirst {
source = sourceSets.main.originalJavaSrcDirs
sourceSets.main.generatedLoggingSrcDir.mkdirs() sourceSets.main.generatedLoggingSrcDir.mkdirs()
} }
} }

View File

@ -43,9 +43,9 @@ sourceSets {
} }
} }
sourceSets.main { sourceSets.main {
originalJavaSrcDirs = java.srcDirs
jaxbTargetDir = file( "${buildDir}/generated-src/jaxb/main" ) jaxbTargetDir = file( "${buildDir}/generated-src/jaxb/main" )
java.srcDir jaxbTargetDir java.srcDir jaxbTargetDir
originalJavaSrcDirs = java.srcDirs
} }
// resources inherently exclude sources // resources inherently exclude sources
@ -113,6 +113,8 @@ task jaxb {
} }
} }
generateMainLoggingClasses.dependsOn jaxb
generateMainLoggingClasses.dependsOn generateGrammarSource
compileJava.dependsOn jaxb compileJava.dependsOn jaxb

View File

@ -214,7 +214,7 @@ public interface CoreMessageLogger extends BasicLogger {
void deprecatedOracleDialect(); void deprecatedOracleDialect();
@LogMessage(level = WARN) @LogMessage(level = WARN)
@Message(value = "DEPRECATED : use {} instead with custom {} implementation", id = 65) @Message(value = "DEPRECATED : use [%s] instead with custom [%s] implementation", id = 65)
void deprecatedUuidGenerator(String name, void deprecatedUuidGenerator(String name,
String name2); String name2);
@ -1234,7 +1234,7 @@ public interface CoreMessageLogger extends BasicLogger {
void unableToRemoveBagJoinFetch(); void unableToRemoveBagJoinFetch();
@LogMessage(level = INFO) @LogMessage(level = INFO)
@Message(value = "Could not resolve aggregate function {}; using standard definition", id = 359) @Message(value = "Could not resolve aggregate function [%s]; using standard definition", id = 359)
void unableToResolveAggregateFunction(String name); void unableToResolveAggregateFunction(String name);
@LogMessage(level = INFO) @LogMessage(level = INFO)
@ -1498,7 +1498,7 @@ public interface CoreMessageLogger extends BasicLogger {
void disablingContextualLOBCreationSinceCreateClobFailed(Throwable t); void disablingContextualLOBCreationSinceCreateClobFailed(Throwable t);
@LogMessage(level = INFO) @LogMessage(level = INFO)
@Message(value = "Could not close session; swallowing exception as transaction completed", id = 425) @Message(value = "Could not close session; swallowing exception[%s] as transaction completed", id = 425)
void unableToCloseSessionButSwallowingError(HibernateException e); void unableToCloseSessionButSwallowingError(HibernateException e);
@LogMessage(level = WARN) @LogMessage(level = WARN)