HHH-9471 corrected OSGi test client bundle manifest, improved arquillian/felix logging setup
This commit is contained in:
parent
e2de2a6fcf
commit
45eb25d4d0
|
@ -32,6 +32,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.
|
||||||
|
@ -85,6 +87,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"
|
||||||
|
@ -145,13 +152,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 @@
|
||||||
#
|
###
|
||||||
# JBoss, Home of Professional Open Source.
|
# #%L
|
||||||
# Copyright 2010, Red Hat, Inc., and individual contributors
|
# JBossOSGi Resolver API
|
||||||
# as indicated by the @author tags. See the copyright.txt file in the
|
# %%
|
||||||
# distribution for a full listing of individual contributors.
|
# Copyright (C) 2013 JBoss by Red Hat
|
||||||
#
|
# %%
|
||||||
# This is free software; you can redistribute it and/or modify it
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# under the terms of the GNU Lesser General Public License as
|
# it under the terms of the GNU Lesser General Public License as
|
||||||
# published by the Free Software Foundation; either version 2.1 of
|
# published by the Free Software Foundation, either version 2.1 of the
|
||||||
# the License, or (at your option) any later version.
|
# License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This software is distributed in the hope that it will be useful,
|
# This program 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
|
# You should have received a copy of the GNU General Lesser Public
|
||||||
# License along with this software; if not, write to the Free
|
# License along with this program. If not, see
|
||||||
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
# <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
# #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
|
# Direct log messages to a log file
|
||||||
logger.org.jboss.modules.level=TRACE
|
log4j.appender.file=org.apache.log4j.FileAppender
|
||||||
|
log4j.appender.file.File=target/test.log
|
||||||
# Root logger level
|
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||||
logger.level=TRACE
|
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
|
|
||||||
logger.handlers=FILE
|
# Direct log messages to console
|
||||||
#logger.handlers=FILE,CONSOLE
|
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||||
|
log4j.appender.console.Target=System.out
|
||||||
# Console handler configuration
|
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||||
handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
|
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%c] (%t) - %m%n
|
||||||
handler.CONSOLE.properties=autoFlush
|
log4j.appender.console.Threshold=WARN
|
||||||
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