Skip to content

Commit 2f7e98b

Browse files
committed
Fixes artifactId pro maven model
Signed-off-by: Michal Karm Babacek <[email protected]>
1 parent 002a9c4 commit 2f7e98b

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/MicroprofileServersAddon.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,17 @@ public void adaptMavenModel(Model pomFile, JessieModel model, boolean mainProjec
149149
mavenHelper.addDependency(pomFile, "org.bouncycastle", "bcpkix-jdk15on", "1.53");
150150
}
151151

152-
if (model.hasMainAndSecondaryProject()) {
152+
// Needs refactoring and review for Liberty and possibly Helidon.
153+
/*if (model.hasMainAndSecondaryProject()) {
153154
String artifactID = pomFile.getArtifactId();
154155
if (mainProject) {
155156
pomFile.setArtifactId(artifactID + "-" + JessieModel.MAIN_INDICATOR);
156157
} else {
157158
pomFile.setArtifactId(artifactID + "-" + JessieModel.SECONDARY_INDICATOR);
158159
}
160+
model.getMaven().setArtifactId(pomFile.getArtifactId());
159161
pomFile.getBuild().setFinalName(artifactID);
160-
}
162+
}*/
161163

162164
}
163165

src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/model/SupportedServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public enum SupportedServer {
5151
MicroProfileVersion.MP30)
5252
, "%s.jar" //jarFileName
5353
, "" //jarParameters // Hard coded in server.xml since no way of overriding a default.
54-
, "http://localhost:8181/%s" //testURL
55-
, "http://localhost:8281/%s" //secondaryURL // This need to match with port value from server.xml
54+
, "http://localhost:8181/" //testURL, %s would be replaced with artifactId
55+
, "http://localhost:8281/" //secondaryURL // This need to match with port value from server.xml, %s would be replaced with artifactId
5656
)
5757
, KUMULUZEE("kumuluzEE", "KumuluzEE",
5858
Arrays.asList(MicroProfileVersion.MP12, MicroProfileVersion.MP13, MicroProfileVersion.MP14,

src/main/resources/files/liberty/service-b/server.xml.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<server description="${app.name}">
2+
<server description="${project.name}">
33

44
<featureManager>
55
<feature>microProfile-[# th:text="${mp_version}"/]</feature>
@@ -9,7 +9,7 @@
99
httpPort="8281"
1010
httpsPort="8643"/>
1111

12-
<webApplication location="${app.name}.war" contextRoot="/"/>
12+
<webApplication location="${project.name}.war" contextRoot="/"/>
1313
<mpMetrics authentication="false"/>
1414
<!-- This is the keystore that will be used by SSL and by JWT. -->
1515
<keyStore id="defaultKeyStore" location="public.jks" type="JKS" password="atbash" />

src/main/resources/pom-servers.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,11 @@
131131
<id>liberty</id>
132132

133133
<properties>
134-
135134
<httpPort>8181</httpPort>
136135
<httpsPort>8543</httpsPort>
137-
<jwt.issuer>https://server.example.com</jwt.issuer>
138136
</properties>
139137
<build>
140138
<finalName>${project.artifactId}</finalName>
141-
142139

143140
<plugins>
144141
<plugin>
@@ -163,8 +160,8 @@
163160
<configDirectory>${project.basedir}/src/main/liberty/server</configDirectory>
164161
<bootstrapProperties>
165162
<project.name>${project.artifactId}</project.name>
163+
<jwt.issuer>https://server.example.com</jwt.issuer>
166164
</bootstrapProperties>
167-
168165
</configuration>
169166
<executions>
170167
<execution>

0 commit comments

Comments
 (0)