You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2014/06/12 21:01:20 UTC

Using the plugin testing harness

So, I tried to set up the testing harness in a project:

  <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>

And I'm failing to run the test with:

org.codehaus.plexus.component.repository.exception.ComponentLookupException:
Component descriptor cannot be found in the component repository
      role: org.apache.maven.plugin.Mojo
  roleHint: com.github.maven-nar:nar-maven-plugin:3.1.1-SNAPSHOT:nar-validate
classRealm: none specified
at org.codehaus.plexus.DefaultComponentRegistry.getComponentManager(DefaultComponentRegistry.java:435)

nar-validate is the name of the mojo.

This project uses a pretty old base maven version and a pretty old junit.

The stub pom I have is :

 <build>
        <plugins>
            <plugin>
                <groupId>com.github.maven-nar</groupId>
                <artifactId>nar-maven-plugin</artifactId>
                <configuration>
                    <project
implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub"/>
                </configuration>
            </plugin>
        </plugins>
    </build>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Using the plugin testing harness

Posted by Benson Margulies <bi...@gmail.com>.
I'd love to, but this project is still depending on 2.0.9 maven
components, and the new one blows if I try to use it, complaining of
missing classes.

On Thu, Jun 12, 2014 at 3:41 PM, Igor Fedorenko <ig...@ifedorenko.com> wrote:
> I haven't used testing harness 1.3 for many years now, but in case you
> want to see how nice version 3.1 is, I just pushed sample maven plugin
> to github
>
>    https://github.com/ifedorenko/com.ifedorenko.sample-maven-plugin
>
> --
> Regards,
> Igor
>
>
> On 2014-06-12, 15:01, Benson Margulies wrote:
>>
>> So, I tried to set up the testing harness in a project:
>>
>>    <dependency>
>>        <groupId>org.apache.maven.plugin-testing</groupId>
>>        <artifactId>maven-plugin-testing-harness</artifactId>
>>        <version>1.3</version>
>>        <scope>test</scope>
>>      </dependency>
>>
>> And I'm failing to run the test with:
>>
>>
>> org.codehaus.plexus.component.repository.exception.ComponentLookupException:
>> Component descriptor cannot be found in the component repository
>>        role: org.apache.maven.plugin.Mojo
>>    roleHint:
>> com.github.maven-nar:nar-maven-plugin:3.1.1-SNAPSHOT:nar-validate
>> classRealm: none specified
>> at
>> org.codehaus.plexus.DefaultComponentRegistry.getComponentManager(DefaultComponentRegistry.java:435)
>>
>> nar-validate is the name of the mojo.
>>
>> This project uses a pretty old base maven version and a pretty old junit.
>>
>> The stub pom I have is :
>>
>>   <build>
>>          <plugins>
>>              <plugin>
>>                  <groupId>com.github.maven-nar</groupId>
>>                  <artifactId>nar-maven-plugin</artifactId>
>>                  <configuration>
>>                      <project
>> implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub"/>
>>                  </configuration>
>>              </plugin>
>>          </plugins>
>>      </build>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Using the plugin testing harness

Posted by Igor Fedorenko <ig...@ifedorenko.com>.
I haven't used testing harness 1.3 for many years now, but in case you
want to see how nice version 3.1 is, I just pushed sample maven plugin
to github

    https://github.com/ifedorenko/com.ifedorenko.sample-maven-plugin

--
Regards,
Igor

On 2014-06-12, 15:01, Benson Margulies wrote:
> So, I tried to set up the testing harness in a project:
>
>    <dependency>
>        <groupId>org.apache.maven.plugin-testing</groupId>
>        <artifactId>maven-plugin-testing-harness</artifactId>
>        <version>1.3</version>
>        <scope>test</scope>
>      </dependency>
>
> And I'm failing to run the test with:
>
> org.codehaus.plexus.component.repository.exception.ComponentLookupException:
> Component descriptor cannot be found in the component repository
>        role: org.apache.maven.plugin.Mojo
>    roleHint: com.github.maven-nar:nar-maven-plugin:3.1.1-SNAPSHOT:nar-validate
> classRealm: none specified
> at org.codehaus.plexus.DefaultComponentRegistry.getComponentManager(DefaultComponentRegistry.java:435)
>
> nar-validate is the name of the mojo.
>
> This project uses a pretty old base maven version and a pretty old junit.
>
> The stub pom I have is :
>
>   <build>
>          <plugins>
>              <plugin>
>                  <groupId>com.github.maven-nar</groupId>
>                  <artifactId>nar-maven-plugin</artifactId>
>                  <configuration>
>                      <project
> implementation="org.apache.maven.plugin.testing.stubs.MavenProjectStub"/>
>                  </configuration>
>              </plugin>
>          </plugins>
>      </build>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org