You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I start with the SpringBoot pet clinic sample, e.g. something like (spring-projects/spring-petclinic@082cfb4 - though I didn't verify this exact commit would recreate the problem:
Caused by: org.apache.maven.plugin.MojoExecutionException: C:\ydosppa\apps\spring-petclinic\target\spring-petclinic-3.2.0-SNAPSHOT.war file is not an executable archive. The repackage goal of the spring-boot-maven-plugin must be configured to run first in order to create the required executable archive.
at io.openliberty.tools.maven.applications.DeployMojo.installSpringBootApp (DeployMojo.java:130)
at io.openliberty.tools.maven.applications.DeployMojo.doDeploy (DeployMojo.java:93)
at io.openliberty.tools.maven.applications.DeployMojo.execute (DeployMojo.java:61)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo (StartDebugMojoSupport.java:380)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoDeploy (StartDebugMojoSupport.java:343)
at io.openliberty.tools.maven.server.RunServerMojo.doRunServer (RunServerMojo.java:133)
EXPLANATION
The liberty:run mojo, as an "all-in-one" goal, assumes it needs to do a package step if "loose" is disabled (set to false), and so it calls the war:war goal. This wrongly replaces the SpringBoot-repackaged WAR with a plain WAR, leading to this error.
We might want to skip war:war in a case like this, when the user has selected a SpringBoot deploy package.
There's no need in this use case to explictly set -DlooseApplication=false. For a SpringBoot deploy package, there's no option to use loose applications anyway at the moment. Probably someone is just copying instructions from somewhere if they're trying to use this anyway.
ALSO
We leverage the fact that in some ways an executable/Uber WAR looks just look a similar JAR.
That said messages like this:
[WARNING] The file at the following location is not a Spring Boot Uber JAR:
could perhaps be improved by generalizing the language to "..Uber JAR or WAR", or something like that.
The text was updated successfully, but these errors were encountered:
If I start with the SpringBoot pet clinic sample, e.g. something like (spring-projects/spring-petclinic@082cfb4 - though I didn't verify this exact commit would recreate the problem:
and do:
I get the error
EXPLANATION
The liberty:run mojo, as an "all-in-one" goal, assumes it needs to do a package step if "loose" is disabled (set to false), and so it calls the
war:war
goal. This wrongly replaces the SpringBoot-repackaged WAR with a plain WAR, leading to this error.We might want to skip
war:war
in a case like this, when the user has selected a SpringBoot deploy package.WORKAROUND
Just use:
There's no need in this use case to explictly set
-DlooseApplication=false
. For a SpringBoot deploy package, there's no option to use loose applications anyway at the moment. Probably someone is just copying instructions from somewhere if they're trying to use this anyway.ALSO
We leverage the fact that in some ways an executable/Uber WAR looks just look a similar JAR.
That said messages like this:
could perhaps be improved by generalizing the language to "..Uber JAR or WAR", or something like that.
The text was updated successfully, but these errors were encountered: