dion        2003/08/17 23:07:06

  Modified:    src/java/org/apache/maven/cli Tag: MAVEN_RC1_STABLE App.java
  Log:
  MAVEN-672. Add back -d option
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.28.2.2  +11 -2     maven/src/java/org/apache/maven/cli/App.java
  
  Index: App.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/cli/App.java,v
  retrieving revision 1.28.2.1
  retrieving revision 1.28.2.2
  diff -u -r1.28.2.1 -r1.28.2.2
  --- App.java  7 Aug 2003 16:56:38 -0000       1.28.2.1
  +++ App.java  18 Aug 2003 06:07:06 -0000      1.28.2.2
  @@ -183,6 +183,9 @@
       /** Debug option. */
       private static final String DEBUG = "X";
   
  +     /** Working dir option. */
  +     private static final String WORKING_DIR = "d";
  +     
       // ------------------------------------------------------------
       // C L A S S  M E M B E R S
       // ------------------------------------------------------------
  @@ -337,12 +340,18 @@
           this.writer = new OutputStreamWriter( this.consoleOut );
           XMLOutput output = XMLOutput.createXMLOutput( writer, false );
   
  +             if ( getCli().hasOption( WORKING_DIR ) )
  +             {
  +                     String workingDir = getCli().getOptionValue(WORKING_DIR);
  +                     System.setProperty("user.dir", workingDir);                    
 
  +             }
  +
           // We will assume here that there might not be a project.xml file present
           // and we will create the root context from the directory gleaned from
           // the user.dir system property.
           MavenJellyContext c = MavenUtils.createContext( new File( 
System.getProperty("user.dir") ) );
           setRootContext( c );
  -
  +             
           if ( getCli().hasOption( DEBUG ) )
           {
               getRootContext().setXMLOutput( output );
  
  
  

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

Reply via email to