How to fix PluginincompatibleException?

荒凉一梦 提交于 2019-12-12 06:48:42

问题


I am trying to build a project in Netbeans from Maven Central. When I first tried to build the project there were a number of error messages because plugins didn't have versions specified in the POM. I fixed those problems.

I am running the latest version of Maven 3.5.0. I specified in the POM the latest version of the plugin. Here is the related section of the POM complete with the version number I added.

    <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <version>2.2.2</version>
        <executions>
            <execution>
                <id>get-the-git-infos</id>
                <goals>
                    <goal>revision</goal>
                </goals>
            </execution>
            <execution>
                <id>validate-the-git-infos</id>
                <goals>
                    <goal>revision</goal>
                </goals>
                <phase>package</phase>
            </execution>
        </executions>

        <configuration>
            <generateGitPropertiesFile>true</generateGitPropertiesFile>
            <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
            <excludeProperties>
                <excludeProperty>git.build.*</excludeProperty>
                <excludeProperty>git.commit.user.email</excludeProperty>
                <excludeProperty>git.commit.message.*</excludeProperty>
                <excludeProperty>git.commit.id.describe</excludeProperty>
                <excludeProperty>git.commit.user.name</excludeProperty>
                <excludeProperty>git.remote.origin.url</excludeProperty>
                <excludeProperty>git.commit.id.abbrev</excludeProperty>
                <excludeProperty>git.closest.tag.name</excludeProperty>
                <excludeProperty>git.closest.tag.commit.count</excludeProperty>
                <excludeProperty>git.remote.origin.url</excludeProperty>
            </excludeProperties>
        </configuration>
    </plugin>

I now get the follow fatal error:

cd D:\darren\My Documents\NetBeansProjects\XBee-API; "JAVA_HOME=D:\\Program Files\\Java\\jdk1.8.0_121" cmd /c "\"\"D:\\Program Files\\Java\\NetBeans 8.2\\java\\maven\\bin\\mvn.bat\" -Dmaven.ext.class.path=\"D:\\Program Files\\Java\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 install\""
Scanning for projects...
Inspecting build with total of 1 modules...
Installing Nexus Staging features:
  ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin

------------------------------------------------------------------------
Building com.rapplogic:xbee-api 0.9.2
------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/pl/project13/maven/git-commit-id-plugin/2.2.2/git-commit-id-plugin-2.2.2.pom
log4j:WARN No appenders could be found for logger (org.apache.maven.wagon.providers.http.httpclient.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.

Downloaded: http://repo.maven.apache.org/maven2/pl/project13/maven/git-commit-id-plugin/2.2.2/git-commit-id-plugin-2.2.2.pom (13 KB at 25.6 KB/sec)
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.729s
Finished at: Tue Jul 04 22:15:49 NZST 2017
Final Memory: 14M/245M
------------------------------------------------------------------------
Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.2:revision (get-the-git-infos) on project xbee-api: The plugin pl.project13.maven:git-commit-id-plugin:2.2.2 requires Maven version [3.1.1,) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginIncompatibleException

The Wiki help page is no help. There is no obvious way to resolve this problem and clear the error.

来源:https://stackoverflow.com/questions/44903500/how-to-fix-pluginincompatibleexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!