spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Tests for spring-boot-gradle-plugin cannot be run in Eclipse due to missing spring-boot-loader.jar

Open philwebb opened this issue 3 years ago • 1 comments

Running spring-boot-gradle-plugin tests with Eclipse fails out of the box because the spring-boot-loader.jar resource is missing. If you update spring-boot-loader-tools to include build/generated-resources/main as a source folder then the tests pass.

philwebb avatar Oct 06 '22 22:10 philwebb

This has been bugging me too but I'm not totally sure what's going on.

If you update spring-boot-loader-tools to include build/generated-resources/main as a source folder

That's what this bit of the build.gradle for loader tools is already supposed to do:

sourceSets {
	main {
		output.dir(generatedResources, builtBy: [layerToolsJar, reproducibleLoaderJar])
	}
}

I've tried configuring it as an additional source dir rather than an output dir but it doesn't appear to work in Eclipse. On the command line it results in the layer tools and loader jars being packaged in the source jar which we don't want either.

wilkinsona avatar Oct 07 '22 08:10 wilkinsona