HHH-9471 corrected OSGi test client bundle manifest, improved arquillian/felix logging setup
This commit is contained in:
parent
60d4fe5001
commit
0c7f7369da
|
@ -12,12 +12,6 @@ sourceSets.test {
|
||||||
runtimeClasspath += sourceSets.testClientBundle.output
|
runtimeClasspath += sourceSets.testClientBundle.output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// temporary for HHH-9466
|
|
||||||
test {
|
|
||||||
enabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile( project( ':hibernate-core' ) )
|
compile( project( ':hibernate-core' ) )
|
||||||
compile( project( ':hibernate-entitymanager' ) )
|
compile( project( ':hibernate-entitymanager' ) )
|
||||||
|
@ -33,6 +27,8 @@ dependencies {
|
||||||
testRuntime( "org.jboss.arquillian.container:arquillian-osgi-felix:2.0.0.CR4" )
|
testRuntime( "org.jboss.arquillian.container:arquillian-osgi-felix:2.0.0.CR4" )
|
||||||
testRuntime( "org.apache.felix:org.apache.felix.framework:4.0.3" )
|
testRuntime( "org.apache.felix:org.apache.felix.framework:4.0.3" )
|
||||||
testRuntime( "org.apache.felix:org.apache.felix.main:4.0.3" )
|
testRuntime( "org.apache.felix:org.apache.felix.main:4.0.3" )
|
||||||
|
testRuntime( libraries.slf4j_api );
|
||||||
|
testRuntime( libraries.slf4j_log4j );
|
||||||
testRuntime( "org.jboss.logmanager:jboss-logmanager:1.4.1.Final" )
|
testRuntime( "org.jboss.logmanager:jboss-logmanager:1.4.1.Final" )
|
||||||
|
|
||||||
// Local copies of all jars needed fur the OSGi runtime. Ignore the transitive dependencies.
|
// Local copies of all jars needed fur the OSGi runtime. Ignore the transitive dependencies.
|
||||||
|
@ -86,6 +82,11 @@ jar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
systemProperties['java.util.logging.manager'] = "org.jboss.logmanager.LogManager"
|
||||||
|
systemProperties['log4j.configuration'] = "file://$projectDir/src/test/resources/logging.properties"
|
||||||
|
}
|
||||||
|
|
||||||
task copyBnd(type: Copy) {
|
task copyBnd(type: Copy) {
|
||||||
from "src/test/resources/bnd"
|
from "src/test/resources/bnd"
|
||||||
into "$buildDir/osgi-lib/bnd"
|
into "$buildDir/osgi-lib/bnd"
|
||||||
|
@ -146,13 +147,12 @@ task testClientBundleJar(type: Jar) {
|
||||||
"Bundle-SymbolicName" : "testClientBundle",
|
"Bundle-SymbolicName" : "testClientBundle",
|
||||||
"Import-Package" : "javassist.util.proxy,javax.persistence,javax.persistence.spi,org.h2,org.osgi.framework,"
|
"Import-Package" : "javassist.util.proxy,javax.persistence,javax.persistence.spi,org.h2,org.osgi.framework,"
|
||||||
+ "org.hibernate,"
|
+ "org.hibernate,"
|
||||||
|
+ "org.hibernate.boot.model,"
|
||||||
+ "org.hibernate.boot.registry.selector,"
|
+ "org.hibernate.boot.registry.selector,"
|
||||||
+ "org.hibernate.boot.registry.selector.spi,"
|
+ "org.hibernate.boot.registry.selector.spi,"
|
||||||
+ "org.hibernate.cfg,"
|
+ "org.hibernate.cfg,"
|
||||||
+ "org.hibernate.engine.spi,"
|
+ "org.hibernate.engine.spi,"
|
||||||
+ "org.hibernate.integrator.spi,"
|
+ "org.hibernate.integrator.spi,"
|
||||||
+ "org.hibernate.metamodel.source,"
|
|
||||||
+ "org.hibernate.metamodel.spi,"
|
|
||||||
+ "org.hibernate.proxy,"
|
+ "org.hibernate.proxy,"
|
||||||
+ "org.hibernate.service,"
|
+ "org.hibernate.service,"
|
||||||
+ "org.hibernate.service.spi")
|
+ "org.hibernate.service.spi")
|
||||||
|
|
|
@ -1,55 +1,38 @@
|
||||||
|
###
|
||||||
|
# #%L
|
||||||
|
# JBossOSGi Resolver API
|
||||||
|
# %%
|
||||||
|
# Copyright (C) 2013 JBoss by Red Hat
|
||||||
|
# %%
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 2.1 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# JBoss, Home of Professional Open Source.
|
# This program is distributed in the hope that it will be useful,
|
||||||
# Copyright 2010, Red Hat, Inc., and individual contributors
|
|
||||||
# as indicated by the @author tags. See the copyright.txt file in the
|
|
||||||
# distribution for a full listing of individual contributors.
|
|
||||||
#
|
|
||||||
# This is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU Lesser General Public License as
|
|
||||||
# published by the Free Software Foundation; either version 2.1 of
|
|
||||||
# the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This software is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# Lesser General Public License for more details.
|
# GNU General Lesser Public License for more details.
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this software; if not, write to the Free
|
|
||||||
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
||||||
#
|
#
|
||||||
|
# You should have received a copy of the GNU General Lesser Public
|
||||||
|
# License along with this program. If not, see
|
||||||
|
# <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
|
# #L%
|
||||||
|
###
|
||||||
|
|
||||||
# Additional logger names to configure (root logger is always configured)
|
# Root logger option
|
||||||
loggers=org.jboss.modules,org.jboss.osgi.resolver
|
log4j.rootLogger=DEBUG, file
|
||||||
#logger.org.jboss.shrinkwrap.level=TRACE
|
|
||||||
logger.org.jboss.osgi.resolver.level=TRACE
|
|
||||||
logger.org.jboss.modules.level=TRACE
|
|
||||||
|
|
||||||
# Root logger level
|
# Direct log messages to a log file
|
||||||
logger.level=TRACE
|
log4j.appender.file=org.apache.log4j.FileAppender
|
||||||
|
log4j.appender.file.File=target/test.log
|
||||||
|
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%c] (%t) - %m%n
|
||||||
|
log4j.appender.file.Threshold=DEBUG
|
||||||
|
|
||||||
# Root logger handlers
|
# Direct log messages to console
|
||||||
logger.handlers=FILE
|
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||||
#logger.handlers=FILE,CONSOLE
|
log4j.appender.console.Target=System.out
|
||||||
|
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||||
# Console handler configuration
|
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%c] (%t) - %m%n
|
||||||
handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
|
log4j.appender.console.Threshold=WARN
|
||||||
handler.CONSOLE.properties=autoFlush
|
|
||||||
handler.CONSOLE.level=TRACE
|
|
||||||
handler.CONSOLE.autoFlush=true
|
|
||||||
handler.CONSOLE.formatter=PATTERN
|
|
||||||
|
|
||||||
|
|
||||||
# Console handler configuration
|
|
||||||
handler.FILE=org.jboss.logmanager.handlers.FileHandler
|
|
||||||
handler.FILE.properties=autoFlush,fileName
|
|
||||||
handler.FILE.level=TRACE
|
|
||||||
handler.FILE.autoFlush=true
|
|
||||||
handler.FILE.fileName=./target/test.log
|
|
||||||
handler.FILE.formatter=PATTERN
|
|
||||||
|
|
||||||
# Formatter pattern configuration
|
|
||||||
formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
|
|
||||||
formatter.PATTERN.properties=pattern
|
|
||||||
formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n
|
|
Loading…
Reference in New Issue