In this quick post I will show you what you need to do to show colours in your maven build.
- Navigate to wherever you have installed maven and go into the lib folder
~/apache-maven-3.3.1/lib
- Delete slf4j-simple-1.7.5.jar
- Find on the internet the following jars and add them to the lib folder
log4j-api-2.2.jar
log4j-core-2.2.jar
log4j-slf4j-impl-2.2.jar
slf4j-ext-1.7.5.jar - Get out of the lib folder and navigate into the conf folder once in there create a file called log4j2.xml and add the following content:
<?xmlversion="1.0"encoding="UTF-8"?><Configuration><Properties><Propertyname="maven.logging.root.level">INFO</Property></Properties><Appenders><Consolename="console"target="SYSTEM_OUT"><PatternLayoutpattern="%highlight{[%p] %msg%n%throwable}"/></Console></Appenders><Loggers><Rootlevel="${sys:maven.logging.root.level}"><Appender-refref="console"/></Root></Loggers></Configuration> - Go to the terminal and try building a maven project
No comments:
Post a Comment