maven


Different log4j settings when running with Maven than when running from Eclipse


I'd like my console to be as quiet as possible when I run my tests with mvn test, unless something goes wrong. Then again, when I'm writing tests in Eclipse (in other words, when I run single junit tests inside Eclipse), it's ok for them to be pretty verbose.
So I would need a way to have different log4j/logback settings when running all my tests with surefire than when I run them one by one in Eclipse. Is there a way to accomplish this?
You can configure surefire to use a different logger settings file. That will be ignored by Eclipse.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dlogback.configuration=[wherever]</argLine>
</configuration>
</plugin>

Related Links

Leiningen equivalent for maven dependency `type` element
Nexus Unable to connect with repos on the Internet
Excluding generated-sources from source:jar
Debug Jar that is a Maven Dependency to a Main Project
Can surefire and failsafe plugin deliberately randomize execution order of test classes?
What are “optional” Maven dependencies? [closed]
Cobertura code coverage for failed tests
amazon aws artifacts could not be resolved
difference between “dependency information” and “dependencies” in the auto-generated site
How to set parameters from console to own maven report plugin
Maven Plugin Logging
How to do continuous integration with Hudson for Maven 3 multi-module projects well?
How to pause a maven build inbetween?
Supporting DocBook olink in Maven Project
Maven jaxws plugin fails with java.lang.UnsupportedClassVersionError: Bad version number in .class file
Maven override properties from command line does for child modules cross reference

Categories

HOME
cakephp
listview
webpack
zeromq
comparison
hashmap
fme
webstorm
jsp-tags
google-docs
adb
sqlite3
ebean
paradox
virtualization
facebook-messenger-bot
applepay
mapserver
collectd
spring-tool-suite
designer
vaadin7
code-review
google-cloud-speech
django-cms
firefox-webextensions
kudan
wijmo
facet
info.plist
xacml
elasticsearch-net
facebook-apps
c++-amp
.net-4.0
jspresso
gtrendsr
fog
caret
framemaker
asset-pipeline
appfabric
xcode-extension
dynamics-crm-2013
squib
avro4s
pdf-reactor
glew
galleria
babel-core
network-flow
return-value
mu
aurelia-validation
media-player
r-forge
pintos
watchconnectivity
underscore.js-templating
measures
asp.net-4.5
nsfilemanager
qpid
simplewebrtc
superstack
captivenetwork
energy
intel-fortran
intellij-14
emailrelay
map-projections
dundas
clipperlib
directoryservices
npapi
block-device
camanjs
file-copying
asp.net-web-api-odata
wordpress-theme-customize
aapt
android-2.2-froyo
message-driven-bean
viadeo
apc
dbconnection
ril
django-nonrel
pygit2
robotics-studio
factory-method
tinn-r
anonymous-methods
gil
pysimplesoap
spring-portlet-mvc
gnu-prolog
pydot
file-comparison
mysql-error-1005
html-input
asp.net-mvc-areas
web-application-design
mozilla-prism
database-management
meego
webkit.net
mediarss
zune

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile