Open JamesPeters98 opened 3 years ago
I'm not 100% sure what the use case is, but I have used the thin launcher as a dependency so I know it is possible. There are some open issues about making it easier (e.g. #92, #43).
Is the launcher still useful/relevant for a spring cloud function project which already runs with spring boot 3.x ? Is the launcher getting part of spring boot 3.x? What is the difference compared to using maven-shade-plugin ?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<finalName>demo</finalName>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<!-- Suppress module-info.class warning -->
<exclude>module-info.class</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
I'm not sure that question is relevant to this issue.
Yes, its not ideal here :-). I created issues more on the topic "spring cloud function" https://github.com/spring-cloud/spring-cloud-function/issues/938
Is it possible to use a Spring Boot project using the Thin Launcher as a dependency on another project?
I.e It would be useful if the Maven plugin generated a class that can be called to load all the dependencies into the ClassLoader of the dependant project.
Currently this doesn't seem possible, I have tried using reflection to start the ThinJarWrapper but that results in the ThinJarLauncher not being able to find the Main class:
The ideal situation would be to be able to call a class that would load everything into the classpath without actually launching the main method of the Spring Boot application - since that can now be handled by the dependant project.