-1
I need to generate a file jar in the project folder as shown in the image below;
I don’t want to be depending on the bash command mvn clean install, i would love to put the settings in the pom.xml file so when the application runs it automatically generates the file. jar in web project folder.
This is a Spring Boot project, but the settings I put below did not work and I need to know how to hit the code;
<build>
<finalName>dockerTest</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
Maven is for managing dependencies and packaging settings, so you have the jar Maven will be responsible for generating it. There is no way you can use Maven and not run the artifact-generating Goal. I suggest reading the documentation of the tool, because I believe your understanding of how it works is mistaken.
– nullptr