Skip to content

Commit

Permalink
4_fix_pom_log4j
Browse files Browse the repository at this point in the history
  • Loading branch information
JavaWebinar committed Oct 14, 2016
1 parent e116191 commit 10f5c14
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 44 deletions.
26 changes: 26 additions & 0 deletions parent-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,32 @@
</configuration>
</plugin>
</plugins>

<resources>
<resource>
<directory>${masterjava.config}</directory>
<filtering>true</filtering>
<includes>
<include>logback.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>

<testResources>
<testResource>
<directory>${masterjava.config}</directory>
<includes>
<include>logback-test.xml</include>
</includes>
</testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>

</build>

<dependencies>
Expand Down
74 changes: 32 additions & 42 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<dependency.locations.enabled>false</dependency.locations.enabled>

<slf4j.version>1.7.20</slf4j.version>
<logback.version>1.1.7</logback.version>

<masterjava.config>/apps/masterjava/config/</masterjava.config>
</properties>

<build>
Expand All @@ -36,57 +43,30 @@
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<id>enforce</id>
<configuration>
<finalName>benchmarks</finalName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.openjdk.jmh.Main</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<!--
Shading signed JARs will fail without this.
http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
-->
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<rules>
<dependencyConvergence/>
</rules>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand All @@ -95,12 +75,22 @@
<dependency>
<groupId>one.util</groupId>
<artifactId>streamex</artifactId>
<version>RELEASE</version>
<version>0.6.2</version>
</dependency>

<!-- Logging with SLF4J & LogBack -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>com.j2html</groupId>
<artifactId>j2html</artifactId>
<version>RELEASE</version>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>

<!--Test-->
Expand Down
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<url>https://github.com/JavaOPs/masterjava</url>

<modules>
<module>parent</module>
<module>parent-web</module>

<module>common</module>
<module>test</module>

Expand Down
4 changes: 2 additions & 2 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>RELEASE</version>
<version>1.15</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>RELEASE</version>
<version>1.15</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
6 changes: 6 additions & 0 deletions web/common-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.0.2.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
18 changes: 18 additions & 0 deletions web/export/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,22 @@
<build>
<finalName>export</finalName>
</build>
<dependencies>
<dependency>
<groupId>ru.javaops</groupId>
<artifactId>mail-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.j2html</groupId>
<artifactId>j2html</artifactId>
<version>0.7</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

0 comments on commit 10f5c14

Please sign in to comment.