Skip to content

Commit 6ca40e2

Browse files
authored
Merge pull request #14 from recktenwaldfabian/main
2 parents d9ff5cc + 5133f2f commit 6ca40e2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmd/mendix-userlib-cleaner/main.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ func parseManifest(filePath string, text string) JarProperties {
201201

202202
key := pair[0]
203203
value := pair[1]
204-
if key == "Bundle-SymbolicName" || key == "Extension-Name" {
204+
// Automatic-Module-Name - used in org.apache.httpcomponents.httpclient / org.apache.httpcomponents.client5.httpclient5
205+
if key == "Bundle-SymbolicName" || key == "Extension-Name" || key == "Automatic-Module-Name" {
205206
jarProp.packageName = value
206207
} else if key == "Bundle-Version" || key == "Implementation-Version" {
207208
jarProp.version = value
@@ -216,7 +217,10 @@ func parseManifest(filePath string, text string) JarProperties {
216217
continue
217218
}
218219
jarProp.name = value
219-
jarProp.packageName = value
220+
if jarProp.packageName == "" {
221+
// only use Bundle-Name as packageName if no alternative exists
222+
jarProp.packageName = value
223+
}
220224
}
221225
}
222226
return jarProp

0 commit comments

Comments
 (0)