maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/lifecycle DefaultLifecycleExecutor.java
Date Tue, 15 Mar 2005 21:48:55 GMT
brett       2005/03/15 13:48:55

  Modified:    maven-core/src/main/java/org/apache/maven/lifecycle
                        DefaultLifecycleExecutor.java
  Log:
  fix error reporting
  
  Revision  Changes    Path
  1.25      +9 -5      maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
  
  Index: DefaultLifecycleExecutor.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- DefaultLifecycleExecutor.java	15 Mar 2005 21:41:05 -0000	1.24
  +++ DefaultLifecycleExecutor.java	15 Mar 2005 21:48:55 -0000	1.25
  @@ -87,7 +87,7 @@
           try
           {
               MavenProject project = session.getProject();
  -            
  +
               ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler(
project.getPackaging() );
   
               if ( artifactHandler != null )
  @@ -239,6 +239,12 @@
   
                   MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor( mojoId
);
   
  +                if ( mojoDescriptor == null )
  +                {
  +                    throw new LifecycleExecutionException(
  +                        "A goal '" + mojoId + "' was declared in pom.xml, but does not
exist" );
  +                }
  +
                   configureMojo( mojoDescriptor );
               }
           }
  @@ -389,10 +395,8 @@
           try
           {
               Logger logger = getLogger();
  -            logger.debug("Resolving artifacts from:\n" +
  -                    "\t{localRepository: " + session.getLocalRepository() + "}\n" +
  -                    "\t{remoteRepositories: " + session.getRemoteRepositories() + "}");
  -            
  +            logger.debug( "Resolving artifacts from:\n" + "\t{localRepository: " + session.getLocalRepository()
+ "}\n" + "\t{remoteRepositories: " + session.getRemoteRepositories() + "}" );
  +
               return pluginManager.executeMojo( session, id );
           }
           catch ( GoalExecutionException e )
  
  
  

Mime
View raw message