You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/11/28 03:20:33 UTC

svn commit: r349344 - in /webservices/axis2/trunk/java: ./ etc/ modules/codegen/ modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ modules/common/src/org/apache/axis2/i18n/ modules/core/conf/

Author: dims
Date: Sun Nov 27 18:20:26 2005
New Revision: 349344

URL: http://svn.apache.org/viewcvs?rev=349344&view=rev
Log:
- Better location for jalopy jar check
- Copy properties for logging in quick ant target
- Copy log4j properties from axis1 and change the log file to axis2.log
- Fix duplicates in resource.properties (need to find related sources and switch them)
- Add log when we are skipping writing files
- Add log when we pretty print files



Modified:
    webservices/axis2/trunk/java/build.xml
    webservices/axis2/trunk/java/etc/maven.xml
    webservices/axis2/trunk/java/modules/codegen/maven.xml
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ClassWriter.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/PrettyPrinter.java
    webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties
    webservices/axis2/trunk/java/modules/core/conf/log4j.properties

Modified: webservices/axis2/trunk/java/build.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/build.xml?rev=349344&r1=349343&r2=349344&view=diff
==============================================================================
--- webservices/axis2/trunk/java/build.xml (original)
+++ webservices/axis2/trunk/java/build.xml Sun Nov 27 18:20:26 2005
@@ -161,6 +161,9 @@
         <include name="**/*.properties"/>
         <include name="**/*.xsl"/>
       </fileset>
+      <fileset dir="${basedir}/modules/core/conf">
+        <include name="**/*.properties"/>
+      </fileset>
       <fileset dir="${basedir}/modules/codegen/src">
         <include name="**/*.properties"/>
         <include name="**/*.xsl"/>

Modified: webservices/axis2/trunk/java/etc/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/etc/maven.xml?rev=349344&r1=349343&r2=349344&view=diff
==============================================================================
--- webservices/axis2/trunk/java/etc/maven.xml (original)
+++ webservices/axis2/trunk/java/etc/maven.xml Sun Nov 27 18:20:26 2005
@@ -62,6 +62,18 @@
         </ant:echo>
     </goal>
 
+    <postGoal name="java:prepare-filesystem">
+      <u:file var="file" name="${maven.home}/lib/jalopy.jar"/>
+      <j:if test="${file.exists()}">
+        <ant:path id="jalopy.library">
+          <ant:fileset dir="${maven.home}/lib">
+            <ant:include name="jalopy.jar"/>
+          </ant:fileset>
+        </ant:path>
+        <maven:addPath id="maven.dependency.classpath" refid="jalopy.library"/>
+      </j:if>
+    </postGoal>
+
     <!-- Remove classes which depend on changed files, so they will rebuild. -->
     <!-- TODO: Fix me 
     <preGoal name="java:compile">

Modified: webservices/axis2/trunk/java/modules/codegen/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/maven.xml?rev=349344&r1=349343&r2=349344&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/codegen/maven.xml Sun Nov 27 18:20:26 2005
@@ -10,18 +10,6 @@
     xmlns:deploy="deploy"
     xmlns:ant="jelly:ant">
 
-    <preGoal name="test:test">
-      <util:file var="file" name="${maven.home}/lib/jalopy.jar"/>
-      <j:if test="${file.exists()}">
-        <ant:path id="jalopy.library">
-          <ant:fileset dir="${maven.home}/lib">
-            <ant:include name="jalopy.jar"/>
-          </ant:fileset>
-        </ant:path>
-        <maven:addPath id="maven.dependency.classpath" refid="jalopy.library"/>
-      </j:if>
-    </preGoal>
-
     <postGoal name="java:jar-resources">
       <tstamp>
         <format property="build.time" pattern="MMM dd, yyyy (hh:mm:ss z)" locale="en"/>
@@ -42,15 +30,6 @@
 
      <!-- run the schema compiler -->
    <postGoal name="test:compile">
-      <util:file var="file" name="${maven.home}/lib/jalopy.jar"/>
-      <j:if test="${file.exists()}">
-        <ant:path id="jalopy.library">
-          <ant:fileset dir="${maven.home}/lib">
-            <ant:include name="jalopy.jar"/>
-          </ant:fileset>
-        </ant:path>
-        <maven:addPath id="maven.dependency.classpath" refid="jalopy.library"/>
-      </j:if> 
         <j:set var="compiled.classes.dir" value="target/classes"/>   <!-- Theres got to be a better way to do this -->
         <j:set var="schema.source.dir" value="test-resources/xsd"/>
         <j:set var="schema.output.base.dir" value="target/schema"/>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ClassWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ClassWriter.java?rev=349344&r1=349343&r2=349344&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ClassWriter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ClassWriter.java Sun Nov 27 18:20:26 2005
@@ -21,6 +21,7 @@
 import org.apache.axis2.util.XSLTTemplateProcessor;
 import org.apache.axis2.wsdl.codegen.CodeGenerationException;
 import org.apache.axis2.wsdl.util.ConfigPropertyFileLoader;
+import org.apache.axis2.i18n.Messages;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.w3c.dom.Document;
@@ -32,7 +33,9 @@
 import java.util.Iterator;
 import java.util.Map;
 
-public abstract class ClassWriter {
+public abstract class ClassWriter {        
+    
+    private static Log log = LogFactory.getLog(ClassWriter.class);
 
     protected File outputFileLocation = null;
     protected File outputFile = null;
@@ -122,6 +125,8 @@
         fileExists = outputFile.exists();
         if (!fileExists){
             this.stream = new FileOutputStream(outputFile);
+        } else {
+            log.info(Messages.getMessage("fileExistsNoOverwrite", outputFile.toString()));
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/PrettyPrinter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/PrettyPrinter.java?rev=349344&r1=349343&r2=349344&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/PrettyPrinter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/PrettyPrinter.java Sun Nov 27 18:20:26 2005
@@ -51,6 +51,7 @@
             // format and overwrite the given input file
             Method format = clazz.getMethod("format", new Class[]{});
             format.invoke(prettifier, new Object[]{});
+            log.info("Pretty print file : " + file);
         } catch (ClassNotFoundException e) {
             log.info("Jalopy not found - unable to pretty print " + file);
         } catch (Exception e) {

Modified: webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties?rev=349344&r1=349343&r2=349344&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties Sun Nov 27 18:20:26 2005
@@ -103,7 +103,7 @@
 unknownelementinop=Unknown element in opeartion {0}
 modulecannothavrbothnameandref=Module canot have both name and ref   {0}
 invalideleinmodule={0} elment is not allowed in module.xml
-invalidphase=Invalid Phase : {0} for the handler {1} does not exit in axis2.xml or refering to phase in diffrent flow
+invalidphase01=Invalid Phase : {0} for the handler {1} does not exit in axis2.xml or refering to phase in diffrent flow
 invalidmodulerefbyconfig=reference to invalid module  {0}    by axis2.xml
 phasedosenotspecified=Phase does not specified for the handler {0}
 servicemodulecannothaveglobal=Service specific module can not refer system pre defined phases :  {0}
@@ -117,11 +117,12 @@
 InstantiationException=InstantiationException in Axis Storage processing  {0}
 IllegalAccessException=IllegalAccessException in Axis Storage processing  {0}
 transportSenderError=TransportSEnder Implementation class is required for the transport {0}
-obsererror=Observer Implementation Class is requird
+obsererror=Observer Implementation Class is required
 invalidmoduleconfig=Invalid module configuration
 invalidhandler=Invalid Handler {0}
 parameterlockederror=The paramter {0}  has locked at top levle can not overide
 op_error=Porcessing Operations Modules {0}
 servicenameeror=Service Name required
 invalid_op=Invalide Operations {0}
-cannotCorrelateMsg=Cannot correlate MessageID {1} to {0}\
+cannotCorrelateMsg01=Cannot correlate MessageID {1} to {0}
+fileExistsNoOverwrite=File {0} will not be overwritten.
\ No newline at end of file

Modified: webservices/axis2/trunk/java/modules/core/conf/log4j.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/conf/log4j.properties?rev=349344&r1=349343&r2=349344&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/conf/log4j.properties (original)
+++ webservices/axis2/trunk/java/modules/core/conf/log4j.properties Sun Nov 27 18:20:26 2005
@@ -1,18 +1,20 @@
-## Use two appenders, one to log to console, another to log to a file
-# This is the logging properties that goes to the war, there are two logging conf kept at the 
-# svn, one for developement (one at src/test-resources) and other for producation
-
-log4j.rootCategory=ERROR, LOGFILE
-
-####  appender writes to a file
-log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
-log4j.appender.LOGFILE.File=axis.log
-
-# Control the maximum log file size
-log4j.appender.LOGFILE.MaxFileSize=10000KB
-# Archive log files (one backup file here)
-log4j.appender.LOGFILE.MaxBackupIndex=100
-
-log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.LOGFILE.layout.ConversionPattern=%6r %5p [%t] (%F:%L) - %m%n
-
+# Set root category priority to INFO and its only appender to CONSOLE.
+log4j.rootCategory=INFO, CONSOLE
+#log4j.rootCategory=INFO, CONSOLE, LOGFILE
+
+# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
+log4j.logger.org.apache.axis2.enterprise=FATAL, CONSOLE
+
+# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=INFO
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
+
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=axis2.log
+log4j.appender.LOGFILE.Append=true
+log4j.appender.LOGFILE.Threshold=INFO
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
\ No newline at end of file