ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends CLIMain.java
Date Tue, 12 Jun 2001 14:20:30 GMT
donaldp     01/06/12 07:20:30

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/frontends
                        CLIMain.java
  Log:
  Added in support for parameters that are sent to builder.
  
  Revision  Changes    Path
  1.4       +18 -2     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java
  
  Index: CLIMain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CLIMain.java	2001/06/12 14:01:57	1.3
  +++ CLIMain.java	2001/06/12 14:20:29	1.4
  @@ -61,6 +61,7 @@
       private static final int       FILE_OPT                  = 'f';
       private static final int       LOG_LEVEL_OPT             = 'l';
       private static final int       DEFINE_OPT                = 'D';
  +    private static final int       BUILDER_PARAM_OPT         = 'B';
       private static final int       VERSION_OPT               = 1;
       private static final int       LISTENER_OPT              = 2;
       private static final int       TASKLIB_DIR_OPT           = 5;
  @@ -92,6 +93,9 @@
       ///List of user supplied defines
       private Parameters           m_defines     = new Parameters();
   
  +    ///List of user supplied parameters for builder
  +    private Parameters           m_builderParameters = new Parameters();
  +
       /**
        * Main entry point called to run standard Myrmidon.
        *
  @@ -128,7 +132,7 @@
       private CLOptionDescriptor[] createCLOptions()
       {
           //TODO: localise
  -        final CLOptionDescriptor[] options = new CLOptionDescriptor[ 11 ];
  +        final CLOptionDescriptor[] options = new CLOptionDescriptor[ 12 ];
   
           options[0] =
               new CLOptionDescriptor( "help",
  @@ -199,6 +203,14 @@
                                       DEFINE_OPT,
                                       "Define a variable (ie -Dfoo=var)",
                                       new int[ 0 ] );
  +
  +        options[11] =
  +            new CLOptionDescriptor( "builder-parameter",
  +                                    CLOptionDescriptor.ARGUMENTS_REQUIRED_2,
  +                                    BUILDER_PARAM_OPT,
  +                                    "Define a builder parameter (ie -Bfoo=var)" );
  +
  +
           return options;
       }
   
  @@ -243,6 +255,10 @@
                   m_defines.setParameter( option.getArgument( 0 ), option.getArgument( 1
) );
                   break;
   
  +            case BUILDER_PARAM_OPT:
  +                m_builderParameters.setParameter( option.getArgument( 0 ), option.getArgument(
1 ) );
  +                break;
  +
               case 0: m_targets.add( option.getArgument() ); break;
               }
           }
  @@ -310,7 +326,7 @@
   
           //create the project
           final Project project = 
  -            embeddor.createProject( buildFile.toString(), null, null );
  +            embeddor.createProject( buildFile.toString(), null, m_builderParameters );
   
           BufferedReader reader = null;
   
  
  
  

Mime
View raw message