Skip to content
Snippets Groups Projects
Commit 05490bc6 authored by Goik Martin's avatar Goik Martin
Browse files

log4j config with package correction, executable MANIFEST.MF jar entry

parent e9e548a7
No related branches found
No related tags found
No related merge requests found
Final success via http://maven.apache.org/archetype/maven-archetype-plugin/examples/create-with-property-file.html
Create Project from local repository using:
mvn archetype:generate -DarchetypeCatalog=local -DarchetypeGroupId=de.hdm-stuttgart.mi \
-DarchetypeArtifactId=mi-maven-archetype-quickstart -DarchetypeVersion=1.1 \
-DgroupId=qq -DartifactId=ww -DinteractiveMode=false
......@@ -22,7 +22,7 @@
</includes>
</fileSet>
<fileSet filtered="false" packaged="false" encoding="UTF-8">
<directory></directory>
<directory/>
<includes>
<include>.gitignore</include>
</includes>
......
......@@ -55,6 +55,29 @@
<version>2.10.1</version>
<configuration/>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>${package}.App</Main-Class>
</manifestEntries>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
......@@ -20,7 +20,7 @@ public class App {
log.debug("With respect to logging you may want to configure file ");
log.debug("'src/main/resources/log4j2.xml' to suit your needs.");
log.debug("This config file 'log4j2.xml' will result in 'A1.log'" +
" file containing logging output as well.");
log.debug("This config file 'log4j2.xml' will result in 'A1.log'");
log.debug("file containing logging output as well.");
}
}
......@@ -11,10 +11,10 @@
<Loggers>
<!-- You my want to define class or package level per-logger rules -->
<Logger name="de.hdm_stuttgart.mi.sda2.qq.App" level="debug">
<Logger name="${package}.App" level="debug">
<AppenderRef ref="A1"/>
</Logger>
<Root level="debug">
<Root level="info">
<AppenderRef ref="STDOUT"/>
</Root>
</Loggers>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment