dion        2002/06/27 22:41:14

  Modified:    src/java/org/apache/maven/app Maven.java
  Log:
  no message
  
  Revision  Changes    Path
  1.39      +60 -60    jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java
  
  Index: Maven.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Maven.java        28 Jun 2002 05:25:30 -0000      1.38
  +++ Maven.java        28 Jun 2002 05:41:14 -0000      1.39
  @@ -618,9 +618,9 @@
   
           JellyBuildListener listener = new JellyBuildListener(output);
   
  -        if ( getCli().hasOption( 'x' )
  +        if (getCli().hasOption('x')
                ||
  -             getCli().hasOption( 'X' ) )
  +             getCli().hasOption('X'))
           {
               listener.isDebug(true);
           }
  @@ -651,8 +651,8 @@
   
       private void initializeDriver() 
       {
  -        getJellyContext().setVariable( "pom",
  -                                       getProjectDescriptor().getProject() );
  +        getJellyContext().setVariable("pom",
  +                                       getProjectDescriptor().getProject());
       }
   
       /** Initialize all plugins.
  @@ -662,7 +662,7 @@
        */
       private void initializePlugins() throws Exception
       {
  -        loadPlugin( "core" );
  +        loadPlugin("core");
   
           File pluginsDir = getPluginsDir();
   
  @@ -711,7 +711,7 @@
           ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
   
           ClassLoader cl = new URLClassLoader(new URL[]{getPluginDir(name).toURL()},
  -                                            
getAntProject().getClass().getClassLoader() );
  +                                            
getAntProject().getClass().getClassLoader());
   
           // Thread.currentThread().setContextClassLoader(cl);
   
  @@ -760,8 +760,8 @@
   
                   try
                   {
  -                    Expression expr = CompositeExpression.parse( propText,
  -                                                                 factory );
  +                    Expression expr = CompositeExpression.parse(propText,
  +                                                                 factory);
   
                       if (expr != null)
                       {
  @@ -773,7 +773,7 @@
                       }
   
                       context.setVariable(eachName,
  -                                        propVal );
  +                                        propVal);
                   }
                   catch (Exception e)
                   {
  @@ -947,7 +947,7 @@
           Session session = new JellySession(output);
   
           // 
Thread.currentThread().setContextClassLoader(getAntProject().getClass().getClassLoader());
  -        // Thread.currentThread().setContextClassLoader( 
getClass().getClassLoader() );
  +        // 
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
           Thread.currentThread().setContextClassLoader(null);
   
           while (goalNameIter.hasNext())
  @@ -1045,8 +1045,8 @@
        */
       private void loadProperties()
       {
  -        this.properties.setProperty( "maven.repo.remote",
  -                                     "http://jakarta.apache.org/turbine/jars/"; );
  +        this.properties.setProperty("maven.repo.remote",
  +                                     "http://jakarta.apache.org/turbine/jars/";);
   
           Enumeration propNames = System.getProperties().propertyNames();
           String      eachName  = null;
  @@ -1083,7 +1083,7 @@
           {
               String[] defStrs = getCli().getOptionValues('D');
               
  -            for (int i = 0; i < defStrs.length; ++i )
  +            for (int i = 0; i < defStrs.length; ++i)
               {
                   setCliProperty(defStrs[i]);
               }
  @@ -1136,38 +1136,38 @@
   
       public void verifyProject() throws Exception
       {
  -        String localRepoProp = getProperty( "maven.repo.local" );
  +        String localRepoProp = getProperty("maven.repo.local");
   
  -        if ( localRepoProp == null )
  +        if (localRepoProp == null)
           {
  -            localRepoProp = getProperty( "lib.repo" );
  +            localRepoProp = getProperty("lib.repo");
   
  -            if ( localRepoProp != null )
  +            if (localRepoProp != null)
               {
  -                System.out.println( "----------------------------------------" );
  -                System.out.println( "DEPRECATION WARNING");
  -                System.out.println( "" );
  -                System.out.println( " The usage of the lib.repo property has" );
  -                System.out.println( " been deprecated." );
  -                System.out.println( "" );
  -                System.out.println( " The lib.repo property has been replaced " );
  -                System.out.println( " with the maven.repo.local property" );
  -                System.out.println( "" );
  -                System.out.println( " An easy solution is to simply add this" );
  -                System.out.println( " line to your build.properties:" );
  -                System.out.println( "" );
  -                System.out.println( "   maven.repo.local=${lib.repo}" );
  -                System.out.println( "" );
  -                System.out.println( "----------------------------------------" );
  +                System.out.println("----------------------------------------");
  +                System.out.println("DEPRECATION WARNING");
  +                System.out.println("");
  +                System.out.println(" The usage of the lib.repo property has");
  +                System.out.println(" been deprecated.");
  +                System.out.println("");
  +                System.out.println(" The lib.repo property has been replaced ");
  +                System.out.println(" with the maven.repo.local property");
  +                System.out.println("");
  +                System.out.println(" An easy solution is to simply add this");
  +                System.out.println(" line to your build.properties:");
  +                System.out.println("");
  +                System.out.println("   maven.repo.local=${lib.repo}");
  +                System.out.println("");
  +                System.out.println("----------------------------------------");
               } 
           }
   
  -        if ( localRepoProp == null )
  +        if (localRepoProp == null)
           {
               localRepoProp = getProperty("lib.repo");
               if (localRepoProp == null)
               {
  -                throw new RepoConfigException( "maven.repo.local not set" );
  +                throw new RepoConfigException("maven.repo.local not set");
               }
               else
               {
  @@ -1175,43 +1175,43 @@
               }
           }
   
  -        String remoteRepoProp = getProperty( "maven.repo.remote" );
  +        String remoteRepoProp = getProperty("maven.repo.remote");
   
  -        if ( remoteRepoProp == null )
  +        if (remoteRepoProp == null)
           {
  -            throw new RepoConfigException( "maven.repo.remote not set" );
  +            throw new RepoConfigException("maven.repo.remote not set");
           }
   
  -        File localRepo = new File( localRepoProp );
  +        File localRepo = new File(localRepoProp);
   
  -        if ( ! localRepo.exists() )
  +        if (! localRepo.exists())
           {
  -            System.err.println( "Directory '" + localRepo + "' does not exist." );
  -            System.err.println( "Attempting to create." );
  +            System.err.println("Directory '" + localRepo + "' does not exist.");
  +            System.err.println("Attempting to create.");
   
               if (!localRepo.mkdirs())
               {
  -                throw new RepoConfigException( "Unable to create directory '" + 
localRepo + "'" );
  +                throw new RepoConfigException("Unable to create directory '" + 
localRepo + "'");
               }
           }
   
  -        if ( ! localRepo.isDirectory() )
  +        if (! localRepo.isDirectory())
           {
  -            throw new RepoConfigException( localRepo + " is not a directory." );
  +            throw new RepoConfigException(localRepo + " is not a directory.");
           }
   
  -        if ( ! localRepo.canWrite() )
  +        if (! localRepo.canWrite())
           {
  -            throw new RepoConfigException( localRepo + " is not writable." );
  +            throw new RepoConfigException(localRepo + " is not writable.");
           }
               
           
           ProjectVerifier verifier = new ProjectVerifier();
   
  -        verifier.setMavenRemoteRepo( remoteRepoProp );
  -        verifier.setMavenLocalRepo( localRepoProp );
  -        verifier.setMavenProject( getProjectDescriptor().getProject() );
  -        verifier.setProject( getAntProject() );
  +        verifier.setMavenRemoteRepo(remoteRepoProp);
  +        verifier.setMavenLocalRepo(localRepoProp);
  +        verifier.setMavenProject(getProjectDescriptor().getProject());
  +        verifier.setProject(getAntProject());
           verifier.doExecute();
       }
   
  @@ -1284,7 +1284,7 @@
               if (this.cli.hasOption('g'))
               {
                   displayGoals();
  -                System.out.println( "" );
  +                System.out.println("");
                   return;
               }
               else
  @@ -1303,7 +1303,7 @@
           catch (RepoConfigException e)
           {
               failed = true;
  -            System.err.println( e.getLocalizedMessage() );
  +            System.err.println(e.getLocalizedMessage());
           }
           catch (NoActionDefinitionException e)
           {
  @@ -1316,7 +1316,7 @@
           catch (UnattainableGoalException e)
           {
               failed = true;
  -            System.out.println( "" );
  +            System.out.println("");
               System.err.println("BUILD FAILED");
   
               String msg = null;
  @@ -1325,7 +1325,7 @@
   
               if (rootCause != null)
               {
  -                if ( rootCause instanceof JellyException )
  +                if (rootCause instanceof JellyException)
                   {
                       rootCause = ((JellyException)rootCause).getCause();
                   }
  @@ -1344,7 +1344,7 @@
               failed = true;
               Throwable rootCause = e.getCause();
   
  -            if ( rootCause != null )
  +            if (rootCause != null)
               {
                   System.err.println(rootCause.getLocalizedMessage());
               }
  @@ -1359,9 +1359,9 @@
               e.printStackTrace();
           }
   
  -        if ( ! failed )
  +        if (! failed)
           {
  -            System.out.println( "BUILD SUCCESSFUL" );
  +            System.out.println("BUILD SUCCESSFUL");
           }
   
           Date fullStop = new Date();
  @@ -1370,9 +1370,9 @@
           long buildDiff = fullStop.getTime() - buildStart.getTime();
           long fullDiff = fullStop.getTime() - fullStart.getTime();
   
  -        // System.out.println( "Setup time: " + formatTime( initDiff ) );
  -        // System.out.println( "Build time: " + formatTime( buildDiff ) );
  -        System.out.println( "Total time: " + formatTime( fullDiff ) );
  +        // System.out.println("Setup time: " + formatTime(initDiff));
  +        // System.out.println("Build time: " + formatTime(buildDiff));
  +        System.out.println("Total time: " + formatTime(fullDiff));
   
           System.out.println("");
       }
  
  
  

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

Reply via email to