We can use maven to generate project templates using mvn archetype:generate
then pick an archetype number. If say I pick number 1977 1977: remote -> org.springframework.boot:spring-boot-sample-tomcat-archetype (Spring Boot Tomcat Sample)
. Maven will generate the java project and so on.
When I check the pom.xml
file I see
<parent>
<!-- Your own application should inherit from spring-boot-starter-parent -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.0.2.RELEASE</version>
</parent>
It seems that the spring-boot-starter-parent
version 1.0.2.RELEASE
is from April 2014. Quite old now that it's 2019. https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent
My maven version is: apache-maven-3.5.4
.
How do we get a newer template/archetype from maven?
You can find a more recent sample on github:
However, I think that springboot has stopped using archetypes in favor of Spring Initializr.
There you would pick whatever version you want and add a Web
dependency to have the Tomcat and MVC framework starter included.