4. Creating JAR and using the springboot maven plugin

Inside the pom.xml we can add <packaging>jar</packaging> to specify we want a jar instead of a war file, also we can see the maven plugin for springboot in the plugins section

<build>
	<plugins>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
			<configuration>
				<excludes>
					<exclude>
						<groupId>org.projectlombok</groupId>
						<artifactId>lombok</artifactId>
					</exclude>
				</excludes>
			</configuration>
		</plugin>
	</plugins>
</build>

After building the project we can run mvn spring-boot:run command and maven will locate the jar file inside target folder