Skip to content

Commit 44c25ff

Browse files
committed
feat: add Maven JAR plugin to ensure JAR creation with main class configuration
1 parent 041c918 commit 44c25ff

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

user-tracking-service/pom.xml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
<groupId>org.springframework.cloud</groupId>
3838
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
3939
</dependency>
40-
40+
4141
<!-- H2 Database -->
4242
<dependency>
4343
<groupId>com.h2database</groupId>
4444
<artifactId>h2</artifactId>
4545
<scope>runtime</scope>
4646
</dependency>
47-
47+
4848
<!-- Test Dependencies -->
4949
<dependency>
5050
<groupId>org.springframework.boot</groupId>
@@ -67,10 +67,25 @@
6767

6868
<build>
6969
<plugins>
70+
<!-- Spring Boot Plugin -->
7071
<plugin>
7172
<groupId>org.springframework.boot</groupId>
7273
<artifactId>spring-boot-maven-plugin</artifactId>
7374
</plugin>
75+
76+
<!-- Maven JAR Plugin to ensure the JAR is created -->
77+
<plugin>
78+
<groupId>org.apache.maven.plugins</groupId>
79+
<artifactId>maven-jar-plugin</artifactId>
80+
<version>3.2.0</version>
81+
<configuration>
82+
<archive>
83+
<manifest>
84+
<mainClass>com.example.usertracking.UserTrackingServiceApplication</mainClass>
85+
</manifest>
86+
</archive>
87+
</configuration>
88+
</plugin>
7489
</plugins>
7590
</build>
7691
</project>

0 commit comments

Comments
 (0)