Skip to content

Gradle Embedded Resolver does not include main sources correctly #25

Description

@xjusko

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions