001    package org.apache.maven.lifecycle.internal.stub;
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
005     * agreements. See the NOTICE file distributed with this work for additional information regarding
006     * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
007     * "License"); you may not use this file except in compliance with the License. You may obtain a
008     * copy of the License at
009     *
010     * http://www.apache.org/licenses/LICENSE-2.0
011     *
012     * Unless required by applicable law or agreed to in writing, software distributed under the License
013     * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
014     * or implied. See the License for the specific language governing permissions and limitations under
015     * the License.
016     */
017    
018    import java.util.List;
019    
020    import org.apache.maven.execution.MavenSession;
021    import org.apache.maven.model.Plugin;
022    import org.apache.maven.plugin.BuildPluginManager;
023    import org.apache.maven.plugin.MojoExecution;
024    import org.apache.maven.plugin.descriptor.MojoDescriptor;
025    import org.apache.maven.plugin.descriptor.PluginDescriptor;
026    import org.codehaus.plexus.classworlds.realm.ClassRealm;
027    import org.eclipse.aether.RepositorySystemSession;
028    import org.eclipse.aether.repository.RemoteRepository;
029    
030    /**
031     * @author Kristian Rosenvold
032     */
033    public class BuildPluginManagerStub
034        implements BuildPluginManager
035    {
036    
037        public PluginDescriptor loadPlugin( Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session )
038        {
039            return null;
040        }
041    
042        public MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, List<RemoteRepository> repositories,
043                                                 RepositorySystemSession session )
044        {
045            return MojoExecutorStub.createMojoDescriptor( plugin.getKey() );
046        }
047    
048        public ClassRealm getPluginRealm( MavenSession session, PluginDescriptor pluginDescriptor )
049        {
050            return null;
051        }
052    
053        public void executeMojo( MavenSession session, MojoExecution execution )
054        {
055        }
056    }