View Javadoc

1   package org.apache.maven.project;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *  http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.File;
23  
24  import org.apache.maven.project.validation.ModelValidationResult;
25  
26  @Deprecated
27  public class InvalidProjectModelException
28      extends ProjectBuildingException
29  {
30      private ModelValidationResult validationResult;
31  
32      public InvalidProjectModelException( String projectId, String message, File pomLocation )
33      {
34          super( projectId, message, pomLocation );
35      }
36  
37      /**
38       * @param projectId
39       * @param pomLocation      absolute path of the pom file
40       * @param message
41       * @param validationResult
42       * @deprecated use {@link File} constructor for pomLocation
43       */
44      public InvalidProjectModelException( String projectId, String pomLocation, String message,
45                                           ModelValidationResult validationResult )
46      {
47          this( projectId, message, new File( pomLocation ), validationResult );
48      }
49  
50      public InvalidProjectModelException( String projectId, String message, File pomFile,
51                                           ModelValidationResult validationResult )
52      {
53          super( projectId, message, pomFile );
54  
55          this.validationResult = validationResult;
56      }
57  
58      /**
59       * @param projectId
60       * @param pomLocation absolute path of the pom file
61       * @param message
62       * @deprecated use {@link File} constructor for pomLocation
63       */
64      public InvalidProjectModelException( String projectId, String pomLocation, String message )
65      {
66          this( projectId, message, new File( pomLocation ) );
67      }
68  
69      public final ModelValidationResult getValidationResult()
70      {
71          return validationResult;
72      }
73  
74  }