View Javadoc
1   package org.apache.maven.lifecycle.internal.stub;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
5    * agreements. See the NOTICE file distributed with this work for additional information regarding
6    * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance with the License. You may obtain a
8    * copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software distributed under the License
13   * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14   * or implied. See the License for the specific language governing permissions and limitations under
15   * the License.
16   */
17  
18  import java.util.List;
19  
20  import org.apache.maven.execution.MavenSession;
21  import org.apache.maven.model.Plugin;
22  import org.apache.maven.plugin.BuildPluginManager;
23  import org.apache.maven.plugin.MojoExecution;
24  import org.apache.maven.plugin.descriptor.MojoDescriptor;
25  import org.apache.maven.plugin.descriptor.PluginDescriptor;
26  import org.codehaus.plexus.classworlds.realm.ClassRealm;
27  import org.eclipse.aether.RepositorySystemSession;
28  import org.eclipse.aether.repository.RemoteRepository;
29  
30  /**
31   * @author Kristian Rosenvold
32   */
33  public class BuildPluginManagerStub
34      implements BuildPluginManager
35  {
36  
37      public PluginDescriptor loadPlugin( Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session )
38      {
39          return null;
40      }
41  
42      public MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, List<RemoteRepository> repositories,
43                                               RepositorySystemSession session )
44      {
45          return MojoExecutorStub.createMojoDescriptor( plugin.getKey() );
46      }
47  
48      public ClassRealm getPluginRealm( MavenSession session, PluginDescriptor pluginDescriptor )
49      {
50          return null;
51      }
52  
53      public void executeMojo( MavenSession session, MojoExecution execution )
54      {
55      }
56  }