I’m asking about something that I haven’t tried. I noticed a small limitation of Maven-based projects in Eclipse, and I was wondering if Gradle projects with Buildship would have the same issue. I won’t feel any less for Buildship if it does , but it would be good to know if this works better in Gradle/Buildship.
If I have a Maven project with both unit tests and PaxExam integration tests, when I run a unit test it will have the PaxExam dependencies in the classpath. For me, this doesn’t cause things to break, but there’s a minor annoyance with configuring debug levels, in that it ends up consulting a pax artifact to determine whether debug logging is enabled, even though I’m not using pax in the test.
I can configure Maven Surefire to exclude those dependencies, so that when the Maven build runs, it doesn’t get confused about logging levels, but Eclipse m2e doesn’t have this level of integration, so running the unit test in eclipse still has pax artifacts in the classpath, resulting in annoying logging.
In a Buildship project, would “Run As Unit Test” in Eclipse have more intelligence, assuming my build.gradle had logic to ensure that unit tests only have unit test dependencies?