diff --git a/nexus-repository-composer/src/main/java/org/sonatype/nexus/repository/composer/internal/ComposerJsonProcessor.java b/nexus-repository-composer/src/main/java/org/sonatype/nexus/repository/composer/internal/ComposerJsonProcessor.java index 44e72c0e..53687a2b 100644 --- a/nexus-repository-composer/src/main/java/org/sonatype/nexus/repository/composer/internal/ComposerJsonProcessor.java +++ b/nexus-repository-composer/src/main/java/org/sonatype/nexus/repository/composer/internal/ComposerJsonProcessor.java @@ -192,7 +192,9 @@ public Payload rewriteProviderJson(final Repository repository, final Payload pa for (String packageVersion : packageVersions.keySet()) { // TODO: Make this more robust, right now it makes a lot of assumptions and doesn't deal with bad things well Map versionInfo = (Map) packageVersions.get(packageVersion); - versionInfo.remove(SOURCE_KEY); // TODO: For now don't allow sources, probably should make this configurable? + +// STEFAAN: keep source +// versionInfo.remove(SOURCE_KEY); // TODO: For now don't allow sources, probably should make this configurable? Map distInfo = (Map) versionInfo.get(DIST_KEY); if (distInfo != null && ZIP_TYPE.equals(distInfo.get(TYPE_KEY))) { diff --git a/nexus-repository-composer/src/test/resources/org/sonatype/nexus/repository/composer/internal/rewriteProviderJson.output.json b/nexus-repository-composer/src/test/resources/org/sonatype/nexus/repository/composer/internal/rewriteProviderJson.output.json index 9f50f96a..0f94bc15 100644 --- a/nexus-repository-composer/src/test/resources/org/sonatype/nexus/repository/composer/internal/rewriteProviderJson.output.json +++ b/nexus-repository-composer/src/test/resources/org/sonatype/nexus/repository/composer/internal/rewriteProviderJson.output.json @@ -17,6 +17,11 @@ "homepage": "http://example.com/author1" } ], + "source": { + "type": "git", + "url": "https:\/\/git.example.com\/vendor1\/project1.git", + "reference": "48954c0fa210437795be418e708b379598333d0a" + }, "dist": { "type": "zip", "url": "http://nexus.repo/base/repo/vendor1/project1/branch1/vendor1-project1-branch1.zip", @@ -36,6 +41,11 @@ "license": [ "MIT" ], + "source": { + "type": "git", + "url": "https:\/\/git.example.com\/vendor2\/project1.git", + "reference": "be418e708b379598333d0a48954c0fa210437795" + }, "authors": [ { "name": "Author 2",