return configuration processing parameters in response header by lfoppiano · Pull Request #1274 · grobidOrg/grobid (original) (raw)

The git revision is not always available, for example when grobid is run in intellij idea calling directly the main class, we've return unknown for both version and revision.

        <appInfo>
            <application version="unknown" ident="GROBID" when="2025-04-11T07:46+0000">
                <desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
                <label type="revision">unknown</label>
                <label type="parameters">startPage=-1, endPage=-1, consolidateCitations=0, consolidateHeader=0, consolidateFunders=0, includeRawAffiliations=false, includeRawCitations=false, includeRawCopyrights=false, generateTeiIds=false, generateTeiCoordinates=[], flavor=null</label>
                <ref target="https://github.com/kermitt2/grobid"/>
            </application>
        </appInfo>

When we run with ./gradlew run we've got:

      <appInfo>
            <application version="0.8.2-SNAPSHOT" ident="GROBID" when="2025-04-11T07:14+0000">
                <desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
                <label type="revision">812314141</label>
                <desc type="parameters">startPage=-1, endPage=-1, consolidateCitations=0, consolidateHeader=0, consolidateFunders=0, includeRawAffiliations=false, includeRawCitations=false, includeRawCopyrights=false, generateTeiIds=false, generateTeiCoordinates=[], flavor=null</desc>
                <ref target="https://github.com/kermitt2/grobid"/>
            </application>
        </appInfo>

However the revision is not working when running ./gradlew run from intellij