Reputation: 109
I am trying to follow the spring tutorials from the book Spring In Action 5th edition from Manning publications. The IDE I am using is Spring Tool Suite 4 and the latest version of Spring Boot I can see from it is 2.2.0
In the example of the pom file given in the book, it's mentioned that there will be a
<packaging>jar</packaging>
entry, however in the generated pom file, I don't find it. The book is based on
version 2.0.4 and the section in the book for the said entry is this:
<groupId>sia</groupId>
<artifactId>taco-cloud</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>taco-cloud</name>
<description>Taco Cloud Example</description>
In the pom file generated in the IDE I see this:
<groupId>sia</groupId>
<artifactId>taco-cloud</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>taco-cloud</name>
<description>Taco Cloud Example</description>
Does anyone have any idea why the entry <packaging>jar</packaging>
is missing?
Upvotes: 4
Views: 2952
Reputation: 52556
When no packaging is declared, Maven assumes the packaging is the default: jar
See: https://maven.apache.org/pom.html Section packaging.
Java application will packaged to JAR
, it is default manner.
Upvotes: 7
Reputation: 392
"jar" is the default packaging type. The value will default to jar if not specified.
Upvotes: 1