以下是我在现有代码中添加任何新方法时遇到的错误(尤其是当我在接口或类中添加任何方法时)
--- 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
我的pom.xml包含以下插件:
<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>
任何想法...。我用Google搜索出来,花了3个小时,仍然找不到根本原因。之前,这很好。但是最近它开始给出问题的版本需要更新。
答案 0 :(得分:2)
基线插件检查导出的软件包是否根据语义版本控制规则进行了更改。默认情况下,它将新程序包中的类签名与最新版本进行比较。
结果告诉您,impl软件包需要增加次要版本,.config软件包需要增加主版本。
如果您不想运行基线目标,则可以使用maven属性跳过它:基线.skip = true
顺便说一句。您应该只对API软件包运行基线检查。在impl上,它们没有太大的意义..但是您还是应该尝试不导出impl包。
答案 1 :(得分:0)
我运行了命令: mvn clean -Dbaseline.skip = true安装, 它像魅力一样工作
答案 2 :(得分:0)
基于 AEM 6.5
我按照其他人的指示尝试了 -Dbaseline.skip=true 选项,但仍然失败。
这篇文章在这里:https://felix.apache.org/components/bundle-plugin/baseline-mojo.html
谈论添加“跳过”属性。
然后我在我的 core 模块下添加了这个属性,如下所示,一切正常:
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>
<configuration>
<failOnMissing>false</failOnMissing>
<skip>true</skip>
</configuration>
</plugin>