Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-5691

Exported files don't honor the module assembly settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.2.0.M1
    • 3.1.0.CR1
    • server
    • None

      I'm investigating ways to implement SAR support in m2eclipse (for selfish motivations I agree). See https://issues.sonatype.org/browse/MNGECLIPSE-1984.
      A SAR project would need to export dependencies in a lib folder, inside the archive.

      During my investigation, I tried to use the JBT 3.1.CR1 module assembly page, which would, from my understanding, allow me to reach the desired effect.
      So I've created sample maven-less projects :
      -sarproject : has a dependency to JUNIT_HOME\junit.jar in the module assembly page. The resulting org.eclipse.wst.common.component contains :

      <project-modules id="moduleCoreId" project-version="1.5.0">
          <wb-module deploy-name="sarproject">
              <wb-resource deploy-path="/" source-path="/src"/>
              <dependent-module archiveName="junit.jar" deploy-path="/" handle="module:/classpath/var/JUNIT_HOME/junit.jar">
                  <dependency-type>uses</dependency-type>
              </dependent-module>
          </wb-module>
      </project-modules>
      

      -earproject : needed so sarproject can be a Module project (which totally sucks). I've manually tweaked org.eclipse.wst.common.component so sarproject will have the .sar extension when deployed. Here is the end result :

      <project-modules id="moduleCoreId" project-version="1.5.0">
          <wb-module deploy-name="earproject">
              <wb-resource deploy-path="/" source-path="/EarContent"/>
              <dependent-module archiveName="sarproject.sar" deploy-path="/" handle="module:/resource/sarproject/sarproject">
                  <dependency-type>uses</dependency-type>
              </dependent-module>
          </wb-module>
      </project-modules>
      

      Now, when exporting earproject.ear, there's no junit.jar to be found in sarproject.sar (not expected) nor in the ear (expected).
      When using export module on sarproject, the resulting file doesn't contain junit.jar either.

      This looks like a bug I've opened at eclipse's bugzilla for Connector projects : https://bugs.eclipse.org/bugs/show_bug.cgi?id=298735

      The module assembly page looks very promising in theory, as it would allow support for any kind of archives (sar, har ...)
      but from what I understand it's only usable for ear and war projects.

      This bug should probably be opened at eclipse.org or is totally a duplicate of #298735 (you tell me),
      but I think the module assembly page should not be visible on unsupported projects.

      regards,

      Fred Bricon

            rob.stryker Rob Stryker (Inactive)
            fbricon@redhat.com Fred Bricon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: