Maven by Example - 4.7. Add Resources |
|
This project depends on two classpath resources: the To add these resources, we’ll need to create a new directory from the
base directory of the project: $ cd src/main $ mkdir resources $ cd resources Once the resources directory is created, we can add the two
resources. First, add the Simple Weather’s Log4J Configuration File. # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE # CONSOLE is set to be a ConsoleAppender using a PatternLayout. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Threshold=INFO log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%-4r %-5p %c{1} %x - %m%n
This Simple Weather’s Output Velocity Template. ********************************* Current Weather Conditions for: ${weather.city}, ${weather.region}, ${weather.country} Temperature: ${weather.temp} Condition: ${weather.condition} Humidity: ${weather.humidity} Wind Chill: ${weather.chill} *********************************
This template contains a number of references to a variable named
|