[ 
https://issues.apache.org/jira/browse/TIKA-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135106#comment-13135106
 ] 

Ingo Renner commented on TIKA-761:
----------------------------------

Hi Nick and Jukka, some update on the META-INF approach:

The path for the properties file would be
/META-INF/maven/org.apache.tika/tika-core/pom.properties

I tried 
String pomPropertiesFile = "/META-INF/maven/"
    + this.getClass().getPackage().getName()
    + "/tika-core/pom.properties";
InputStream pomIs = Tika.class.getResourceAsStream(pomPropertiesFile);

Problem is that getResourceAsStream replaces dots in the path with slashes 
except for the last one. So the path becomes something like 
/META-INF/maven/org/apache/tika/tika-core/pom.properties leading to an NPE when 
trying to load the properties from pomIs. ... Leaving us (me?) w/o a way to get 
to this properties file...

Any ideas?
                
> Provide version number by CLI argument -V
> -----------------------------------------
>
>                 Key: TIKA-761
>                 URL: https://issues.apache.org/jira/browse/TIKA-761
>             Project: Tika
>          Issue Type: New Feature
>          Components: cli, general
>            Reporter: Ingo Renner
>            Priority: Minor
>         Attachments: TIKA-761.diff, TIKA-761.diff, TIKA-761.diff, 
> TIKA-761.diff
>
>
> I'd like to get the Apache Tika version number through CLI argument -V or 
> --version. The patch is trivial and basically finished. The only thing 
> missing (because Java is not my native programming language) is the actual 
> version number. Any hints where I can get that from?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to