Solr
  1. Solr
  2. SOLR-5159

Manifest includes non-parsed maven variables

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.4, 4.5, 6.0
    • Fix Version/s: 4.5, 6.0
    • Component/s: Build
    • Environment:

      Apache Maven 3.0.5

      Description

      When building Lucene/Solr with Apache Maven 3, all MANIFEST.MF files included into JAR artifacts contain non-parsed POM variables: namely, there are entries like

      Specification-Version: 5.0.0.${now.version}

      In the end, Solr displays these values on admin page in "Versions" section.

      This is caused by unresolved bug in maven-bundle-plugin (FELIX-3392).

      1. SOLR-5159.patch
        4 kB
        Artem Karpenko

        Activity

        Hide
        Artem Karpenko added a comment -

        Patch moves declaration of Manifest headers from archive configuration of maven-jar-plugin into "instructions" section of maven-bundle-plugin, which latter plugin does parse for variables correctly.

        Show
        Artem Karpenko added a comment - Patch moves declaration of Manifest headers from archive configuration of maven-jar-plugin into "instructions" section of maven-bundle-plugin, which latter plugin does parse for variables correctly.
        Hide
        Artem Karpenko added a comment -

        I've checked maven 2 builds as well - after applying changes manifest files stay the same (correct).

        Show
        Artem Karpenko added a comment - I've checked maven 2 builds as well - after applying changes manifest files stay the same (correct).
        Hide
        Steve Rowe added a comment -

        Hi Artem, I've run and compared with and without your patch on trunk with Maven3, looks good so far: $

        {svn.revision}

        and $

        {now.timestamp}

        and one other timestazmp that weren't being interpolated now are. I want to verify Maven2 locally, and I also want to compare all manifest entries with the Ant-produced ones - the solr entries were changed recently, and I want to keep them in sync. Once these issues are settled, I'll commit.

        Show
        Steve Rowe added a comment - Hi Artem, I've run and compared with and without your patch on trunk with Maven3, looks good so far: $ {svn.revision} and $ {now.timestamp} and one other timestazmp that weren't being interpolated now are. I want to verify Maven2 locally, and I also want to compare all manifest entries with the Ant-produced ones - the solr entries were changed recently, and I want to keep them in sync. Once these issues are settled, I'll commit.
        Hide
        ASF subversion and git services added a comment -

        Commit 1514813 from Steve Rowe in branch 'dev/trunk'
        [ https://svn.apache.org/r1514813 ]

        SOLR-5159: Manifest includes non-parsed maven variables

        Show
        ASF subversion and git services added a comment - Commit 1514813 from Steve Rowe in branch 'dev/trunk' [ https://svn.apache.org/r1514813 ] SOLR-5159 : Manifest includes non-parsed maven variables
        Hide
        ASF subversion and git services added a comment -

        Commit 1514814 from Steve Rowe in branch 'dev/trunk'
        [ https://svn.apache.org/r1514814 ]

        SOLR-5159: fix typo in CHANGES entry

        Show
        ASF subversion and git services added a comment - Commit 1514814 from Steve Rowe in branch 'dev/trunk' [ https://svn.apache.org/r1514814 ] SOLR-5159 : fix typo in CHANGES entry
        Hide
        ASF subversion and git services added a comment -

        Commit 1514816 from Steve Rowe in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1514816 ]

        SOLR-5159: Manifest includes non-parsed maven variables (merged trunk r1514813 and r1514814)

        Show
        ASF subversion and git services added a comment - Commit 1514816 from Steve Rowe in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1514816 ] SOLR-5159 : Manifest includes non-parsed maven variables (merged trunk r1514813 and r1514814)
        Hide
        Steve Rowe added a comment -

        I want to verify Maven2 locally, and I also want to compare all manifest entries with the Ant-produced ones - the solr entries were changed recently, and I want to keep them in sync.

        Maven 2.2.1 works fine.

        I compared the Ant-built and Maven-built manifests, and the Maven-built ones of course have lots of Bnd-produced entries not in the Ant-built ones. There are two other differences:

        1. The Maven-built manifest contains Implementation-Vendor-Id (with Maven coordinate groupId as the value: org.apache.lucene or org.apache.solr). I think this is fine to leave in, and maybe the Ant-built manifests should get it too?
        2. The Maven-built manifests have the old style Specification-Version, including a timestamp, e.g. 5.0.0.2013.08.16.12.36.14, where the Ant-built manifests just have the version, e.g. 5.0-SNAPSHOT. The latter is actually syntactically incorrect, since the value should only have digits and period. I've left it as the old style in the Maven version, since it's not a syntax error, and since the Maven versions will only ever be produced by end-users - all snapshot and release Maven artifacts are produced by Ant.

        I've committed to trunk and branch_4x.

        Thanks Artem!

        Show
        Steve Rowe added a comment - I want to verify Maven2 locally, and I also want to compare all manifest entries with the Ant-produced ones - the solr entries were changed recently, and I want to keep them in sync. Maven 2.2.1 works fine. I compared the Ant-built and Maven-built manifests, and the Maven-built ones of course have lots of Bnd-produced entries not in the Ant-built ones. There are two other differences: The Maven-built manifest contains Implementation-Vendor-Id (with Maven coordinate groupId as the value: org.apache.lucene or org.apache.solr). I think this is fine to leave in, and maybe the Ant-built manifests should get it too? The Maven-built manifests have the old style Specification-Version , including a timestamp, e.g. 5.0.0.2013.08.16.12.36.14 , where the Ant-built manifests just have the version, e.g. 5.0-SNAPSHOT . The latter is actually syntactically incorrect, since the value should only have digits and period. I've left it as the old style in the Maven version, since it's not a syntax error, and since the Maven versions will only ever be produced by end-users - all snapshot and release Maven artifacts are produced by Ant. I've committed to trunk and branch_4x. Thanks Artem!
        Hide
        Artem Karpenko added a comment -

        Great, thank you Steve, I was glad to help.

        Show
        Artem Karpenko added a comment - Great, thank you Steve, I was glad to help.
        Hide
        Adrien Grand added a comment -

        4.5 release -> bulk close

        Show
        Adrien Grand added a comment - 4.5 release -> bulk close

          People

          • Assignee:
            Steve Rowe
            Reporter:
            Artem Karpenko
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development