log4j.xml relocated due to visibility issues and excluded from generated
JAR. pom.xml formatted according to coding conventions
This commit is contained in:
parent
27199325ec
commit
043a610754
45
dao/pom.xml
45
dao/pom.xml
@ -21,4 +21,49 @@
|
|||||||
<artifactId>log4j</artifactId>
|
<artifactId>log4j</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
log4j.xml file will be copied both in ${project.build.outputDirectory}
|
||||||
|
and ${project.build.outputDirectory}. Thanks to Sean Patrick Floyd
|
||||||
|
(http://stackoverflow.com/questions/5637532/maven-how-to-place-resource-file-together-with-jar)
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource> <!-- regular resource processing for everything except logback.xml -->
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
</resource>
|
||||||
|
<resource> <!-- resource processing with a different output directory for log4j.xml -->
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<includes>
|
||||||
|
<include>log4j.xml</include>
|
||||||
|
</includes>
|
||||||
|
<targetPath>..</targetPath> <!-- relative to target/classes i.e. ${project.build.outputDirectory} -->
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This will exclude log4j.xml file from generated JAR
|
||||||
|
-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>log4j.xml</exclude>
|
||||||
|
</excludes>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user