You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-dev@maven.apache.org by Stephen Connolly <st...@gmail.com> on 2010/12/04 23:38:02 UTC

Re: svn commit: r1042246 [1/2] - in /maven/surefire/trunk: maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/ maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/ maven-surefire-common/src/main/java/org/apache/mave

On 4 December 2010 22:16, <kr...@apache.org> wrote:

> Author: krosenvold
> Date: Sat Dec  4 22:16:45 2010
> New Revision: 1042246
>
> URL: http://svn.apache.org/viewvc?rev=1042246&view=rev
> Log:
> [SUREFIRE-408] Made it possible to explicitly specify provider
>
> ServiceProvider code by Stephen Connolly
>
> @@ -564,16 +574,36 @@ public class SurefirePlugin
>      */
>     private ToolchainManager toolchainManager;
>
> +    private PlexusContainer container;
> +
> +
> +    public void contextualize( Context context )
> +        throws ContextException
> +    {
> +        container = (PlexusContainer) context.get(
> PlexusConstants.PLEXUS_KEY );
> +    }
>
>     public void execute()
>         throws MojoExecutionException, MojoFailureException
>     {
> +        final WellKnownProvider provider = initialize();
>         if ( verifyParameters() )
>         {
>             final Classpath bootClasspathConfiguration = new Classpath();
>             ForkConfiguration forkConfiguration =
> getForkConfiguration(bootClasspathConfiguration);
>
> -            BooterConfiguration booterConfiguration =
> createBooterConfiguration( forkConfiguration );
> +            BooterConfiguration booterConfiguration =
> createBooterConfiguration( forkConfiguration, provider );
> +
> +            try
> +            {
> +                final Set objects =
> +                    ProviderDetector.getServiceNames(
> SurefireProvider.class, Thread.currentThread().getContextClassLoader());
> +                System.out.println(objects);
>
Is this intentional?

> +            }
> +            catch ( IOException e )
> +            {
> +                e.printStackTrace();  //To change body of catch statement
> use File | Settings | File Templates.
>
Is this intentional?

> +            }
>
>             getLog().info(
>                 StringUtils.capitalizeFirstLetter( getPluginName() ) + "
> report directory: " + getReportsDirectory() );
>
>
Otherwise looks good ;-)

Re: svn commit: r1042246 [1/2] - in /maven/surefire/trunk: maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/ maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/ maven-surefire-common/src/main/java/org/apache/mave

Posted by Kristian Rosenvold <kr...@gmail.com>.
Oh dear, a couple of hunks of "testing" code had snuck in there, removed
in r1042299.

6 items left on my todo list before 2.7.

Kristian



lø., 04.12.2010 kl. 22.38 +0000, skrev Stephen Connolly:
> On 4 December 2010 22:16, <kr...@apache.org> wrote:
> 
> > Author: krosenvold
> > Date: Sat Dec  4 22:16:45 2010
> > New Revision: 1042246
> >
> > URL: http://svn.apache.org/viewvc?rev=1042246&view=rev
> > Log:
> > [SUREFIRE-408] Made it possible to explicitly specify provider
> >
> > ServiceProvider code by Stephen Connolly
> >
> > @@ -564,16 +574,36 @@ public class SurefirePlugin
> >      */
> >     private ToolchainManager toolchainManager;
> >
> > +    private PlexusContainer container;
> > +
> > +
> > +    public void contextualize( Context context )
> > +        throws ContextException
> > +    {
> > +        container = (PlexusContainer) context.get(
> > PlexusConstants.PLEXUS_KEY );
> > +    }
> >
> >     public void execute()
> >         throws MojoExecutionException, MojoFailureException
> >     {
> > +        final WellKnownProvider provider = initialize();
> >         if ( verifyParameters() )
> >         {
> >             final Classpath bootClasspathConfiguration = new Classpath();
> >             ForkConfiguration forkConfiguration =
> > getForkConfiguration(bootClasspathConfiguration);
> >
> > -            BooterConfiguration booterConfiguration =
> > createBooterConfiguration( forkConfiguration );
> > +            BooterConfiguration booterConfiguration =
> > createBooterConfiguration( forkConfiguration, provider );
> > +
> > +            try
> > +            {
> > +                final Set objects =
> > +                    ProviderDetector.getServiceNames(
> > SurefireProvider.class, Thread.currentThread().getContextClassLoader());
> > +                System.out.println(objects);
> >
> Is this intentional?
> 
> > +            }
> > +            catch ( IOException e )
> > +            {
> > +                e.printStackTrace();  //To change body of catch statement
> > use File | Settings | File Templates.
> >
> Is this intentional?
> 
> > +            }
> >
> >             getLog().info(
> >                 StringUtils.capitalizeFirstLetter( getPluginName() ) + "
> > report directory: " + getReportsDirectory() );
> >
> >
> Otherwise looks good ;-)