Update of /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/ant
In directory sc8-pr-cvs1:/tmp/cvs-serv22426/src/java/xdoclet/ant

Modified Files:
        AntLogFactory.java XDocletTask.java 
Log Message:
-Improved JavaBeans support (which is the metadata layer for XDoclet configuration)
-Made tests able to run in unforked mode

Index: AntLogFactory.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/ant/AntLogFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** AntLogFactory.java  5 Mar 2003 22:27:10 -0000       1.2
--- AntLogFactory.java  12 Mar 2003 23:41:02 -0000      1.3
***************
*** 4,7 ****
--- 4,8 ----
  import org.apache.commons.logging.LogConfigurationException;
  import org.apache.commons.logging.impl.LogFactoryImpl;
+ import org.apache.commons.logging.impl.Jdk14Logger;
  import org.apache.tools.ant.Project;
  
***************
*** 61,69 ****
      public Log getInstance(final String name)
          throws LogConfigurationException {
          if (_project == null) {
!             throw new LogConfigurationException("Set the Ant project before 
obtaining an instance");
          }
  
!         Log log = (Log) LOGS.get(name);
  
          if (log == null) {
--- 62,77 ----
      public Log getInstance(final String name)
          throws LogConfigurationException {
+ 
+         Log log;
+ 
          if (_project == null) {
!             // We're not running in an Ant environment. (The VM might have
!             // run XDoclet via Ant and registered us. Use JDK 1.4 logging.
!             log = new Jdk14Logger(name);
!             LOGS.put(name, log);
!             log.warn("Running outside Ant now. Using JDK 1.4 logginng.");
          }
  
!         log = (Log) LOGS.get(name);
  
          if (log == null) {

Index: XDocletTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/ant/XDocletTask.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** XDocletTask.java    5 Mar 2003 22:27:10 -0000       1.2
--- XDocletTask.java    12 Mar 2003 23:41:02 -0000      1.3
***************
*** 42,46 ****
      public final void setTaskName(String taskName) {
          super.setTaskName(taskName);
-         _xdoclet.setName(taskName);
      }
  
--- 42,45 ----
***************
*** 86,89 ****
--- 85,91 ----
              throw new BuildException(e.getMessage(), e);
          }
+ 
+         // Unset the Ant Logger
+         System.setProperty(LogFactory.FACTORY_PROPERTY, null);        
      }
  }



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to