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

src/test/java folders get added to Deployment Assembly breaking development

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 4.30.x
    • 4.21.3.Final
    • maven
    • None
    • -
    • ---

    Description

      This may not be a JBIDE problem, so if you have a better place to file this issue, please let me know. It has been a hair pulling experience to discover how to articulate the problem correctly and has been bugging us for over a year or more. Apologies if any of the below comes across as harsh, it is just frustration at the problem, not you.

      Sometimes, but frequent enough that we built in mitigations to detect this error, a plugin decides to add src/test/java folders to the Deployment Archive setting. We didn't know this happened, we only noticed that Wildfly stopped deploying our application and get strange errors because for example Arquillian test resources ended up on the classpath of a normal (jakarta ee) application.

      Until now, the only remedy we had was to delete all modules from Eclipse and re-import the modules to be able to deploy the application again. This is far from ideal, and has caused many a team mate to switch IDEs.

      This time I was the victim of the issue, due to a testing persistence.xml ending up in the deployment. I was going through the project settings and noticed the Deployment Assembly, and lo and behold: it has the src/test/java folder added to the deployment.

      This should not happen. This should never happen. This has caused so many lost hours of development time at our project, that I want to reiterate: THIS SHOULD NEVER HAPPEN.

      I don't know what caused this issue, and I don't know if the JBIDE is the culprit, but since it is related to Jakarta EE development, and we installed the JBIDE tools precisely for development with Wildfly, it seems logical somewhere in the plugin chain of JBIDE this goes wrong.

      For me: it happened when I rebased my branch with main, and Eclipse tried to download dependencies, but kept giving errors for downloading them (downloading and sources gave popup errors). The downloads worked perfectly from a Maven build started from the commandline, so 🤷 I don't know what made Eclipse not to be able to download stuff. After restarting Eclipse and getting my workspace to compile again, the Deployment Assembly apparently was broken, whereas I could deploy the application perfectly before the rebase.

      I mention the downloading because of SWITCHYARD-1836, where this exact problem was reported and it mentioned something about failed downloads.

      Another issue I found on the internets, having the same problem:

      I've attached two screen shots with the deployment assembly settings. The application starts normally when I remove these two lines.

      Attachments

        1. image.png
          image.png
          186 kB
        2. image (1).png
          image (1).png
          72 kB
        3. Screenshot from 2022-05-25 13-45-58.png
          Screenshot from 2022-05-25 13-45-58.png
          81 kB
        4. Screenshot from 2022-05-25 13-45-58-1.png
          Screenshot from 2022-05-25 13-45-58-1.png
          81 kB

        Activity

          People

            rstryker@redhat.com Robert Stryker
            martijn.dashorst@topicus.nl Martijn Dashorst (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: