HHH-9471 corrected OSGi test client bundle manifest, improved arquillian/felix logging setup

This commit is contained in:
Brett Meyer 2014-12-17 16:18:09 -05:00
parent e2de2a6fcf
commit 45eb25d4d0
2 changed files with 44 additions and 55 deletions

View File

@ -32,6 +32,8 @@ dependencies {
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.main:4.0.3" )
testRuntime( libraries.slf4j_api );
testRuntime( libraries.slf4j_log4j );
testRuntime( "org.jboss.logmanager:jboss-logmanager:1.4.1.Final" )
// 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) {
from "src/test/resources/bnd"
into "$buildDir/osgi-lib/bnd"
@ -145,13 +152,12 @@ task testClientBundleJar(type: Jar) {
"Bundle-SymbolicName" : "testClientBundle",
"Import-Package" : "javassist.util.proxy,javax.persistence,javax.persistence.spi,org.h2,org.osgi.framework,"
+ "org.hibernate,"
+ "org.hibernate.boot.model,"
+ "org.hibernate.boot.registry.selector,"
+ "org.hibernate.boot.registry.selector.spi,"
+ "org.hibernate.cfg,"
+ "org.hibernate.engine.spi,"
+ "org.hibernate.integrator.spi,"
+ "org.hibernate.metamodel.source,"
+ "org.hibernate.metamodel.spi,"
+ "org.hibernate.proxy,"
+ "org.hibernate.service,"
+ "org.hibernate.service.spi")

View File

@ -1,55 +1,38 @@
#
# JBoss, Home of Professional Open Source.
# 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,
###
# #%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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General 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.
#
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Lesser Public License for more details.
#
# 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)
loggers=org.jboss.modules,org.jboss.osgi.resolver
#logger.org.jboss.shrinkwrap.level=TRACE
logger.org.jboss.osgi.resolver.level=TRACE
logger.org.jboss.modules.level=TRACE
# Root logger level
logger.level=TRACE
# Root logger handlers
logger.handlers=FILE
#logger.handlers=FILE,CONSOLE
# Console handler configuration
handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
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
# Root logger option
log4j.rootLogger=DEBUG, file
# Direct log messages to a log file
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
# Direct log messages to console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Target=System.out
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%c] (%t) - %m%n
log4j.appender.console.Threshold=WARN