在MANIFEST.MF文件中找不到属性'JCabi-Version'

时间:2014-12-01 16:23:43

标签: java maven jar maven-shade-plugin jcabi

每当我尝试从命令提示符运行项目的jar文件时,我都会收到此错误。这是什么意思?我检查了ValidatorBuilder的清单,它有jcabi-version属性。任何帮助表示赞赏。谢谢。

2014-12-01 09:42:49 DEBUG ServiceLoaderUtils:138 - Trying to load all SPI implem
entations of interface com.phloc.commons.hash.IHashCodeImplementationRegistrarSP
I
2014-12-01 09:42:49 DEBUG ServiceLoaderUtils:172 - Finished loading all SPI impl
ementations of interface com.phloc.commons.hash.IHashCodeImplementationRegistrar
SPI --> returning 2 instances
2014-12-01 09:42:49 DEBUG HashCodeImplementationRegistry:281 - Found no hashCode
 implementation for class java.lang.String
2014-12-01 09:42:49 DEBUG Manifests:168 - 6 attribute(s) loaded ["Archiver-Versi
on", "Build-Jdk", "Built-By", "Created-By", "Main-Class", "Manifest-Version"]
2014-12-01 09:42:49 INFO  Manifests:193 - 6 attributes loaded from 1 stream(s) i
n 10ms, 6 saved, 0 ignored: ["Archiver-Version", "Build-Jdk", "Built-By", "Creat
ed-By", "Main-Class", "Manifest-Version"]
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.jcabi.w3c.ValidatorBuilder.<clinit>(ValidatorBuilder.java:71)
        at com.cerner.devcenter.wag.processor.CSSValidatorAdapter.cssW3CValidati
on(CSSValidatorAdapter.java:29)
        at com.cerner.devcenter.wag.processor.CSSValidator.validateCSS(CSSValida
tor.java:50)
        at com.cerner.devcenter.wag.ruleEngine.CSSRuleEngine.<init>(CSSRuleEngin
e.java:64)
        at com.cerner.devcenter.wag.processor.CSSAssessment.getGradeReport(CSSAs
sessment.java:134)
        at com.cerner.devcenter.wag.textHandler.AssessmentFactory.getGradeReport
(AssessmentFactory.java:98)
        at com.cerner.devcenter.wag.WebAssessmentGraderRunner.trackAssessmentFil
es(WebAssessmentGraderRunner.java:138)
        at com.cerner.devcenter.wag.WebAssessmentGraderRunner.trackAssessmentFil
es(WebAssessmentGraderRunner.java:135)
        at com.cerner.devcenter.wag.WebAssessmentGraderRunner.main(WebAssessment
GraderRunner.java:85)
Caused by: java.lang.IllegalArgumentException: Attribute 'JCabi-Version' not fou
nd in MANIFEST.MF file(s) among 6 other attribute(s): ["Archiver-Version", "Buil
d-Jdk", "Built-By", "Created-By", "Main-Class", "Manifest-Version"]
        at com.jcabi.manifests.Manifests.read(Manifests.java:274)
        at com.jcabi.w3c.BaseValidator.<clinit>(BaseValidator.java:63)
        ... 9 more

1 个答案:

答案 0 :(得分:-1)

看起来你正在使用旧版本的jcabi-w3c。试试最新的(1.1)。如果您仍然遇到同样的问题,请在此处提交票证:https://github.com/jcabi/jcabi-w3c/issues我们会尽力提供帮助