Incrementals:reincrementalify failed to run

Where does this key needs to be set? using mvn release:prepare release:perform

[ERROR] Failed to execute goal io.jenkins.tools.incrementals:incrementals-maven-plugin:1.2:reincrementalify (default-cli) on project accelq-ci-connect: Cannot use reincrementalify before incrementals is enabled: Cannot use reincrementalify before incrementals is enabled:
[ERROR] Please use ‘incrementals:incrementalify’ to enable incrementals

This error message suggests that you need to enable the incrementals feature in your Maven build before you can use the reincrementalify goal provided by the incrementals-maven-plugin.

To enable the incrementals feature, you can add the following configuration to your Maven settings.xml file:

<settings>
  <profiles>
    <profile>
      <id>jenkins</id>
      <activation>
        <property>
          <name>env.BUILD_NUMBER</name>
        </property>
      </activation>
      <properties>
        <maven.incremental.build>true</maven.incremental.build>
      </properties>
    </profile>
  </profiles>
</settings>

This configuration enables the maven.incremental.build property for Maven builds that are executed within a Jenkins environment (identified by the BUILD_NUMBER environment variable).

Once you have enabled the incrementals feature, you should be able to use the incrementals:incrementalify goal to enable incremental builds, which will allow you to use the reincrementalify goal later on. To do this, you can execute the following command:

mvn incrementals:incrementalify

This should enable incremental builds for your project and allow you to use the reincrementalify goal provided by the incrementals-maven-plugin .

This configuration enables the maven.incremental.build property for Maven builds that are executed within a Jenkins environment (identified by the BUILD_NUMBER environment variable).

Was this answer written by ChatGPT? It is confident but completely incorrect. incrementals-maven-plugin doesn’t even contain the string maven.incremental.build.

Check the archetype and make sure your plugin has the <version>, <url>, <scm>, and <properties> sections set as in the archetype. Look at an existing plugin like email-ext for an example if needed. If you still have problems, post a link to your pom.xml file in this thread.

1 Like