cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r734827 - in /cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer: AbstractDeployMojo.java WebXmlRewriter.java
Date Thu, 15 Jan 2009 21:28:02 GMT
Author: reinhard
Date: Thu Jan 15 13:28:02 2009
New Revision: 734827

URL: http://svn.apache.org/viewvc?rev=734827&view=rev
Log:
minor code formatting and cleanup

Modified:
    cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
    cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/WebXmlRewriter.java

Modified: cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java?rev=734827&r1=734826&r2=734827&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
(original)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
Thu Jan 15 13:28:02 2009
@@ -220,7 +220,6 @@
         } finally {
             IOUtils.closeQuietly(sourceWebXmlFile);
         }
-
     }
 
     /**

Modified: cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/WebXmlRewriter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/WebXmlRewriter.java?rev=734827&r1=734826&r2=734827&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/WebXmlRewriter.java
(original)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/deployer/WebXmlRewriter.java
Thu Jan 15 13:28:02 2009
@@ -44,9 +44,11 @@
     public boolean rewrite(Document webAppDoc) {
         boolean rewritten = false;
         final Element rootElement = webAppDoc.getDocumentElement();
+        
         // first rewrite servlets
         final List servlets = XMLUtils.getChildNodes(rootElement, "servlet");
         Iterator i = servlets.iterator();
+        
         while ( i.hasNext() ) {
             final Element servletElement = (Element)i.next();
             final Element servletClassElement = XMLUtils.getChildNode(servletElement, "servlet-class");
@@ -57,8 +59,10 @@
                 final Element initParamElem = webAppDoc.createElementNS(null, "init-param");
                 final Element initParamNameElem = webAppDoc.createElementNS(null, "param-name");
                 final Element initParamValueElem = webAppDoc.createElementNS(null, "param-value");
+                
                 initParamElem.appendChild(initParamNameElem);
                 initParamElem.appendChild(initParamValueElem);
+                
                 XMLUtils.setValue(initParamNameElem, "servlet-class");
                 XMLUtils.setValue(initParamValueElem, className);
                 Element beforeElement = XMLUtils.getChildNode(servletElement, "load-on-startup");
@@ -73,6 +77,7 @@
                 } else {
                     servletElement.insertBefore(initParamElem, beforeElement);
                 }
+                
                 rewritten = true;
             }
         }
@@ -178,10 +183,13 @@
         final Element contextParamElement = root.getOwnerDocument().createElementNS(null,
"context-param");
         final Element contextParamNameElement = root.getOwnerDocument().createElementNS(null,
"param-name");
         final Element contextParamValueElement = root.getOwnerDocument().createElementNS(null,
"param-value");
+        
         contextParamElement.appendChild(contextParamNameElement);
         contextParamElement.appendChild(contextParamValueElement);
+        
         XMLUtils.setValue(contextParamNameElement, name);
         XMLUtils.setValue(contextParamValueElement, value);
+        
         root.insertBefore(contextParamElement, searchElement);
     }
 }
\ No newline at end of file



Mime
View raw message