Uploaded image for project: 'IvyDE'
  1. IvyDE
  2. IVYDE-210

Dependencies marked for export into WEB-INF/lib should be fully exported regardles of the ordering in Java Build Path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • classpath container
    • None
    • latest ivy from trunk, eclipse 3.5, WTP 3.1

    Description

      Create dynamic web project and create ivy configuration.

      This is a relevant part of ivy.xml that can be used to demonstrate bug.

          <configurations>
              <conf name="default" />
              <conf name="compile" />
              <conf name="runtime" />
              <conf name="test" />
              <conf name="sources" />
          </configurations>
      
          <dependencies>
      
              <dependency org="javax.jms" name="jms" rev="1.1" conf="compile->default" />
              
              <dependency org="org.springframework" name="spring-aop" rev="2.5.6" conf="runtime->default" />
      
              <dependency org="org.springframework" name="spring-jms" rev="2.5.6" conf="runtime->default" />
              <dependency org="org.springframework" name="spring-web" rev="2.5.6" conf="runtime->default" />
              <dependency org="org.springframework" name="spring-webmvc" rev="2.5.6" conf="runtime->default" />
              <dependency org="org.aspectj" name="aspectjrt" rev="1.6.5" conf="runtime->default" />
              <dependency org="org.aspectj" name="aspectjweaver" rev="1.6.5" conf="runtime->default" />
              <dependency org="org.springframework" name="spring-context-support" rev="2.5.6" conf="runtime->default" />
              <dependency org="org.springframework" name="spring-test" rev="2.5.6" conf="test->default" />
              <dependency org="org.springframework" name="spring-jdbc" rev="2.5.6" conf="test,compile->default" />
              <dependency org="commons-fileupload" name="commons-fileupload" rev="1.2.1" conf="test,compile,runtime->default" />
              <dependency org="commons-io" name="commons-io" rev="1.4" conf="test,compile,runtime->default" />
              <dependency org="dom4j" name="dom4j" rev="1.6.1" conf="test,compile,runtime->default" />
              <dependency org="javax.servlet" name="jstl" rev="1.2" conf="compile->default" />
      
              <exclude org="xml-apis" module="xml-apis" />
      
              <override org="junit" module="junit" rev="4.5" />
              <override org="org.slf4j" module="slf4j-api" rev="1.5.6" />
      
          </dependencies>
      

      Scenario 1

      Steps

      • go to the Java Build Path and reorder libraries (last tab under Java Build Path) in the following order:
      1. source folder
      2. JRE System library
      3. Apache Tomcat
      4. runtime
      5. compile
      • under J2EE Module dependecies we mark ivy.xml [compile] for export
      • we can see that compile classpath container contains libraries like aopalliance, commons-fileupload, etc. (more than 4 jars)
      • publish direclty to the tomcat installation (Do not use workspace as server location. You have to setup server path and deploy path.)

      Result

      • under TOMCAT_HOME\webapps\APPNAME\WEB-INF\lib we get:
      • jms-1.1.jar
      • jstl-1.2.jar
      • spring-jdbc-2.5.6.jar

      Scenario 2

      Steps

      • go to the Java Build Path and reorder libraries such that compile comes before runtime:
      1. source folder
      2. JRE System library
      3. Apache Tomcat
      4. compile
      5. runtime
      • publish project to tomcat installation

      Result

      • under {TOMCAT_HOME}

        \webapps{APPNAME}\WEB-INF\lib we get all of the libraries that we can see under compile configuration in ivy classpath container

      The first scenario demonstrates the bug and should be fixed:

      • dependencies marked for J2EE export into WEB-INF/lib should be fully exported in all circumstances and Java Build Path ordering should not have influence on it

      Attachments

        Activity

          People

            Unassigned Unassigned
            iloncar Ivica Loncar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: