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

Investigate: Should we include IGB bundle source code in maven-releases

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      Spring 3 : 3 Feb to 14 Feb, 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, Spring 7 : 13 Apr to 24 Apr

      Description

      In Netbeans IDE, one can right-click a class name defined in an IGB bundle and choose Navigate -> Go To Source.

      However, the source code does not appear to be available in this view.

      Investigate whether this can be fixed by including source code with the IGB bundles released to maven-releases.

        Attachments

          Issue Links

            Activity

            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Suggestion for how to do this:

            The Genoviz SDK POM.xml contains directive to include *.java files in the jar file:
            snip
            <build>
            <resources>
            <resource>
            <directory>src/main/java</directory>
            <includes>
            <include>*/.java</include>
            </includes>
            </resource>
            <resource>
            <directory>src/main/resources</directory>
            </resource>
            </resources>
            snip

            We could include the above, or something similar, in the release to nexus profile in the top-level parent POM of the Integrated Genome Browser project. We probably want the jar files released to Nexus to contain the source code, but we do not want the jar files packaged with the installer to include the source code.

            Show
            ann.loraine Ann Loraine added a comment - - edited Suggestion for how to do this: The Genoviz SDK POM.xml contains directive to include *.java files in the jar file: snip <build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>* / .java</include> </includes> </resource> <resource> <directory>src/main/resources</directory> </resource> </resources> snip We could include the above, or something similar, in the release to nexus profile in the top-level parent POM of the Integrated Genome Browser project. We probably want the jar files released to Nexus to contain the source code, but we do not want the jar files packaged with the installer to include the source code.
            Hide
            pooja.nikhare Pooja Nikhare (Inactive) added a comment -

            This can be done in 3 ways. By adding build properties in maven profile - release-to-nexus.bioviz.org
            1. add resources
            <resources>
            <resource>
            <directory>src/main/java</directory>
            <includes>
            <include>*/.java</include>
            </includes>
            </resource>
            </resources>
            Command : mvn -P release-to-nexus.bioviz.org clean
            creates igb_exe.jar. On extracting .java files can be found with .class files

            2. Maven source plugin
            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.0</version>
            <inherited>true</inherited>
            <executions>
            <execution>
            <id>attach-sources</id>
            <goals>
            <goal>jar-no-fork</goal>
            </goals>
            </execution>
            </executions>
            </plugin>
            command : mvn -P release-to-nexus.bioviz.org clean source:aggregate
            creates igb-project-source.jar inside target folder
            3. maven assembly plugin
            https://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-source-inclusion-simple.html

            Show
            pooja.nikhare Pooja Nikhare (Inactive) added a comment - This can be done in 3 ways. By adding build properties in maven profile - release-to-nexus.bioviz.org 1. add resources <resources> <resource> <directory>src/main/java</directory> <includes> <include>* / .java</include> </includes> </resource> </resources> Command : mvn -P release-to-nexus.bioviz.org clean creates igb_exe.jar. On extracting .java files can be found with .class files 2. Maven source plugin <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>3.2.0</version> <inherited>true</inherited> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> command : mvn -P release-to-nexus.bioviz.org clean source:aggregate creates igb-project-source.jar inside target folder 3. maven assembly plugin https://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-source-inclusion-simple.html
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            To test:

            • Build using the new method (to package java files with the jar)
            • Run mvn clean install with a specific profile to force the bundles to be added to your local .m2 (maven) repository
            • Then, check that when you use "view source" in Netbeans, you can see the actual source brought in from the jar file

            Note: We do NOT want to package the java files with the installer released to users.

            Show
            ann.loraine Ann Loraine added a comment - - edited To test: Build using the new method (to package java files with the jar) Run mvn clean install with a specific profile to force the bundles to be added to your local .m2 (maven) repository Then, check that when you use "view source" in Netbeans, you can see the actual source brought in from the jar file Note: We do NOT want to package the java files with the installer released to users.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited

            Prof. [~aloraine] I have tried the first and second methods mentioned above. The second method seems to include the source code as a separate jar called sources [for example, for affymetrix-common, one more jar will be included in the target folder called 'affymetrix-common-9.1.4-sources']. The java files are not packaged in the installer released to users.
            However, I haven't been able to find a specific profile in maven to force the bundles to be updated in .m2, I am working on finding it. Also, I am not sure I completely understand what is the requirement there. Can you please elaborate it to me so that it helps me understand if what I am working on is right? Also, can you please check if this is what we want? I have pushed the above changes to my fork on a new branch. The link is as follows.
            https://bitbucket.org/skulka2710/shamika_igb/branch/IGBF-2235#diff

            For now, I have commented the test files for 'das' since I was facing build failures. Also, I noticed there is a conflict in one of the test class and I shall fix it later.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited Prof. [~aloraine] I have tried the first and second methods mentioned above. The second method seems to include the source code as a separate jar called sources [for example, for affymetrix-common, one more jar will be included in the target folder called 'affymetrix-common-9.1.4-sources'] . The java files are not packaged in the installer released to users. However, I haven't been able to find a specific profile in maven to force the bundles to be updated in .m2, I am working on finding it. Also, I am not sure I completely understand what is the requirement there. Can you please elaborate it to me so that it helps me understand if what I am working on is right? Also, can you please check if this is what we want? I have pushed the above changes to my fork on a new branch. The link is as follows. https://bitbucket.org/skulka2710/shamika_igb/branch/IGBF-2235#diff For now, I have commented the test files for 'das' since I was facing build failures. Also, I noticed there is a conflict in one of the test class and I shall fix it later.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            We made some pretty good progress here but are not sure how to enable developers to see the source code for IGB bundles. Moving to the backlog for us to work on later.

            Thank you Pooja Nikhare and Shamika Gajanan Kulkarni for the progress made thus far!

            Show
            ann.loraine Ann Loraine added a comment - - edited We made some pretty good progress here but are not sure how to enable developers to see the source code for IGB bundles. Moving to the backlog for us to work on later. Thank you Pooja Nikhare and Shamika Gajanan Kulkarni for the progress made thus far!

              People

              • Assignee:
                shamika Shamika Gajanan Kulkarni (Inactive)
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: