Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2264

Improve BioJava App POM.xml to only include necessary jars/classes

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      1.5
    • Sprint:
      Spring 3 : 17 Feb to 28 Feb, Spring 4 : 2 Mar to 13 Mar, Spring 5 : 16 Mar to 27 Mar, Spring 6 : 30 Mar to Apr 10

      Description

      Unpacking the jar finds there are many things getting included that probably are not needed, such as jars for libraries that IGB already includes:

      • guava-19.0.jar
      • log4j-api-2.5.jar
      • log4j-core-2.5.jar
      • log4j-slf4j-impl-2.5.jar

      There also appear to be some transitive dependencies that might not be needed during operation of the App.

      Here are the jar conrtents:

      $ jar xvf biojava-igb-app-0.0.1.jar
      inflated: META-INF/MANIFEST.MF
      created: META-INF/
      created: META-INF/maven/
      created: META-INF/maven/igb-app-examples/
      created: META-INF/maven/igb-app-examples/biojava-igb-app/
      inflated: META-INF/maven/igb-app-examples/biojava-igb-app/pom.properties
      inflated: META-INF/maven/igb-app-examples/biojava-igb-app/pom.xml
      created: OSGI-INF/
      inflated: OSGI-INF/org.lorainelab.igb.sequencereader.TwoBitReaderApp.xml
      inflated: biojava-alignment-4.2.8.jar
      inflated: biojava-core-4.2.8.jar
      inflated: biojava-genome-4.2.8.jar
      inflated: biojava-phylo-4.2.8.jar
      inflated: forester-1.038.jar
      inflated: guava-19.0.jar
      inflated: log4j-api-2.5.jar
      inflated: log4j-core-2.5.jar
      inflated: log4j-slf4j-impl-2.5.jar
      inflated: logo.png
      created: org/
      created: org/biojava/
      created: org/biojava/nbio/
      created: org/biojava/nbio/genome/
      created: org/biojava/nbio/genome/parsers/
      created: org/biojava/nbio/genome/parsers/twobit/
      inflated: org/biojava/nbio/genome/parsers/twobit/TwoBitParser.class
      created: org/lorainelab/
      created: org/lorainelab/igb/
      created: org/lorainelab/igb/sequencereader/
      inflated: org/lorainelab/igb/sequencereader/TwoBitFileSummarizer.class
      inflated: org/lorainelab/igb/sequencereader/TwoBitReaderApp.class
      inflated: repository.xml
      inflated: slf4j-api-1.7.14.jar
      inflated: summarize.png

      For this task, investigate maven-bundle-plugin configuration to ensure that only jars that are required by the App to run are included in the Bundle.

        Attachments

        1. 2-bit reader 1.JPG
          2-bit reader 1.JPG
          341 kB
        2. 2-bit reader 2.JPG
          2-bit reader 2.JPG
          205 kB
        3. After_making_embed_transitive_false.JPG
          After_making_embed_transitive_false.JPG
          170 kB
        4. manifest - 1.JPG
          manifest - 1.JPG
          655 kB
        5. manifest - 2.JPG
          manifest - 2.JPG
          511 kB
        6. Original_jar.JPG
          Original_jar.JPG
          219 kB

          Issue Links

            Activity

            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            Yes, I am looking into this currently. Thank you for your insights.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Yes, I am looking into this currently. Thank you for your insights.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            Prof. [~aloraine], today I tried implementing the <Embed-Dependency> tag in the following manner.
            <Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=!guava|slf4j-api|log4j-slf4j-impl|log4j-api|log4j-core</Embed-Dependency>
            This excludes the jars for which the artifactId is mentioned. The bundle runs properly except for the NullPointerExceptions occurring otherwise too.
            I checked for files which contained no 2bit data but were stored with a .2bit extension. Your point was right, it does require the other jars to display the error message. Using the above <Embed-Dependency> the message was displayed properly.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Prof. [~aloraine] , today I tried implementing the <Embed-Dependency> tag in the following manner. <Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=!guava|slf4j-api|log4j-slf4j-impl|log4j-api|log4j-core</Embed-Dependency> This excludes the jars for which the artifactId is mentioned. The bundle runs properly except for the NullPointerExceptions occurring otherwise too. I checked for files which contained no 2bit data but were stored with a .2bit extension. Your point was right, it does require the other jars to display the error message. Using the above <Embed-Dependency> the message was displayed properly.
            Hide
            ann.loraine Ann Loraine added a comment -

            Ok - I think it is ready for a PR. Thank you for all your work on this Shamika Gajanan Kulkarni

            Show
            ann.loraine Ann Loraine added a comment - Ok - I think it is ready for a PR. Thank you for all your work on this Shamika Gajanan Kulkarni
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited

            I enjoyed working on it Prof. [~aloraine]. Thank you for appreciating it.
            I have submitted the PR.
            https://bitbucket.org/lorainelab/2bit-reader/pull-requests/3/igbf-2264-modify-embed-dependency-tag-to/diff

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited I enjoyed working on it Prof. [~aloraine] . Thank you for appreciating it. I have submitted the PR. https://bitbucket.org/lorainelab/2bit-reader/pull-requests/3/igbf-2264-modify-embed-dependency-tag-to/diff
            Hide
            ann.loraine Ann Loraine added a comment -

            Merged, ready for testing.

            Show
            ann.loraine Ann Loraine added a comment - Merged, ready for testing.

              People

              • Assignee:
                Unassigned
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: