I'm trying to define a war name to correspond custom naming convention. Currently, 2 war files are generated: app-name.war
and app-name-boot.war
However, I want to override the -boot
suffix, e.g. the war to be named app-name-executable.war
I've tried to define it this way
<finalName>${artifactId}-executable</finalName>
But then the app-name-executable-boot is generated. So how can I override the boot suffix for runnable war?
@Document - applied at the class level to indicate this class is a candidate for mapping to the database. You can specify the name of the collection where the database will be stored. @DBRef - applied at the field to indicate it is to be stored using a com.
There are two simple ways to do that: the simplest one is to add the property on the command line. Also, you will not launch the Spring Boot application in the usual format (java -jar application). On the other hand, you will launch the PropertiesLauncher class but adding in the classpath your Spring Boot application.
Spring Boot auto-configuration attempts to automatically configure your Spring application based on the jar dependencies that you have added. For example, If HSQLDB is on your classpath, and you have not manually configured any database connection beans, then we will auto-configure an in-memory database.
So to convert spring boot from JAR to WAR, you should eliminate the server dependencies. To avoid this, you need to mark the starter in pom. xml as provided . By marking the dependencies as provided, maven will ignore these dependencies.
I personally used this code block:
<build>
<finalName>lebab-executable</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
The output was two files inside target:
lebab-executable.war and
lebab-executable.war.original
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With