File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,9 +15,15 @@ tasks.named<ShadowJar>("shadowJar") {
1515 archiveClassifier.set(" " )
1616 mergeServiceFiles()
1717
18- // Use the standard main class convention for smoke test apps
18+ // Set main class - can be overridden by individual projects via mainClassName property
1919 manifest {
20- attributes[" Main-Class" ] = " com.microsoft.applicationinsights.smoketestapp.SpringBootApp"
20+ val mainClass = if (project.hasProperty(" mainClassName" )) {
21+ project.property(" mainClassName" ) as String
22+ } else {
23+ // Default main class for most smoke test apps
24+ " com.microsoft.applicationinsights.smoketestapp.SpringBootApp"
25+ }
26+ attributes[" Main-Class" ] = mainClass
2127 }
2228}
2329
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ plugins {
22 id(" ai.smoke-test-jar" )
33}
44
5+ // Override default main class
6+ ext.set(" mainClassName" , " com.microsoft.applicationinsights.smoketestapp.JettyNativeHandlerApp" )
7+
58dependencies {
69 implementation(" org.springframework.boot:spring-boot-starter:2.5.12" )
710
Original file line number Diff line number Diff line change 11plugins {
22 id(" ai.smoke-test-jar" )
33}
4+
5+ // Override default main class
6+ ext.set(" mainClassName" , " com.microsoft.applicationinsights.smoketestapp.App" )
You can’t perform that action at this time.
0 commit comments