GroupCDG-Labs / pitest-github-demo

Other
3 stars 2 forks source link

No plugin found for prefix 'pitest-git' #12

Open joel-costigliola opened 2 years ago

joel-costigliola commented 2 years ago

https://github.com/assertj/assertj/runs/7763829056?check_suite_focus=true shows an error while trying to find the

[ERROR] No plugin found for prefix 'pitest-git' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/runner/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

I'm not sure what this error exactly means, assertj-core uses this profile (showing here the effective pom view):

    <profile>
      <id>pitest</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-maven</artifactId>
            <executions>
              <execution>
                <id>pitest</id>
                <phase>test-compile</phase>
                <goals>
                  <goal>mutationCoverage</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.groupcdg</groupId>
            <artifactId>pitest-git-maven-plugin</artifactId>
            <version>0.2.0</version>
          </plugin>
        </plugins>
      </build>
    </profile>

I was able to find the plugin in maven central: https://repo.maven.apache.org/maven2/com/groupcdg/pitest-git-maven-plugin/0.2.0/ Not sure what the role of the metadata is but it looks ok as there is a pitest-git prefix there: https://repo.maven.apache.org/maven2/com/groupcdg/maven-metadata.xml

<plugin>
  <name>pitest-git-maven</name>
  <prefix>pitest-git</prefix>
  <artifactId>pitest-git-maven-plugin</artifactId>
</plugin>

I wonder if it's something related to the plugin repositories :thinking:

Is there something we can look at?

Note:

scordio commented 2 years ago

It's most likely an AssertJ issue, hopefully fixed by assertj/assertj@661e5d5245ab6f6372022cd34e4b280cc5d46577. However, it's not the final solution because it targets assertj-core only and not the multi-module.

@hcoles my idea would be to move the pitest declarations we have in assertj-core to the root POM and let the plugins run from there. Do you think it could work?

About the missing plugin in IntelliJ, it probably happens because the plugin declaration is under a profile and that profile is not activated by default. Activating the profile manually fixes the issue for me.