Java 类org.apache.maven.plugin.BuildPluginManager 实例源码

项目:mavensonarsputnik    文件:MavenEnvironment.java   
public MavenEnvironment(MavenSession aMavenSession, BuildPluginManager aBuildPluginManager, Log aLog,
        DependencyTreeBuilder aDependencyTreeBuilder, ArtifactRepository aLocalRepository,
        SecDispatcher aSecurityDispatcher, MavenProjectBuilder aProjectBuilder,
        LifecycleExecutor aLifecycleExecutor, ArtifactFactory aArtifactFactory,
        ArtifactMetadataSource aArtifactMetadataSource, ArtifactCollector aArtifactCollector, RuntimeInformation aRuntimeInformation,
        MojoExecution aExecution) {
    mavenSession = aMavenSession;
    buildPluginManager = aBuildPluginManager;
    log = aLog;
    dependencyTreeBuilder = aDependencyTreeBuilder;
    localRepository = aLocalRepository;
    securityDispatcher = aSecurityDispatcher;
    projectBuilder = aProjectBuilder;
    lifecycleExecutor = aLifecycleExecutor;
    artifactFactory = aArtifactFactory;
    artifactMetadataSource = aArtifactMetadataSource;
    artifactCollector = aArtifactCollector;
    runtimeInformation = aRuntimeInformation;
    mojoExecution = aExecution;
}
项目:FitNesseLauncher    文件:SetupsMojoTestHelper.java   
public SetupsMojoTestHelper( AbstractSetupsMojo mojo ) throws IOException {
   this.workingDir = new File( System.getProperty( "java.io.tmpdir" ), "unit_test_working" );

   this.mojo = mojo;

   this.mojo.workingDir = this.workingDir.getCanonicalPath();
   this.mojo.root = FitNesseHelper.DEFAULT_ROOT;
   this.mojo.project = new MavenProject();
   this.mojo.project.setFile( new File( getClass().getResource( "pom.xml" ).getPath() ) );
   this.mojo.pluginDescriptor = new PluginDescriptor();
   this.mojo.pluginManager = mock( BuildPluginManager.class );
   this.mojo.session = mock( MavenSession.class );

   this.logStream = new ByteArrayOutputStream();
   this.mojo.setLog( new DefaultLog( new PrintStreamLogger( Logger.LEVEL_INFO, "test", new PrintStream( this.logStream ) ) ) );
}
项目:FitNesseLauncher    文件:SetupsMojoTestHelper.java   
public SetupsMojoTestHelper( AbstractSetupsMojo mojo ) throws IOException {
   this.workingDir = new File( System.getProperty( "java.io.tmpdir" ), "unit_test_working" );

   this.mojo = mojo;

   this.mojo.workingDir = this.workingDir.getCanonicalPath();
   this.mojo.root = FitNesseHelper.DEFAULT_ROOT;
   this.mojo.project = new MavenProject();
   this.mojo.project.setFile( new File( getClass().getResource( "pom.xml" ).getPath() ) );
   this.mojo.pluginDescriptor = new PluginDescriptor();
   this.mojo.pluginManager = mock( BuildPluginManager.class );
   this.mojo.session = mock( MavenSession.class );

   this.logStream = new ByteArrayOutputStream();
   this.mojo.setLog( new DefaultLog( new PrintStreamLogger( Logger.LEVEL_INFO, "test", new PrintStream( this.logStream ) ) ) );
}
项目:heroku-maven-plugin    文件:ListDependencies.java   
public static void execute(MavenProject mavenProject,
                           MavenSession mavenSession,
                           BuildPluginManager pluginManager) throws MojoExecutionException {
    executeMojo(
            plugin(
                    groupId("org.apache.maven.plugins"),
                    artifactId("maven-dependency-plugin"),
                    version("2.4")
            ),
            goal("list"),
            configuration(
                    element(name("outputFile"), "${project.build.directory}/" + FILENAME)
            ),
            executionEnvironment(
                    mavenProject,
                    mavenSession,
                    pluginManager
            )
    );
}
项目:heroku-maven-plugin    文件:CopyDependencies.java   
public static void execute(MavenProject mavenProject,
                           MavenSession mavenSession,
                           BuildPluginManager pluginManager) throws MojoExecutionException {
    executeMojo(
            plugin(
                    groupId("org.apache.maven.plugins"),
                    artifactId("maven-dependency-plugin"),
                    version("2.4")
            ),
            goal("copy-dependencies"),
            configuration(
                    element(name("outputDirectory"), "${project.build.directory}/dependency")
            ),
            executionEnvironment(
                    mavenProject,
                    mavenSession,
                    pluginManager
            )
    );
}
项目:heroku-maven-plugin    文件:CopyWebappRunner.java   
public static void execute(MavenProject mavenProject,
                           MavenSession mavenSession,
                           BuildPluginManager pluginManager,
                           String webappRunnerversion) throws MojoExecutionException {
    executeMojo(
            plugin(
                    groupId("org.apache.maven.plugins"),
                    artifactId("maven-dependency-plugin"),
                    version("2.4")
            ),
            goal("copy"),
            configuration(
                    element(name("artifactItems"),
                            element(name("artifactItem"),
                                    element(name("groupId"), "com.github.jsimone"),
                                    element(name("artifactId"), "webapp-runner"),
                                    element(name("version"), webappRunnerversion),
                                    element(name("destFileName"), "webapp-runner.jar")))
            ),
            executionEnvironment(
                    mavenProject,
                    mavenSession,
                    pluginManager
            )
    );
}
项目:mavensonarsputnik    文件:MavenEnvironment.java   
public static void initialize(MavenSession aMavenSession, BuildPluginManager aBuildPluginManager, Log aLog,
        DependencyTreeBuilder aDependencyTreeBuilder, ArtifactRepository aLocalRepository,
        SecDispatcher aSecurityDispatcher, MavenProjectBuilder aProjectBuilder,
        LifecycleExecutor aLifecycleExecutor, ArtifactFactory aArtifactFactory,
        ArtifactMetadataSource aArtifactMetadataSource, ArtifactCollector aArtifactCollector, RuntimeInformation aRuntimeInformation, MojoExecution aExecution) {
    ENVIRONMENT.set(new MavenEnvironment(aMavenSession, aBuildPluginManager, aLog,
            aDependencyTreeBuilder, aLocalRepository,
            aSecurityDispatcher, aProjectBuilder,
            aLifecycleExecutor, aArtifactFactory,
            aArtifactMetadataSource, aArtifactCollector, aRuntimeInformation, aExecution));
}
项目:NonDex    文件:NonDexSurefireExecution.java   
public NonDexSurefireExecution(Mode mode, int seed, Pattern filter, long start, long end, String nondexDir,
        String nondexJarDir, Plugin surefire, String originalArgLine, MavenProject mavenProject,
        MavenSession mavenSession, BuildPluginManager pluginManager) {
    this(surefire, originalArgLine, mavenProject, mavenSession, pluginManager, nondexDir);
    this.configuration = new Configuration(mode, seed, filter, start, end, nondexDir, nondexJarDir, null,
            this.executionId, Logger.getGlobal().getLoggingLevel());
}
项目:NonDex    文件:NonDexSurefireExecution.java   
public NonDexSurefireExecution(Configuration config, long start, long end, boolean print, String test, Plugin surefire,
        String originalArgLine, MavenProject mavenProject, MavenSession mavenSession,
        BuildPluginManager pluginManager) {

    this(surefire, originalArgLine, mavenProject, mavenSession, pluginManager, config.nondexDir);
    this.configuration = new Configuration(config.mode, config.seed, config.filter, start,
            end, config.nondexDir, config.nondexJarDir, test, this.executionId,
            Logger.getGlobal().getLoggingLevel(), print);
}
项目:NonDex    文件:CleanSurefireExecution.java   
protected CleanSurefireExecution(Plugin surefire, String originalArgLine, String executionId,
        MavenProject mavenProject, MavenSession mavenSession, BuildPluginManager pluginManager,
        String nondexDir) {
    this.executionId = executionId;
    this.surefire = surefire;
    this.originalArgLine = sanitizeAndRemoveEnvironmentVars(originalArgLine);
    this.mavenProject = mavenProject;
    this.mavenSession = mavenSession;
    this.pluginManager = pluginManager;
    this.configuration = new Configuration(executionId, nondexDir);
}
项目:NonDex    文件:DebugTask.java   
public DebugTask(String test, Plugin surefire, String originalArgLine, MavenProject mavenProject,
                 MavenSession mavenSession, BuildPluginManager pluginManager,
                 List<Configuration> failingConfigurations) {
    this.test = test;
    this.surefire = surefire;
    this.originalArgLine = originalArgLine;
    this.mavenProject = mavenProject;
    this.mavenSession = mavenSession;
    this.pluginManager = pluginManager;
    this.failingConfigurations = failingConfigurations;
}
项目:oceano    文件:DefaultLifecycleExecutionPlanCalculator.java   
public DefaultLifecycleExecutionPlanCalculator( BuildPluginManager pluginManager,
                                                DefaultLifecycles defaultLifeCycles,
                                                MojoDescriptorCreator mojoDescriptorCreator,
                                                LifecyclePluginResolver lifecyclePluginResolver,
                                                DefaultSchedules defaultSchedules )
{
    this.pluginManager = pluginManager;
    this.defaultLifeCycles = defaultLifeCycles;
    this.mojoDescriptorCreator = mojoDescriptorCreator;
    this.lifecyclePluginResolver = lifecyclePluginResolver;
    this.defaultSchedules = defaultSchedules;
}
项目:oceano    文件:MojoDescriptorCreator.java   
public MojoDescriptorCreator( PluginVersionResolver pluginVersionResolver, BuildPluginManager pluginManager,
                              PluginPrefixResolver pluginPrefixResolver,
                              LifecyclePluginResolver lifecyclePluginResolver )
{
    this.pluginVersionResolver = pluginVersionResolver;
    this.pluginManager = pluginManager;
    this.pluginPrefixResolver = pluginPrefixResolver;
    this.lifecyclePluginResolver = lifecyclePluginResolver;
}
项目:mavensonarsputnik    文件:MavenEnvironment.java   
public BuildPluginManager getBuildPluginManager() {
    return buildPluginManager;
}
项目:mavensonarsputnik    文件:MavenEnvironmentTest.java   
@Test
public void testInitialize() {
    assertNull(MavenEnvironment.get());

    MavenSession aMavenSession = mock(MavenSession.class);
    BuildPluginManager aBuildPluginManager = mock(BuildPluginManager.class);
    Log aLog = mock(Log.class);
    DependencyTreeBuilder aDependencyTreeBuilder = mock(DependencyTreeBuilder.class);
    ArtifactRepository aLocalRepository = mock(ArtifactRepository.class);
    SecDispatcher aSecurityDispatcher = mock(SecDispatcher.class);
    MavenProjectBuilder aProjectBuilder = mock(MavenProjectBuilder.class);
    LifecycleExecutor aLifecycleExecutor = mock(LifecycleExecutor.class);
    ArtifactFactory aArtifactFactory = mock(ArtifactFactory.class);
    ArtifactMetadataSource aArtifactMetadataSource = mock(ArtifactMetadataSource.class);
    ArtifactCollector aArtifactCollector = mock(ArtifactCollector.class);
    RuntimeInformation aRuntimeInformation = mock(RuntimeInformation.class);
    MojoExecution theExecution = mock(MojoExecution.class);

    MavenEnvironment.initialize(aMavenSession, aBuildPluginManager, aLog,
            aDependencyTreeBuilder, aLocalRepository,
            aSecurityDispatcher, aProjectBuilder,
            aLifecycleExecutor, aArtifactFactory,
            aArtifactMetadataSource, aArtifactCollector, aRuntimeInformation, theExecution);

    MavenEnvironment theMavenEnvironment = MavenEnvironment.get();
    assertNotNull(theMavenEnvironment);

    assertSame(aMavenSession, theMavenEnvironment.getMavenSession());
    assertSame(aBuildPluginManager, theMavenEnvironment.getBuildPluginManager());
    assertSame(aLog, theMavenEnvironment.getLog());
    assertSame(aDependencyTreeBuilder, theMavenEnvironment.getDependencyTreeBuilder());
    assertSame(aLocalRepository, theMavenEnvironment.getLocalRepository());
    assertSame(aSecurityDispatcher, theMavenEnvironment.getSecurityDispatcher());
    assertSame(aProjectBuilder, theMavenEnvironment.getProjectBuilder());
    assertSame(aLifecycleExecutor, theMavenEnvironment.getLifecycleExecutor());
    assertSame(aArtifactFactory, theMavenEnvironment.getArtifactFactory());
    assertSame(aArtifactMetadataSource, theMavenEnvironment.getArtifactMetadataSource());
    assertSame(aArtifactCollector, theMavenEnvironment.getArtifactCollector());
    assertSame(aRuntimeInformation, theMavenEnvironment.getRuntimeInformation());

    MavenEnvironment.cleanUp();;
    assertNull(MavenEnvironment.get());
}
项目:NonDex    文件:NonDexSurefireExecution.java   
private NonDexSurefireExecution(Plugin surefire, String originalArgLine, MavenProject mavenProject,
                                MavenSession mavenSession, BuildPluginManager pluginManager, String nondexDir) {
    super(surefire, originalArgLine, Utils.getFreshExecutionId(),
            mavenProject, mavenSession, pluginManager, nondexDir);
}
项目:NonDex    文件:CleanSurefireExecution.java   
public CleanSurefireExecution(Plugin surefire, String originalArgLine, MavenProject mavenProject,
        MavenSession mavenSession, BuildPluginManager pluginManager, String nondexDir) {
    this(surefire, originalArgLine, "clean_" + Utils.getFreshExecutionId(), mavenProject, mavenSession, pluginManager,
            nondexDir);
}
项目:tibco-bwmaven    文件:CopyBWTestDependenciesMojo.java   
@Override
protected BuildPluginManager getPluginManager() {
    return pluginManager;
}
项目:tibco-bwmaven    文件:CopyBWTestSourcesMojo.java   
@Override
protected BuildPluginManager getPluginManager() {
    return pluginManager;
}
项目:tibco-bwmaven    文件:CopyBWSourcesMojo.java   
@Override
protected BuildPluginManager getPluginManager() {
    return pluginManager;
}
项目:tibco-bwmaven    文件:ResolveBWDependenciesMojo.java   
@Override
protected BuildPluginManager getPluginManager() {
    // TODO Auto-generated method stub
    return pluginManager;
}
项目:tibco-bwmaven    文件:ITRunTestsMojo.java   
@Override
protected BuildPluginManager getPluginManager() {
    return pluginManager;
}
项目:tibco-bwmaven    文件:ResolveBWTestDependenciesMojo.java   
@Override
protected BuildPluginManager getPluginManager() {
    // TODO Auto-generated method stub
    return pluginManager;
}
项目:tibco-bwmaven    文件:CopyBWDependenciesMojo.java   
@Override
protected BuildPluginManager getPluginManager() {
    return pluginManager;
}
项目:heroku-maven-plugin    文件:CopyWebappRunner.java   
public static void execute(MavenProject mavenProject,
                           MavenSession mavenSession,
                           BuildPluginManager pluginManager) throws MojoExecutionException {
    execute(mavenProject, mavenSession, pluginManager, DeployWar.DEFAULT_WEBAPP_RUNNER_VERSION);
}
项目:tibco-bwmaven    文件:AbstractWrapperForBuiltinMojo.java   
protected abstract BuildPluginManager getPluginManager();