commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/vfs/xdocs navigation.xml
Date Wed, 17 Jul 2002 10:23:45 GMT
jstrachan    2002/07/17 03:23:45

  Modified:    vfs/src/java/org/apache/commons/vfs/provider/local
                        DefaultLocalFileSystemProvider.java
               vfs      .cvsignore project.xml
               vfs/src/java/org/apache/commons/vfs/provider
                        AbstractFileObject.java
               vfs/src/java/org/apache/commons/vfs/provider/ftp
                        FtpFileSystem.java FtpFileObject.java
  Added:       vfs/src/java/org/apache/commons/vfs/nativelib Os.java
                        OsFamily.java
               vfs/xdocs navigation.xml
  Log:
  Fixed the various dependencies of the maven build so that the build now works.
  
  the maven generated website is viewable here
  
  http://jakarta.apache.org/commons/sandbox/vfs/
  
  Revision  Changes    Path
  1.2       +1 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/local/DefaultLocalFileSystemProvider.java
  
  Index: DefaultLocalFileSystemProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/local/DefaultLocalFileSystemProvider.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultLocalFileSystemProvider.java	16 Jul 2002 17:18:59 -0000	1.1
  +++ DefaultLocalFileSystemProvider.java	17 Jul 2002 10:23:42 -0000	1.2
  @@ -8,9 +8,9 @@
   package org.apache.commons.vfs.provider.local;
   
   import java.io.File;
  -import org.apache.aut.nativelib.Os;
   import org.apache.commons.vfs.FileObject;
   import org.apache.commons.vfs.FileSystemException;
  +import org.apache.commons.vfs.nativelib.Os;
   import org.apache.commons.vfs.provider.AbstractFileSystemProvider;
   import org.apache.commons.vfs.provider.DefaultFileName;
   import org.apache.commons.vfs.provider.FileSystem;
  
  
  
  1.2       +1 -0      jakarta-commons-sandbox/vfs/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/.cvsignore,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- .cvsignore	16 Jul 2002 17:19:15 -0000	1.1
  +++ .cvsignore	17 Jul 2002 10:23:42 -0000	1.2
  @@ -1,5 +1,6 @@
   .project
   target
   dist
  +lib
   *.log
   
  
  
  
  1.2       +31 -0     jakarta-commons-sandbox/vfs/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	16 Jul 2002 17:19:15 -0000	1.1
  +++ project.xml	17 Jul 2002 10:23:42 -0000	1.2
  @@ -80,9 +80,40 @@
       </dependency>
       
       <dependency>
  +      <id>commons-net</id>
  +      <version>SNAPSHOT</version>
  +    </dependency>
  +
  +    <dependency>
         <id>commons-logging</id>
         <version>1.0</version>
       </dependency>
  +
  +    <dependency>
  +      <id>commons-io</id>
  +      <version>SNAPSHOT</version>
  +    </dependency>
  +
  +    <dependency>
  +      <id>excalibur-i18n</id>
  +      <version>1.0</version>
  +    </dependency>
  +    
  +    <dependency>
  +      <id>excalibur-logger</id>
  +      <version>1.0</version>
  +    </dependency>
  +    
  +    <dependency>
  +      <id>avalon-framework</id>
  +      <version>4.0</version>
  +    </dependency>
  +    
  +    <dependency>
  +      <id>jcifs</id>
  +      <version>0.6.5</version>
  +    </dependency>
  +    
     </dependencies>
     
     
  
  
  
  1.2       +1 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
  
  Index: AbstractFileObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractFileObject.java	16 Jul 2002 17:18:57 -0000	1.1
  +++ AbstractFileObject.java	17 Jul 2002 10:23:42 -0000	1.2
  @@ -24,7 +24,7 @@
   import org.apache.commons.vfs.NameScope;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.excalibur.io.IOUtil;
  +import org.apache.commons.io.IOUtil;
   
   /**
    * A partial file object implementation.
  
  
  
  1.1                  jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/nativelib/Os.java
  
  Index: Os.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.commons.vfs.nativelib;
  
  import java.util.ArrayList;
  import java.util.HashSet;
  import java.util.List;
  import java.util.Locale;
  import java.util.Set;
  
  /**
   * Class to help determining the OS.
   *
   * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
   * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   */
  public final class Os
  {
      private static final String OS_NAME =
          System.getProperty( "os.name" ).toLowerCase( Locale.US );
      private static final String OS_ARCH =
          System.getProperty( "os.arch" ).toLowerCase( Locale.US );
      private static final String OS_VERSION =
          System.getProperty( "os.version" ).toLowerCase( Locale.US );
      private static final String PATH_SEP =
          System.getProperty( "path.separator" );
      private static final OsFamily OS_FAMILY;
      private static final OsFamily[] OS_ALL_FAMILIES;
  
      /** All Windows based OSes. */
      public static final OsFamily OS_FAMILY_WINDOWS = new OsFamily( "windows" );
  
      /** All DOS based OSes. */
      public static final OsFamily OS_FAMILY_DOS = new OsFamily( "dos" );
  
      /** All Windows NT based OSes. */
      public static final OsFamily OS_FAMILY_WINNT =
          new OsFamily( "nt", new OsFamily[]{OS_FAMILY_WINDOWS} );
  
      /** All Windows 9x based OSes. */
      public static final OsFamily OS_FAMILY_WIN9X =
          new OsFamily( "win9x", new OsFamily[]{OS_FAMILY_WINDOWS, OS_FAMILY_DOS} );
  
      /** OS/2 */
      public static final OsFamily OS_FAMILY_OS2 =
          new OsFamily( "os/2", new OsFamily[]{OS_FAMILY_DOS} );
  
      /** Netware */
      public static final OsFamily OS_FAMILY_NETWARE =
          new OsFamily( "netware" );
  
      /** All UNIX based OSes. */
      public static final OsFamily OS_FAMILY_UNIX = new OsFamily( "unix" );
  
      /** All Mac based OSes. */
      public static final OsFamily OS_FAMILY_MAC = new OsFamily( "mac" );
  
      /** OSX */
      public static final OsFamily OS_FAMILY_OSX =
          new OsFamily( "osx", new OsFamily[]{OS_FAMILY_UNIX, OS_FAMILY_MAC} );
  
      private static final OsFamily[] ALL_FAMILIES = new OsFamily[]
      {
          OS_FAMILY_DOS,
          OS_FAMILY_MAC,
          OS_FAMILY_NETWARE,
          OS_FAMILY_OS2,
          OS_FAMILY_OSX,
          OS_FAMILY_UNIX,
          OS_FAMILY_WINDOWS,
          OS_FAMILY_WINNT,
          OS_FAMILY_WIN9X
      };
  
      static
      {
          OS_FAMILY = determineOsFamily();
          OS_ALL_FAMILIES = determineAllFamilies();
      }
  
      /**
       * Private constructor to block instantiation.
       */
      private Os()
      {
      }
  
      /**
       * Determines if the OS on which Ant is executing matches the given OS
       * version.
       */
      public static boolean isVersion( final String version )
      {
          return isOs( (OsFamily)null, null, null, version );
      }
  
      /**
       * Determines if the OS on which Ant is executing matches the given OS
       * architecture.
       */
      public static boolean isArch( final String arch )
      {
          return isOs( (OsFamily)null, null, arch, null );
      }
  
      /**
       * Determines if the OS on which Ant is executing matches the given OS
       * family.
       */
      public static boolean isFamily( final String family )
      {
          return isOs( family, null, null, null );
      }
  
      /**
       * Determines if the OS on which Ant is executing matches the given OS
       * family.
       */
      public static boolean isFamily( final OsFamily family )
      {
          return isOs( family, null, null, null );
      }
  
      /**
       * Determines if the OS on which Ant is executing matches the given OS name.
       *
       * @param name Description of Parameter
       * @return The Name value
       * @since 1.7
       */
      public static boolean isName( final String name )
      {
          return isOs( (OsFamily)null, name, null, null );
      }
  
      /**
       * Determines if the OS on which Ant is executing matches the given OS
       * family, name, architecture and version.
       *
       * @param family The OS family
       * @param name The OS name
       * @param arch The OS architecture
       * @param version The OS version
       * @return The Os value
       */
      public static boolean isOs( final String family,
                                  final String name,
                                  final String arch,
                                  final String version )
      {
          return isOs( getFamily( family ), name, arch, version );
      }
  
      /**
       * Determines if the OS on which Ant is executing matches the given OS
       * family, name, architecture and version
       *
       * @param family The OS family
       * @param name The OS name
       * @param arch The OS architecture
       * @param version The OS version
       * @return The Os value
       */
      public static boolean isOs( final OsFamily family,
                                  final String name,
                                  final String arch,
                                  final String version )
      {
          if( family != null || name != null || arch != null || version != null )
          {
              final boolean isFamily = familyMatches( family );
              final boolean isName = nameMatches( name );
              final boolean isArch = archMatches( arch );
              final boolean isVersion = versionMatches( version );
  
              return isFamily && isName && isArch && isVersion;
          }
          else
          {
              return false;
          }
      }
  
      /**
       * Locates an OsFamily by name (case-insensitive).
       *
       * @return the OS family, or null if not found.
       */
      public static OsFamily getFamily( final String name )
      {
          for( int i = 0; i < ALL_FAMILIES.length; i++ )
          {
              final OsFamily osFamily = ALL_FAMILIES[ i ];
              if( osFamily.getName().equalsIgnoreCase( name ) )
              {
                  return osFamily;
              }
          }
  
          return null;
      }
  
      private static boolean versionMatches( final String version )
      {
          boolean isVersion = true;
          if( version != null )
          {
              isVersion = version.equalsIgnoreCase( OS_VERSION );
          }
          return isVersion;
      }
  
      private static boolean archMatches( final String arch )
      {
          boolean isArch = true;
          if( arch != null )
          {
              isArch = arch.equalsIgnoreCase( OS_ARCH );
          }
          return isArch;
      }
  
      private static boolean nameMatches( final String name )
      {
          boolean isName = true;
          if( name != null )
          {
              isName = name.equalsIgnoreCase( OS_NAME );
          }
          return isName;
      }
  
      private static boolean familyMatches( final OsFamily family )
      {
          if( family == null )
          {
              return false;
          }
          for( int i = 0; i < OS_ALL_FAMILIES.length; i++ )
          {
              final OsFamily osFamily = OS_ALL_FAMILIES[ i ];
              if( family == osFamily )
              {
                  return true;
              }
          }
          return false;
      }
  
      private static OsFamily[] determineAllFamilies()
      {
          // Determine all families the current OS belongs to
          Set allFamilies = new HashSet();
          if( OS_FAMILY != null )
          {
              List queue = new ArrayList();
              queue.add( OS_FAMILY );
              while( queue.size() > 0 )
              {
                  final OsFamily family = (OsFamily)queue.remove( 0 );
                  allFamilies.add( family );
                  final OsFamily[] families = family.getFamilies();
                  for( int i = 0; i < families.length; i++ )
                  {
                      OsFamily parent = families[ i ];
                      queue.add( parent );
                  }
              }
          }
          return (OsFamily[])allFamilies.toArray( new OsFamily[ allFamilies.size() ] );
      }
  
      private static OsFamily determineOsFamily()
      {
          // Determine the most specific OS family
          if( OS_NAME.indexOf( "windows" ) > -1 )
          {
              if( OS_NAME.indexOf( "xp" ) > -1 ||
                  OS_NAME.indexOf( "2000" ) > -1 ||
                  OS_NAME.indexOf( "nt" ) > -1 )
              {
                  return OS_FAMILY_WINNT;
              }
              else
              {
                  return OS_FAMILY_WIN9X;
              }
          }
          else if( OS_NAME.indexOf( "os/2" ) > -1 )
          {
              return OS_FAMILY_OS2;
          }
          else if( OS_NAME.indexOf( "netware" ) > -1 )
          {
              return OS_FAMILY_NETWARE;
          }
          else if( OS_NAME.indexOf( "mac" ) > -1 )
          {
              if( OS_NAME.endsWith( "x" ) )
              {
                  return OS_FAMILY_OSX;
              }
              else
              {
                  return OS_FAMILY_MAC;
              }
          }
          else if( PATH_SEP.equals( ":" ) )
          {
              return OS_FAMILY_UNIX;
          }
          else
          {
              return null;
          }
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/nativelib/OsFamily.java
  
  Index: OsFamily.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.commons.vfs.nativelib;
  
  /**
   * An enumerated type, which represents an OS family.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.2 $ $Date: 2002/07/05 03:21:54 $
   */
  public final class OsFamily
  {
      private final String m_name;
      private final OsFamily[] m_families;
  
      OsFamily( final String name )
      {
          m_name = name;
          m_families = new OsFamily[ 0 ];
      }
  
      OsFamily( final String name, final OsFamily[] families )
      {
          m_name = name;
          m_families = families;
      }
  
      /**
       * Returns the name of this family.
       */
      public String getName()
      {
          return m_name;
      }
  
      /**
       * Returns the OS families that this family belongs to.
       */
      public OsFamily[] getFamilies()
      {
          return m_families;
      }
  }
  
  
  
  1.2       +3 -3      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
  
  Index: FtpFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FtpFileSystem.java	16 Jul 2002 17:19:00 -0000	1.1
  +++ FtpFileSystem.java	17 Jul 2002 10:23:44 -0000	1.2
  @@ -7,10 +7,10 @@
    */
   package org.apache.commons.vfs.provider.ftp;
   
  -import com.oroinc.net.ftp.FTP;
  -import com.oroinc.net.ftp.FTPClient;
  -import com.oroinc.net.ftp.FTPReply;
   import java.io.IOException;
  +import org.apache.commons.net.ftp.FTP;
  +import org.apache.commons.net.ftp.FTPClient;
  +import org.apache.commons.net.ftp.FTPReply;
   import org.apache.commons.vfs.FileName;
   import org.apache.commons.vfs.FileObject;
   import org.apache.commons.vfs.FileSystemException;
  
  
  
  1.2       +2 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
  
  Index: FtpFileObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FtpFileObject.java	16 Jul 2002 17:19:00 -0000	1.1
  +++ FtpFileObject.java	17 Jul 2002 10:23:44 -0000	1.2
  @@ -7,10 +7,10 @@
    */
   package org.apache.commons.vfs.provider.ftp;
   
  -import com.oroinc.net.ftp.FTPClient;
  -import com.oroinc.net.ftp.FTPFile;
   import java.io.InputStream;
   import java.io.OutputStream;
  +import org.apache.commons.net.ftp.FTPClient;
  +import org.apache.commons.net.ftp.FTPFile;
   import org.apache.commons.vfs.FileName;
   import org.apache.commons.vfs.FileSystemException;
   import org.apache.commons.vfs.FileType;
  
  
  
  1.1                  jakarta-commons-sandbox/vfs/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project name="VFS">
  
    <title>VFS</title>
    <organizationLogo href="/images/jakarta-logo-blue.gif">Jakarta</organizationLogo>
  
    <body>
      <menu name="Jelly">
        <item name="Overview"                href="/index.html"/>
        <item name="To Do List"              href="/todo.html"/>
      </menu>
    </body>
  </project>
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message