Examples of BuildJob


Examples of org.apache.maven.plugin.invoker.model.BuildJob

        Map<String, BuildJob> matches = new LinkedHashMap<String, BuildJob>();

        for ( String includedFile : scanner.getIncludedFiles() )
        {
            matches.put( includedFile, new BuildJob( includedFile, type ) );
        }

        for ( String includedDir : scanner.getIncludedDirectories() )
        {
            String includedFile = includedDir + File.separatorChar + "pom.xml";
            if ( new File( scanner.getBasedir(), includedFile ).isFile() )
            {
                matches.put( includedFile, new BuildJob( includedFile, type ) );
            }
            else
            {
                matches.put( includedDir, new BuildJob( includedDir, type ) );
            }
        }

        return matches.values().toArray( new BuildJob[matches.size()] );
    }
View Full Code Here

Examples of org.apache.maven.plugin.invoker.model.BuildJob

            {
                throw new MojoExecutionException(
                    "Failed to discover projectsDirectory from pom File parameter." + " Reason: " + e.getMessage(), e );
            }

            buildJobs = new BuildJob[]{ new BuildJob( pom.getName(), BuildJob.Type.NORMAL ) };
        }
        else
        {
            try
            {
View Full Code Here

Examples of org.apache.maven.plugin.invoker.model.BuildJob

                getLog().info( "use parallelThreads " + parallelThreads );

                ExecutorService executorService = Executors.newFixedThreadPool( parallelThreads );
                for ( int i = 0; i < buildJobs.length; i++ )
                {
                    final BuildJob project = buildJobs[i];
                    executorService.execute( new Runnable()
                    {

                        public void run()
                        {
                            try
                            {
                                runBuild( projectsDir, project, finalSettingsFile );
                            }
                            catch ( MojoExecutionException e )
                            {
                                throw new RuntimeException( e.getMessage(), e );
                            }
                        }
                    } );
                }

                try
                {
                    executorService.shutdown();
                    // TODO add a configurable time out
                    executorService.awaitTermination( Long.MAX_VALUE, TimeUnit.MILLISECONDS );
                }
                catch ( InterruptedException e )
                {
                    throw new MojoExecutionException( e.getMessage(), e );
                }

            }
            else
            {
                for ( int i = 0; i < buildJobs.length; i++ )
                {
                    BuildJob project = buildJobs[i];
                    runBuild( projectsDir, project, finalSettingsFile );
                }
            }
        }
        finally
View Full Code Here

Examples of org.apache.maven.plugin.invoker.model.BuildJob

    {
        BuildJob[] buildJobs;

        if ( ( pom != null ) && pom.exists() )
        {
            buildJobs = new BuildJob[]{ new BuildJob( pom.getAbsolutePath(), BuildJob.Type.NORMAL ) };
        }
        else if ( invokerTest != null )
        {
            String[] testRegexes = StringUtils.split( invokerTest, "," );
            List<String> includes = new ArrayList<String>( testRegexes.length );
View Full Code Here

Examples of org.apache.maven.plugin.invoker.model.BuildJob

        Map<String, BuildJob> matches = new LinkedHashMap<String, BuildJob>();

        String[] includedFiles = scanner.getIncludedFiles();
        for ( int i = 0; i < includedFiles.length; i++ )
        {
            matches.put( includedFiles[i], new BuildJob( includedFiles[i], type ) );
        }

        String[] includedDirs = scanner.getIncludedDirectories();
        for ( int i = 0; i < includedDirs.length; i++ )
        {
            String includedFile = includedDirs[i] + File.separatorChar + "pom.xml";
            if ( new File( scanner.getBasedir(), includedFile ).isFile() )
            {
                matches.put( includedFile, new BuildJob( includedFile, type ) );
            }
            else
            {
                matches.put( includedDirs[i], new BuildJob( includedDirs[i], type ) );
            }
        }

        return matches.values().toArray( new BuildJob[matches.size()] );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.