sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

TestJars support

Open BoykoAlex opened this issue 1 year ago • 1 comments

The idea is to make the app having TestJars on the classpath launched via the IDE aware of GAVs, classpath and main classes of projects residing in the same workspace. Thus TestJar support won't attempt to load these projects from maven but instead use workspace versions of these. See https://github.com/spring-projects-experimental/spring-boot-testjars/issues/15 for more details

BoykoAlex avatar Feb 23 '24 15:02 BoykoAlex

The plan is the following:

  1. Launch creation is initiated on the IDE client side.
  2. IDE client executes a command on the LS side to receive a list of "Executable" Boot Projects where ExecutableBootProject looks like:
interface ExecutableBootProject {
  name: string;
  uri: string;
  bootAppClass: string;
  classpath: string[]
  gav: string; // <groupId>:<artifactId>:<version>
}

The data is available on the LS in memory hence should be rather fast to arrive 3. Client saves this data in property files somewhere (temp folder? workspace folder?) 4. Updates launch with TestJar needed environment variables. (Would be nice if we could avoid saving into files... seems somewhat redundant. Perhaps it can be packed into 2 environment variables...)

BoykoAlex avatar Feb 27 '24 04:02 BoykoAlex

TestJars support is for maven projects only so far: 52dd4d2ff51bdceae7045b578a6fe14e0f0121c3

BoykoAlex avatar Mar 01 '24 23:03 BoykoAlex

Preference setting went in with d3af0a32f90dd90a5e529bf0881273c0d46ef37f. Gradle projects GAV and hence the TestJars support to be delivered with #1201 in 4.22.1. The rest is done for 4.22.0

BoykoAlex avatar Mar 05 '24 00:03 BoykoAlex