struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [struts-examples] 02/06: Cleans up dependencies
Date Sat, 14 Dec 2019 06:14:14 GMT
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch new-mailreader
in repository https://gitbox.apache.org/repos/asf/struts-examples.git

commit 43c25daa615c74a62fd399515593f780a68d3c72
Author: Lukasz Lenart <lukaszlenart@apache.org>
AuthorDate: Fri Dec 13 13:11:21 2019 +0100

    Cleans up dependencies
---
 mailreader2/pom.xml                                 |  1 -
 .../examples/mailreader2/ApplicationListener.java   |  2 +-
 .../struts/examples/mailreader2/Constants.java      |  5 -----
 .../examples/mailreader2/MailreaderSupport.java     |  2 +-
 mailreader2/src/main/webapp/WEB-INF/web.xml         |  4 +---
 pom.xml                                             | 21 ++++++++++++++++++---
 6 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/mailreader2/pom.xml b/mailreader2/pom.xml
index 4c22e74..5f2d732 100644
--- a/mailreader2/pom.xml
+++ b/mailreader2/pom.xml
@@ -38,7 +38,6 @@
         <dependency>
             <groupId>org.apache.struts</groupId>
             <artifactId>struts2-config-browser-plugin</artifactId>
-            <version>${struts2.version}</version>
         </dependency>
 
         <dependency>
diff --git a/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/ApplicationListener.java
b/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/ApplicationListener.java
index 2e1d604..0d7664d 100644
--- a/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/ApplicationListener.java
+++ b/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/ApplicationListener.java
@@ -82,7 +82,7 @@ public final class ApplicationListener implements ServletContextListener
{
     /**
      * <p>Logging output for this plug in instance.</p>
      */
-    private Logger log = LogManager.getLogger(this.getClass());
+    private Logger log = LogManager.getLogger(ApplicationListener.class);
 
     /**
      * <p>The web application resource path of our persistent database storage
diff --git a/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/Constants.java
b/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/Constants.java
index a5beecd..662a9ff 100644
--- a/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/Constants.java
+++ b/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/Constants.java
@@ -53,11 +53,6 @@ public final class Constants {
     public static final String EDIT = "Edit";
 
     /**
-     * <p> The package name for this application. </p>
-     */
-    public static final String PACKAGE = "org.apache.struts.apps.mailreader";
-
-    /**
      * <p> The session scope attribute under which the Subscription object
      * currently selected by our logged-in User is stored. </p>
      */
diff --git a/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/MailreaderSupport.java
b/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/MailreaderSupport.java
index 2e8d1f7..b6cdcbd 100644
--- a/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/MailreaderSupport.java
+++ b/mailreader2/src/main/java/org/apache/struts/examples/mailreader2/MailreaderSupport.java
@@ -384,7 +384,7 @@ public class MailreaderSupport extends ActionSupport implements SessionAware,
Ap
     /**
      * <p><code>Log</code> instance for this application. </p>
      */
-    protected Logger log = LogManager.getLogger(Constants.PACKAGE);
+    private Logger log = LogManager.getLogger(MailreaderSupport.class);
 
     /**
      * <p> Persist the User object, including subscriptions, to the database.
diff --git a/mailreader2/src/main/webapp/WEB-INF/web.xml b/mailreader2/src/main/webapp/WEB-INF/web.xml
index 7000fbe..c09b9e6 100644
--- a/mailreader2/src/main/webapp/WEB-INF/web.xml
+++ b/mailreader2/src/main/webapp/WEB-INF/web.xml
@@ -16,9 +16,7 @@
 
     <!-- Application Listener for Mailreader database -->
     <listener>
-        <listener-class>
-            org.apache.struts.examples.mailreader2.ApplicationListener
-        </listener-class>
+        <listener-class>org.apache.struts.examples.mailreader2.ApplicationListener</listener-class>
     </listener>
 
     <welcome-file-list>
diff --git a/pom.xml b/pom.xml
index acf82b5..bf8862e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -118,13 +118,10 @@
         <dependency>
             <groupId>org.apache.struts</groupId>
             <artifactId>struts2-core</artifactId>
-            <version>${struts2.version}</version>
         </dependency>
-
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-core</artifactId>
-            <version>${log4j2.version}</version>
         </dependency>
 
     </dependencies>
@@ -132,6 +129,24 @@
     <dependencyManagement>
         <dependencies>
             <dependency>
+                <groupId>org.apache.struts</groupId>
+                <artifactId>struts2-core</artifactId>
+                <version>${struts2.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.struts</groupId>
+                <artifactId>struts2-config-browser-plugin</artifactId>
+                <version>${struts2.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-core</artifactId>
+                <version>${log4j2.version}</version>
+            </dependency>
+
+            <dependency>
                 <groupId>org.apache.logging.log4j</groupId>
                 <artifactId>log4j-api</artifactId>
                 <version>${log4j2.version}</version>


Mime
View raw message