pivy-importer: local repository could not find artifact ... under different name
I am having a issue with creating a specific artifact in the local repository, namely swagger-spec-validator.
Create the artifact using java -jar /var/lib/pivy-importer-0.3.39-all.jar --repo /data swagger-spec-validator:2.0.2, it adds it however under a different artifact name than the one specified in the .ivy file below.
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="pypi" module="swagger-spec-validator" revision="2.0.2" />
<configurations>
<conf name="default" description="auto generated configuration for default" />
<conf name="source" description="auto generated configuration for source" extends="default" />
</configurations>
<publications>
<artifact name="swagger-spec-validator" ext="tar.gz" conf="default" type="tar.gz" />
</publications>
<dependencies defaultconfmapping="*->default">
<dependency org="pypi" name="jsonschema" rev="2.5.1" conf="default" />
<dependency org="pypi" name="setuptools" rev="33.1.1" conf="default" />
<dependency org="pypi" name="six" rev="1.10.0" conf="default" />
</dependencies>
</ivy-module>
It is under the name: swagger_spec_validator-2.0.2.tar.gz. Changing the name helps however ... is it a bug? Or is there a way to have the proper artifact name from the start? Or I am missing something?
This seems like a bug. The artifact should be renamed to match what the ivy file suggests. I don't think this is something we'll get to soon, but if you're willing to take a stab at it, I'de be more than happy to point you in the right direction / review the PR.
@ethankhall It would help if you can point me where to look and I will take a stab at it.
You'll want to look around https://github.com/linkedin/pygradle/blob/master/pivy-importer/src/main/groovy/com/linkedin/python/importer/deps/DependencyDownloader.groovy#L67 I would look at changing DependencyDownloader#downloadArtifact to have a path to download to vs a directory to put it into.