Skip to content

Commit

Permalink
Add type to provider JSON (sonatype-nexus-community#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefaanneyts authored and fjmilens3 committed Oct 29, 2018
1 parent 15d54ae commit 47d0ae5
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 15 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ External contributors:

* [@TheBay0r](https://github.com/TheBay0r) (Stefan Schacherl)
* [@Elendev](https://github.com/Elendev) (Jonas Renaudot)
* [@stefaanneyts](https://github.com/stefaanneyts) (Stefaan Neyts)
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ private Map<String, Object> buildPackageInfo(final Repository repository,
if (versionInfo.containsKey(SUPPORT_KEY)) {
newPackageInfo.put(SUPPORT_KEY, versionInfo.get(SUPPORT_KEY));
}
if (versionInfo.containsKey(TYPE_KEY)) {
newPackageInfo.put(TYPE_KEY, versionInfo.get(TYPE_KEY));
}

return newPackageInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ public void buildProviderJson() throws Exception {
.put("target-dir", "target-dir-1")
.put("scripts", singletonMap("scripts-1", asList("script-1")))
.put("support", singletonMap("support-1", "support-1-value"))
.put("type", "type-1-value")
.put("foo", singletonMap("foo-key", "foo-value"))
.build());

Expand Down Expand Up @@ -245,6 +246,7 @@ public void buildProviderJson() throws Exception {
.put("target-dir", "target-dir-2")
.put("scripts", singletonMap("scripts-2", asList("script-2")))
.put("support", singletonMap("support-2", "support-2-value"))
.put("type", "type-2-value")
.put("foo", singletonMap("foo-key", "foo-value"))
.build());

Expand Down Expand Up @@ -275,6 +277,7 @@ public void buildProviderJson() throws Exception {
.put("target-dir", "target-dir-3")
.put("scripts", singletonMap("scripts-3", asList("script-3")))
.put("support", singletonMap("support-3", "support-3-value"))
.put("type", "type-3-value")
.put("foo", singletonMap("foo-key", "foo-value"))
.build());

Expand Down Expand Up @@ -305,6 +308,7 @@ public void buildProviderJson() throws Exception {
.put("target-dir", "target-dir-4")
.put("scripts", singletonMap("scripts-4", asList("script-4")))
.put("support", singletonMap("support-4", "support-4-value"))
.put("type", "type-4-value")
.put("foo", singletonMap("foo-key", "foo-value"))
.build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
},
"support" : {
"support-1" : "support-1-value"
}
},
"type" : "type-1-value"
},
"2.0.0": {
"name": "vendor1/project1",
Expand Down Expand Up @@ -139,7 +140,8 @@
},
"support" : {
"support-2" : "support-2-value"
}
},
"type" : "type-2-value"
}
},
"vendor2/project2": {
Expand Down Expand Up @@ -211,7 +213,8 @@
},
"support" : {
"support-3" : "support-3-value"
}
},
"type" : "type-3-value"
},
"4.0.0": {
"name": "vendor2/project2",
Expand Down Expand Up @@ -281,7 +284,8 @@
},
"support" : {
"support-4" : "support-4-value"
}
},
"type" : "type-4-value"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"scripts-1": [
"script-1"
]
}
},
"type" : "type-1-value"
}
},
"vendor3/project3": {
Expand Down Expand Up @@ -110,7 +111,8 @@
},
"suggest": {
"suggest-2": "description-2"
}
},
"type" : "type-2-value"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
},
"suggest": {
"suggest-3": "description-3"
}
},
"type": "type-1-value"
},
"2.0.0" : {
"name": "vendor1/project1",
Expand All @@ -51,7 +52,8 @@
},
"suggest": {
"suggest-4": "description-4"
}
},
"type": "type-2-value"
}
},
"vendor2/project2" : {
Expand Down Expand Up @@ -79,7 +81,8 @@
},
"suggest": {
"suggest-5": "description-5"
}
},
"type": "type-3-value"
},
"4.0.0" : {
"name": "vendor2/project2",
Expand All @@ -105,7 +108,8 @@
},
"suggest": {
"suggest-6": "description-6"
}
},
"type": "type-4-value"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"scripts-1": [
"script-1"
]
}
},
"type" : "type-1-value"
},
"2.0.0" : {
"name": "vendor1/project1",
Expand All @@ -94,7 +95,8 @@
},
"suggest": {
"suggest-4": "description-4"
}
},
"type" : "type-2-value"
}
},
"vendor2/project2" : {
Expand Down Expand Up @@ -122,7 +124,8 @@
},
"suggest": {
"suggest-5": "description-5"
}
},
"type" : "type-3-value"
},
"4.0.0" : {
"name": "vendor2/project2",
Expand All @@ -148,7 +151,8 @@
},
"suggest": {
"suggest-6": "description-6"
}
},
"type" : "type-4-value"
}
},
"vendor3/project3" : {
Expand Down Expand Up @@ -188,7 +192,8 @@
},
"suggest": {
"suggest-2": "description-2"
}
},
"type" : "type-2-value"
}
}
}
Expand Down

0 comments on commit 47d0ae5

Please sign in to comment.