5

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.

KCS
  • 2,937
  • 4
  • 22
  • 32

3 Answers3

3

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.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
2

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>
Mack
  • 21
  • 3
  • Remark: the other answers (and the question) use the `maven-bundle-plugin`, while you use the `bnd-baseline-maven-plugin`. This should explain the differences in behavior. – Piotr P. Karwasz Jul 25 '21 at 09:26
0

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

subramanya
  • 91
  • 1
  • 11