Skip to content

Commit f6ff007

Browse files
committed
Fix issue with executable jar for se-run example.
1 parent eacfbd4 commit f6ff007

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

se-run/pom.xml

+7-2
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@
6060
</dependency>
6161
</dependencies>
6262

63+
<build>
64+
<finalName>se-run</finalName>
65+
</build>
6366
<profiles>
6467
<profile>
65-
<!-- here mainly to know the total size of the app.-->
6668
<id>exec</id>
6769
<build>
6870
<plugins>
@@ -80,7 +82,10 @@
8082
<transformers>
8183
<transformer
8284
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
83-
<mainClass>be.atbash.jakarta.core.demo.JakartaApplication.main</mainClass>
85+
<mainClass>be.atbash.jakarta.core.demo.JakartaApplication</mainClass>
86+
</transformer>
87+
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
88+
<resource>META-INF/services/jakarta.ws.rs.ext.RuntimeDelegate</resource>
8489
</transformer>
8590
</transformers>
8691
</configuration>

se-run/readme.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,14 @@ Have a look at the _pom.xml_ file for the required dependencies. We add Jersey i
1212

1313
## Start application
1414

15-
The start of the application is performed by the class `JakartaApplication`. Instead of just providing an instance of the `Application` class, which would be `DemoApplication`, we make use of the `ResourceConfig` of Jersey so that we can have the automated scanning for JAX-RS resource class instead of defining them through the `getClasses()` method in the `Application` class.
15+
The start of the application is performed by the class `JakartaApplication`. Instead of just providing an instance of the `Application` class, which would be `DemoApplication`, we make use of the `ResourceConfig` of Jersey so that we can have the automated scanning for JAX-RS resource class instead of defining them through the `getClasses()` method in the `Application` class.
16+
17+
## Build executable jar
18+
19+
To build an executable jar, execute
20+
21+
```
22+
mvn clean package -Pexec
23+
```
24+
25+
which build a jar which you can use to run your application outside the IDE.

0 commit comments

Comments
 (0)