diff --git a/addons/pkg-npm/common/src/main/java/org/commonjava/indy/pkg/npm/content/PackageMetadataGenerator.java b/addons/pkg-npm/common/src/main/java/org/commonjava/indy/pkg/npm/content/PackageMetadataGenerator.java index 6a9fb93cbb..e40b3731f2 100644 --- a/addons/pkg-npm/common/src/main/java/org/commonjava/indy/pkg/npm/content/PackageMetadataGenerator.java +++ b/addons/pkg-npm/common/src/main/java/org/commonjava/indy/pkg/npm/content/PackageMetadataGenerator.java @@ -321,10 +321,9 @@ private boolean writePackageMetadata( List firstLevelFiles, Artif } // Generate tarball url if missing - String tarball = "http://indy/" + packagePath.getTarPath(); // here we use mock host. indy will amend it with the right hostname - - if ( versionMetadata.getDist() == null || !versionMetadata.getDist().getTarball().equals(tarball) ) + if ( versionMetadata.getDist() == null || !versionMetadata.getDist().getTarball().endsWith(packagePath.getTarPath()) ) { + String tarball = "http://indy/" + packagePath.getTarPath(); // here we use mock host. indy will amend it with the right hostname //logger.debug( "Generate dist tarball: {}", tarball ); versionMetadata.setDist( new Dist( tarball ) ); }