You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by bw...@apache.org on 2003/04/09 10:16:02 UTC

cvs commit: maven/src/java/org/apache/maven NoGoalException.java GoalException.java UnknownGoalException.java MavenSession.java

bwalding    2003/04/09 01:16:02

  Modified:    src/java/org/apache/maven UnknownGoalException.java
                        MavenSession.java
  Added:       src/java/org/apache/maven NoGoalException.java
                        GoalException.java
  Log:
  Now throws NoGoalException if no goal could be found to run
  PR: MAVEN-137
  
  Revision  Changes    Path
  1.3       +2 -2      maven/src/java/org/apache/maven/UnknownGoalException.java
  
  Index: UnknownGoalException.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/UnknownGoalException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UnknownGoalException.java	31 Dec 2002 07:00:35 -0000	1.2
  +++ UnknownGoalException.java	9 Apr 2003 08:16:02 -0000	1.3
  @@ -62,7 +62,7 @@
    * @version $Id$
    */
   public class UnknownGoalException
  -    extends MavenException
  +    extends GoalException
   {
       /** Name of unknown goal. */
       private String goalName;
  
  
  
  1.9       +3 -3      maven/src/java/org/apache/maven/MavenSession.java
  
  Index: MavenSession.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/MavenSession.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MavenSession.java	27 Feb 2003 13:15:35 -0000	1.8
  +++ MavenSession.java	9 Apr 2003 08:16:02 -0000	1.9
  @@ -352,7 +352,7 @@
       }
   
       public void attainGoals()
  -        throws UnknownGoalException, Exception
  +        throws GoalException, Exception
       {
           getPluginManager().attainGoals( getRootProject() );
       }
  @@ -364,7 +364,7 @@
        * @throws Exception
        */
       public void attainGoals( Project project )
  -        throws UnknownGoalException, Exception
  +        throws GoalException, Exception
       {
           getPluginManager().attainGoals( project );
       }
  
  
  
  1.1                  maven/src/java/org/apache/maven/NoGoalException.java
  
  Index: NoGoalException.java
  ===================================================================
  package org.apache.maven;
  
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache MavenSession" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache MavenSession", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  /** 
   * Indicates an attempt to access run Maven, without having enough information to
   * find the appropriate goal.
   *
   * @author <a href="mailto:bwalding@apache.org">Ben Walding</a>
   * @version $Id: NoGoalException.java,v 1.1 2003/04/09 08:16:02 bwalding Exp $
   */
  public class NoGoalException
      extends GoalException
  {
      /** Construct with an unknown goal name.
       *
       *  @param message The message.
       */
      public NoGoalException( String message )
      {
          super( message );
      }
  
  }
  
  
  
  1.1                  maven/src/java/org/apache/maven/GoalException.java
  
  Index: GoalException.java
  ===================================================================
  package org.apache.maven;
  
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache MavenSession" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache MavenSession", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  /** 
   * A generic exception related to Maven and goal acquisition
   *
   * @author <a href="mailto:bwalding@apache.org">Ben Walding</a>
   * @version $Id: GoalException.java,v 1.1 2003/04/09 08:16:02 bwalding Exp $
   */
  public class GoalException extends MavenException
  {
      /** Construct with an generic message.
       *
       *  @param message The message.
       */
      public GoalException(String message)
      {
          super(message);
      }
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org