pbarker
07/28/2024, 2:15 PMJames Fredley
07/28/2024, 4:29 PMbuild.gradle file?
application {
mainClass.set("com.yourpackage.Application")
}
springBoot {
mainClass.set("com.yourpackage.Application")
}pbarker
07/28/2024, 8:08 PMspringBoot {
mainClassName = "sourcingpro.Application"
}
I'll try your example.pbarker
07/28/2024, 8:11 PMCould not get unknown property 'mainClass' for object of type org.springframework.boot.gradle.dsl.SpringBootExtension.James Fredley
07/28/2024, 9:13 PMmainClassName was deprecated in favor of mainClass in Spring Boot 2.4.0 and was scheduled for removal in 2.6.0. So you are on something pre 2.6.
I'd experiment with the application gradle plugin config. It also changed from mainClassName
to mainClass at some point.
that's my last guess
application {
mainClassName = "sourcingpro.Application"
}
or
application {
mainClass = "sourcingpro.Application"
}pbarker
07/28/2024, 10:02 PMCould not find method application()
The classNotFound error I'm getting is on the server, as it's unpacking the build and attempting to run it. The config file for the server (app.yaml) is specifying the entrypoint class but it can't find it so I'm wondering if it's something to do with the .war file not being populated correctly.
It looks like AppEngine, in the move from Java8 to Java11 runtimes now expects the deployment to have its own Jetty server (rather than provide one in the environment) so there are rather more moving parts to this than I thought.
What do most folks use for deploying their projects? GCP? AWS? Complete containers, PaaS?
Curious...James Fredley
07/29/2024, 2:52 PMgrails prod package or gradle -Dgrails.env=prod assemble
AWS has an option with Tomcat or without. I use the one without and it executes the app with java -jar admin.war
https://docs.grails.org/6.2.0/guide/single.html#_runnable_war_or_jar_file
I also have a custom gradle task to put the war in a zip file with some aws specific config, but that is not required for it to run the war.pbarker
07/29/2024, 3:30 PM.war and the main() class. I'm missing some key instruction somewhere...pbarker
07/30/2024, 7:57 AM./gradlew bootJar appengineStage (I'm using Atlassian Pipelines to build, hence apengineStage instead of appengineDeploy and there are more steps after that).
Also getting the right 'entrypoint' command in the app.yaml file:
runtime: java
env: flex
runtime_config:
operating_system: "ubuntu18"
runtime_version: "11"
entrypoint: 'java -jar -Dserver.port=80 sourcingpro-0.1.jar --port=80'
I also had problems getting it to start on port 80, hence the i'm-not-taking-any-chances-with-the-port approach.