Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting correct value #34

Open
lamikam opened this issue May 16, 2016 · 3 comments
Open

Not getting correct value #34

lamikam opened this issue May 16, 2016 · 3 comments

Comments

@lamikam
Copy link

lamikam commented May 16, 2016

I have generated a new attribute "SCM-Revision" in the war file mainfest.mf. war file is in an ear file:

Manifest-Version: 1.0
Implementation-Title: XXX
Implementation-Version: 1.0
SCM-Revision: 5792
Archiver-Version: Plexus Archiver

WHen I callManifests.exists("SCM-Revision");
it returns false.

Any clue why?

@dmarkov
Copy link

dmarkov commented May 20, 2016

@yegor256 please take a look at it and dispatch (see par.21)

@yegor256
Copy link
Member

@lamikam I have no idea. it has to work. maybe the MANIFEST.MF file is not in the classpath?

@proshin-roman
Copy link
Contributor

@lamikam I faced with this issue too and got a self-explained error message:

Caused by: java.lang.IllegalArgumentException: Attribute 'SCM-Revision' not found in MANIFEST.MF file(s) among 68 other attribute(s): ["Agent-Class", "Ant-Version", "Archiver-Version", "Automatic-Module-Name", "Bnd-LastModified", "Build-Jdk", "Build-Timestamp", "Built-By", "Bundle-ContactAddress", "Bundle-Description", "Bundle-DocURL", "Bundle-License", "Bundle-ManifestVersion", "Bundle-Name", "Bundle-RequiredExecutionEnvironment", "Bundle-SymbolicName", "Bundle-Vendor", "Bundle-Version", "Can-Redefine-Classes", "Can-Retransform-Classes", "Can-Set-Native-Method-Prefix", "Created-By", "DSTAMP", "DynamicImport-Package", "Export-Package", "Extension-Name", "Extension-name", "Implementation-Build", "Implementation-Build-Date", "Implementation-Title", "Implementation-URL", "Implementation-Vendor", "Implementation-Vendor-Id", "Implementation-Version", "Import-Package", "Include-Resource", "Ion-Java-Build-Time", "Ion-Java-Project-Version", "JCabi-Build", "JCabi-Date", "JCabi-Version", "Java-Vendor", "Java-Version", "Lombok-Version", "Main-Class", "Manifest-Version", "Name", "Originally-Created-By", "Os-Arch", "Os-Name", "Os-Version", "Package", "Premain-Class", "Private-Package", "Require-Capability", "Scm-Connection", "Scm-Revision", "Scm-Url", "Specification-Title", "Specification-Vendor", "Specification-Version", "TODAY", "TSTAMP", "Time-Zone-Database-Version", "Tool", "X-Compile-Source-JDK", "X-Compile-Target-JDK", "url"]
at com.jcabi.manifests.Manifests.read(Manifests.java:274) ~[jcabi-manifests-1.1.jar:na]

As you can see there is an attribute "Scm-Revision" - see the difference with the original "SCM-Revision"? I couldn't find any info if this "CamelCase" is a requirement for MANIFEST.MF (at least the library itself doesn't change the case of attributes).
But I would suggest to fix the library so that it considers attributes case-insensitively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants