Uploaded image for project: 'ShrinkWrap Resolvers'
  1. ShrinkWrap Resolvers
  2. SHRINKRES-355

Gradle Embedded Resolver does not include main sources correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • None
    • gradle
    • None

      The version is 3.3.3, but it's not possible to select.

      Using EmbeddedGradleImporter, the main sources are not packaged correctly in the resulting war. Using the example project attached, the resulting war looks like:

      +---META-INF
      |       MANIFEST.MF
      |
      +---testArq
      |       Service.class
      |
      \---WEB-INF
          |   beans.xml
          |
          +---classes
          |   \---testArq
          |           ServiceTest.class
          |
          \---lib
                  arquillian-core.jar
                  arquillian-jakarta-servlet-protocol.jar
                  arquillian-junit5.jar
                  arquillian-testenricher-cdi-jakarta.jar
                  arquillian-testenricher-ejb-jakarta.jar
                  arquillian-testenricher-initialcontext.jar
                  arquillian-testenricher-resource-jakarta.jar
                  wildfly-common-testencricher.jar
      

      The Service.class file is included in the top level, not inside WEB-INF. This causes the class to not be found. The result with Arquillian is that tests that should fail end up passing. In the supplied test class, a dummy test assertTrue(false); passes.

      If one adds the file manually: .addClass(Service.class); then the war is created correctly and the test fails correctly.

      Please not that when running the test project locally, the arquillian.xml needs to be changed to point to an existing WF installation.

              Unassigned Unassigned
              omega09 N L
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: