4 Replies Latest reply on Apr 22, 2015 4:38 AM by hd0815

    JBoss Tools publishing unit tests instead of classes

    hd0815

      Hi,

       

      I'm facing a really weird situation in my Eclipse and I cannot find out what's wrong.

      Since some days JBoss Tools publishes the unit cases (as .java-Files) to the WildFly-Server instead of the compiled .class-Files.

       

      I have a Maven project (a) deployed to a WildFly 8.2.0.Final via JBoss Tools. This project has a dependency to another Maven project (b) in my workspace. Instead of publishing the classes from project b into the WEB-INF/lib folder JBoss Tools publishes the Java files from the unit cases from project b.

       

      When I run Maven and let it build project a and b, everything is compiled fine and the war archive is build correctly. If I deploy this war archive to WildFly, the AS will deploy everything without problems.

       

      I tried updating the Maven project via Maven --> Update Project, I refreshed the projects in workspace, I cleaned the projects and built them again, I updated Eclipse and JBoss Tools, I even updated the JDK. My colleagues use the same development environment and publish the same projects and do not face this problem. Now I honestly don't know what else can be done to make my workspace work again.

       

      Since Maven builds both project without any problems and WildyFly deploys the so built project also without any problems, I bet the problem is somewhere in JBoss Tools.

       

      My Setup:

      Eclipse 4.4.2 (latest updates)

      JBoss Tool for Luna (latest updates)

      WildFly 8.2.0.Final

       

      Any help would be appreciated.

        • 1. Re: JBoss Tools publishing unit tests instead of classes
          maxandersen

          When we see these issues we normally see it if a user have run 'mvn eclipse:eclipse' which will for sure mess things up in WTP land.

           

          Can you confirm you have *not* used mvn eclipse:eclipse ?

           

          If you can please provide some steps for us to reproduce the issue.

           

          if you have used mvn eclipse:eclipse then please delete the .project and .classpath files and use Import Maven project instead please.

           

          Thanks!

          • 2. Re: JBoss Tools publishing unit tests instead of classes
            hd0815

            Hello Max,

             

            thanks for your reply.

             

            I can confirm that I haven't used mvn eclipse:eclipse, I imported the projects using "Import existing Maven projects".

             

            I think I can't describe any way to reproduce this problem because those projects worked fine for me two weeks ago. I haven't changed anything project specific in the projects in those two weeks what might explain those problems.

             

            I also found out, that in the server tab where my WildFly configuration is listed, the problematic project b isn't shown as a dependent project to the war file of project a, but nevertheless it's published. I deleted the server configuration and recreated it, but still project b isn't shown as dependent project to project a.

             

            Is there a possibility to reset/delete any saved data by JBoss Tools if existent? Maybe then the plugin can search for the correct deployments again?

            • 3. Re: JBoss Tools publishing unit tests instead of classes
              rob.stryker

              > I also found out, that in the server tab where my WildFly configuration is listed, the problematic project b isn't shown as a dependent project to the war file of project a, but nevertheless it's published. I deleted the server configuration and recreated it, but still project b isn't shown as dependent project to project a

               

              Can you show me a screenshot of that? It's not clear exactly what you mean.

               

              If one project isn't being shown as a child project of the other, this usually indicates some type of configuration error in the projects. Almost always, really.  Would it be possible for you to send a stub of your workspace / projects, with 99% of source code removed? The things we're looking for are project structure, .settings folder of your two projects, the manifests, pom, etc.   This can help us investigate and see if anything is clearly wrong and needs fixing.

              • 4. Re: JBoss Tools publishing unit tests instead of classes
                hd0815

                > Can you show me a screenshot of that? It's not clear exactly what you mean.

                 

                I uploaded a screenshot. This is a view from the wizard Add and Remove when you right click on the WildFly server in the servers tab and chose Add and Remove: Add and Remove... 2015-04-22 10.29.51.png

                 

                I'll try to add a file with the project setup today.