jvanzyl     2002/11/24 13:09:36

  Modified:    src/java/org/apache/maven/cli App.java
  Log:
  o fixing checkstyle viols
  o adding javadoc
  
  Revision  Changes    Path
  1.6       +78 -15    jakarta-turbine-maven/src/java/org/apache/maven/cli/App.java
  
  Index: App.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/cli/App.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- App.java  24 Nov 2002 19:00:38 -0000      1.5
  +++ App.java  24 Nov 2002 21:09:36 -0000      1.6
  @@ -148,19 +148,43 @@
   
       // O P T I O N S
   
  +    /** Console banner option. */
       private static final String CONSOLE_BANNER = "b";
  +
  +    /** Set working directory option. */
       private static final String SET_WORKING_DIRECTORY = "d";
  +
  +    /** Display stack trace option. */
       private static final String DISPLAY_STACKTRACE = "e";
  +
  +    /** Find POM option. */
       private static final String FIND_POM_DESCRIPTOR = "f";
  +
  +    /** Display goals options. */
       private static final String DISPLAY_GOALS = "g";
  +
  +    /** Display help option. */
       private static final String DISPLAY_HELP = "h";
  +
  +    /** Display info option. */
       private static final String DISPLAY_INFO = "i";
  +
  +    /** Work offline option. */
       private static final String WORK_OFFLINE = "o";
  +
  +    /** Set POM descriptor option. */
       private static final String SET_POM_DESCRIPTOR = "p";
  +
  +    /** Debug option. */
       private static final String DEBUG = "x";
   
  +    /** System property option. */
       private static final String SET_SYSTEM_PROPERTY = "D";
  +
  +    /** Emacs output option. */
       private static final String EMACS_OUTPUT = "E";
  +
  +    /** Debug option. */
       private static final String DEBUG_X = "X";
   
       // ------------------------------------------------------------
  @@ -197,31 +221,52 @@
       {
       }
   
  -    /** Set the Maven instance. */
  +    /**
  +     * Set the Maven instance.
  +     *
  +     * @param maven Maven instance.
  +     */
       public void setMaven( Maven maven )
       {
           this.maven = maven;
       }
   
  -    /** Get the Maven instance. */
  +    /**
  +     * Get the Maven instance.
  +     *
  +     * @return Maven The Maven instance.
  +     */
       public Maven getMaven()
       {
           return this.maven;
       }
   
  -    /** Set the descriptor directory. */
  +    /**
  +     * Set the descriptor directory.
  +     *
  +     * @param descriptorDirectory The directory where the project.xml
  +     * file is to be found.
  +     */
       public void setDescriptorDirectory( File descriptorDirectory )
       {
           this.descriptorDirectory = descriptorDirectory;
       }
   
  -    /** Get the descriptor directory. */
  +    /**
  +     * Get the descriptor directory.
  +     *
  +     * @return File The directory where the project.xml file is to be found.
  +     */
       public File getDescriptorDirectory()
       {
           return descriptorDirectory;
       }
   
  -    /** Get the CLI parser. */
  +    /**
  +     * Get the CLI parser.
  +     *
  +     * @return CommandLine The command line parser.
  +     */
       protected CommandLine getCli()
       {
           return this.commandLine;
  @@ -300,9 +345,11 @@
           System.setProperty( "user.dir", getDescriptorDirectory().getPath() );
       }
   
  -    /** Load the maven project descriptor.
  +    /**
  +     * Load the maven project descriptor.
        *
  -     *  @throws DescriptorException If there is an error while
  +     * @param projectFile Maven project.xml file.
  +     * @throws Exception If there is an error while
        *          reading the project descriptor.
        */
       private void initializeProject( File projectFile )
  @@ -349,6 +396,9 @@
           }
       }
   
  +    /**
  +     * Check the online status.
  +     */
       private void checkOnline()
       {
           if ( getMaven().getVariable( MavenConstants.ONLINE ) != null )
  @@ -366,8 +416,8 @@
           }
       }
   
  -    /** Set a property based upon a commandline
  -     *  <code>name=value</code> string.
  +    /**
  +     * Set a property based upon a commandline <code>name=value</code> string.
        *
        *  @param defStr The <code>name=value</code> string.
        */
  @@ -394,6 +444,12 @@
           System.setProperty( name, value );
       }
   
  +    /**
  +     * Perform main operations in a non-static method.
  +     *
  +     * @param args Arguments passed in from main().
  +     * @param fullStart Date the maven process was started.
  +     */
       public void doMain( String[] args, Date fullStart )
       {
           boolean done = false;
  @@ -641,7 +697,7 @@
        * From the CWD search through the directory hierarchy for
        * an XML-based POM.
        *
  -     * @param filename
  +     * @param start
        * @param suffix
        */
       private File find( File start, String suffix )
  @@ -964,6 +1020,12 @@
           }
       }
   
  +    /**
  +     * Format a time string.
  +     *
  +     * @param ms Duration in ms.
  +     * @return  String The formatted time string.
  +     */
       protected static String formatTime( long ms )
       {
           long secs = ms / 1000;
  @@ -978,10 +1040,11 @@
           return ( min > 0 ? min + " minutes" : " " ) + secs + " seconds";
       }
   
  -    // ------------------------------------------------------------
  -    // P R O P E R T I E S  M E T H O D S
  -    // ------------------------------------------------------------
  -
  +    /**
  +     * Main CLI entry point for Maven.
  +     *
  +     * @param args
  +     */
       public static void main( String[] args )
       {
           Date start = new Date();
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to