View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
3    * agreements. See the NOTICE file distributed with this work for additional information regarding
4    * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
5    * "License"); you may not use this file except in compliance with the License. You may obtain a
6    * copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software distributed under the License
11   * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing permissions and limitations under
13   * the License.
14   */
15  
16  package org.apache.maven.lifecycle.internal.stub;
17  
18  import org.apache.maven.plugin.version.PluginVersionRequest;
19  import org.apache.maven.plugin.version.PluginVersionResolutionException;
20  import org.apache.maven.plugin.version.PluginVersionResolver;
21  import org.apache.maven.plugin.version.PluginVersionResult;
22  import org.eclipse.aether.repository.ArtifactRepository;
23  
24  /**
25   * @author Kristian Rosenvold
26   */
27  
28  public class PluginVersionResolverStub
29      implements PluginVersionResolver
30  {
31  
32      public PluginVersionResult resolve( PluginVersionRequest request )
33          throws PluginVersionResolutionException
34      {
35          return new PluginVersionResult()
36          {
37              public String getVersion()
38              {
39                  return "0.42";
40              }
41  
42              public ArtifactRepository getRepository()
43              {
44                  return null;
45              }
46          };
47      }
48  }