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.prefix.NoPluginFoundForPrefixException;
19  import org.apache.maven.plugin.prefix.PluginPrefixRequest;
20  import org.apache.maven.plugin.prefix.PluginPrefixResolver;
21  import org.apache.maven.plugin.prefix.PluginPrefixResult;
22  import org.eclipse.aether.repository.ArtifactRepository;
23  
24  /**
25   * @author Kristian Rosenvold
26   */
27  
28  public class PluginPrefixResolverStub
29      implements PluginPrefixResolver
30  {
31      public PluginPrefixResult resolve( PluginPrefixRequest request )
32          throws NoPluginFoundForPrefixException
33      {
34          return new PluginPrefixResult()
35          {
36              public String getGroupId()
37              {
38                  return "com.foobar";
39              }
40  
41              public String getArtifactId()
42              {
43                  return "bazbaz";
44              }
45  
46              public ArtifactRepository getRepository()
47              {
48                  return null;
49              }
50          };
51      }
52  }