java - maven maven-bundle-plugin - Bundle-Version 的值无效
问题描述
不知何故,maven-bundle-plugin 的“默认”版本正则表达式不允许我使用这样的版本号。
2.0.2021102095
1.1.2021102555
但它像这样接受这些版本。
2.0.202110201
2.0.20211020101
2.0.202110209999
2.0.2021102099991-快照
这是我在不接受版本号时遇到的错误。验证给定的正则表达式版本应该被接受,但不知何故它不是。
尝试了 maven-bundle-plugin 的几个版本,但这没有任何区别。
有人懂这个吗?有没有办法覆盖版本正则表达式?
谢谢。
[ERROR] Bundle xslt.CustomXSLTMediator:CustomXSLTMediator:bundle:2.0.2021102095 : Invalid value for Bundle-Version, 2.0.2021102095 does not match [0-9]{1,9}(\.[0-9]{1,9}(\.[0-9]{1,9}(\.[0-9A-Za-z_-]+)?)?)?
[ERROR] Error(s) found in bundle configuration
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.297 s
[INFO] Finished at: 2021-10-22T12:12:05+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:3.5.1:bundle (default-bundle) on project CustomXSLTMediator: Error(s) found in bundle configuration -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.felix:maven-bundle-plugin:3.5.1:bundle (default-bundle) on project CustomXSLTMediator: Error(s) found in bundle configuration
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.5.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>CustomXSLTMediator</Bundle-SymbolicName>
<Bundle-Name>${project.name}</Bundle-Name>
<!--<Bundle-Version>1.0.0.0</Bundle-Version> -->
<Bundle-Version>${project.version}</Bundle-Version>
<Export-Package>xslt</Export-Package>
<DynamicImport-Package>*</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
解决方案
推荐阅读
- android - 如何在服务或接收器中使用没有 XML 和 PreviewView 的 CameraX?
- reactjs - 在本机反应中将GIF设置为文本背景
- python - 在 seaborn 中可视化数据
- python - 无法安装tabletext
- c++ - 如何从protobuf中的枚举中获取下一个枚举值?
- r - 如何创建矩阵的直方图?
- java - Java:如何从外部方法调用整数值
- express - 在 Express/Nginx 上使用带有 ejs 的 socket.io
- sql - 如果旧值在 Merge 中更新时未更改,则不要在 Merge 语句中更新值
- python - 如何创建嵌套字典 PYTHON