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

Investigate on runtime scope in pom.xml(main) in IGB

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Sprint:
      Summer 2019 Sprint 11

      Attachments

        Activity

        Hide
        svallapu Sai Charan Reddy Vallapureddy added a comment - - edited

        Classpaths: There are three different classpaths,

        1.Runtime classpath: This classpath contains the classes that are necessary during runtime. It means it is passed to the java executable.
        2.Compile-time classpath: Contains the classes that are necessary to compile the project. javac uses these classes.
        3.Test classpath: This classpath is also used during runtime, but it is only used to run tests.

        Some important scopes in maven
        1. compile scope: It is a default scope if none is mentioned. These dependencies will be present in all the classpaths.
        2. provided scope: It will expect JDK or some container(In our case OSGI) to provide dependencies. These dependencies are present in compile and test classpaths.
        3. runtime scope: These dependencies are used in execution but not required during compile-time. These dependencies are present in runtime and test classpaths but not in compile classpath.
        (NOTE: Many people assume that if they successfully compiled the application with a given jar file present, it means that the application will run fine. But it doesn’t – you need the same jars that you used to compile your application to be present on your runtime classpath as well. Well, not necessarily all of them, and not necessarily only them.)
        Source: https://techblog.bozho.net/runtime-classpath-vs-compile-time-classpath/
        4. test scope: These dependencies are used for the test compilation and execution phase.

        Ann Loraine
        Reason for dependencies having runtime scope in the main pom.xml (IGB):
        1. Firstly, these dependencies are not required during runtime in Main maven project.
        2. All the dependencies are configured as a runtime just to copy these dependencies in the runtime classpath.
        3. In our case runtime classpath is igb_exe.jar
        4. JAR's that are present in igb_exe.jar are loaded in OSGI container.
        5. (IMPORTANT) If we don't give runtime scope to dependencies in the main pom.xml then that JAR won't be added in igb_exe.jar. Hence it will not be loaded in OSGi container which results in errors.
        6. There are very few dependencies (affymetrix-common,org.apache.felix.main, slf4j-api, logback-core) with compile scope. These dependencies are required to compile main project java programs(Main.java, OSGiHandler.java)

        Show
        svallapu Sai Charan Reddy Vallapureddy added a comment - - edited Classpaths: There are three different classpaths, 1.Runtime classpath: This classpath contains the classes that are necessary during runtime. It means it is passed to the java executable. 2.Compile-time classpath: Contains the classes that are necessary to compile the project. javac uses these classes. 3.Test classpath: This classpath is also used during runtime, but it is only used to run tests. Some important scopes in maven 1. compile scope: It is a default scope if none is mentioned. These dependencies will be present in all the classpaths. 2. provided scope: It will expect JDK or some container(In our case OSGI) to provide dependencies. These dependencies are present in compile and test classpaths. 3. runtime scope: These dependencies are used in execution but not required during compile-time. These dependencies are present in runtime and test classpaths but not in compile classpath. (NOTE: Many people assume that if they successfully compiled the application with a given jar file present, it means that the application will run fine. But it doesn’t – you need the same jars that you used to compile your application to be present on your runtime classpath as well. Well, not necessarily all of them, and not necessarily only them.) Source: https://techblog.bozho.net/runtime-classpath-vs-compile-time-classpath/ 4. test scope: These dependencies are used for the test compilation and execution phase. Ann Loraine Reason for dependencies having runtime scope in the main pom.xml (IGB): 1. Firstly, these dependencies are not required during runtime in Main maven project. 2. All the dependencies are configured as a runtime just to copy these dependencies in the runtime classpath. 3. In our case runtime classpath is igb_exe.jar 4. JAR's that are present in igb_exe.jar are loaded in OSGI container. 5. (IMPORTANT) If we don't give runtime scope to dependencies in the main pom.xml then that JAR won't be added in igb_exe.jar. Hence it will not be loaded in OSGi container which results in errors. 6. There are very few dependencies (affymetrix-common,org.apache.felix.main, slf4j-api, logback-core) with compile scope. These dependencies are required to compile main project java programs(Main.java, OSGiHandler.java)

          People

          • Assignee:
            svallapu Sai Charan Reddy Vallapureddy
            Reporter:
            svallapu Sai Charan Reddy Vallapureddy
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: