Krishna
Krishna

Reputation: 3177

Build Failure: Version increase required: Failed to execute goal org.apache.felix:maven-bundle-plugin:3.0.1:baseline

Below is the error i am getting when i am adding any new method to existing code (especially when i am adding any method to interface or class)

 --- animal-sniffer-maven-plugin:1.15:check (default) @ deepser ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java18:1.0
[INFO]
[INFO] --- maven-bundle-plugin:3.0.1:bundle (default-bundle) @ deepser ---
[INFO]
[INFO] --- maven-bundle-plugin:3.0.1:baseline (baseline) @ deepser ---
[INFO] Baseline Report - Generated by Apache Felix Maven Bundle Plugin on 2018-07-09T20:24Z based on Bnd - see http://www.aqute.biz/Bnd/Bnd
[INFO] Comparing bundle deepser version 18.6.5-SNAPSHOT to version 18.6.4
[INFO]
[INFO]   PACKAGE_NAME                                       DELTA      CUR_VER    BASE_VER   REC_VER    WARNINGS
[INFO] = ================================================== ========== ========== ========== ========== ==========
[INFO] * com.myowncompany.analytica.deepser.config               major      18.6.5     18.6.4     19.0.0     Version increase required
[INFO]      > interface com.myowncompany.analytica.deepser.config.DeepSearchConfig
[INFO]          + method getDeepSearchLibsCDNUrl()
[INFO]              + access abstract
[INFO]              + return java.lang.String
[INFO]      - version 18.6.4
[INFO]      + version 18.6.5
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO] * com.myowncompany.analytica.deepser.config.impl          minor      18.6.5     18.6.4     18.7.0     Version increase required
[INFO]      < class com.myowncompany.analytica.deepser.config.impl.DeepSearchConfigImpl
[INFO]          + method getDeepSearchLibsCDNUrl()
[INFO]              + return java.lang.String
[INFO]      - version 18.6.4
[INFO]      + version 18.6.5
[INFO] -----------------------------------------------------------------------------------------------------------
[ERROR] com.myowncompany.analytica.deepser.config: Version increase required; detected 18.6.5, suggested 19.0.0
[ERROR] com.myowncompany.analytica.deepser.config.impl: Version increase required; detected 18.6.5, suggested 18.7.0
[INFO] Baseline analysis complete, 2 error(s), 0 warning(s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.179 s
[INFO] Finished at: 2018-07-09T20:24:41+05:30
[INFO] Final Memory: 41M/1038M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:3.0.1:baseline (baseline) on project deepser: Baseline failed, see generated report -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=1024m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0

My pom.xml contains below plugin:

 <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-scr-plugin</artifactId>
        <version>${scr.plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>${mvn.bundle.plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Category>search</Bundle-Category>
            <!-- Export only the packages that should be visible to other bundles
              and JSPs -->
            <Export-Package>
              com.myowncompany.analytica.*
            </Export-Package>
            </instructions>
        </configuration>
      </plugin>

Any idea....i googled it out, and spend 3 hours, still not able to find root cause. Earlier this was working fine. But recently it start giving issue version need to be updated.

Upvotes: 5

Views: 7577

Answers (4)

Srikanth Popuri
Srikanth Popuri

Reputation: 97

In POM file - properties section, Update the bundle version to 5.1.0 which can work well.

<bnd.version>5.1.0</bnd.version>

Rerun the Maven build to revalidate if this works for you.!

mvn clean install

Upvotes: 0

Mack
Mack

Reputation: 21

On Basis of AEM 6.5

I tried the -Dbaseline.skip=true option as indicated by others but still failed.

This article here: https://felix.apache.org/components/bundle-plugin/baseline-mojo.html

Talks about adding 'skip' property.

I then added this property under my core module as indicated below and all worked fine:

<plugin>
    <groupId>biz.aQute.bnd</groupId>
    <artifactId>bnd-baseline-maven-plugin</artifactId>
    <configuration>
        <failOnMissing>false</failOnMissing>
        <skip>true</skip>
    </configuration>
</plugin>

Upvotes: 2

subramanya
subramanya

Reputation: 91

I ran the command : mvn clean -Dbaseline.skip=true install, it worked like a charm

Upvotes: 0

Christian Schneider
Christian Schneider

Reputation: 19626

The baseline plugin checks if exported packages changed according to semantic versioning rules. It compares the signature of classes in the new packages against the latest release by default.

The results tell you that a minor version increase is needed for the impl package and a major version increase for the .config package.

In case you did not intend to run the baseline goal you can skip it using the maven property: baseline.skip=true

Btw. you should only run the baseline checks on API packages. On impl they do not make much sense .. but you should try to not export impl packages anyway.

Upvotes: 3

Related Questions