Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pivy-importer: local repository could not find artifact ... under different name #107

Open
blankdots opened this issue Jan 24, 2017 · 3 comments

Comments

@blankdots
Copy link

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="*-&gt;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?

@ethankhall
Copy link
Contributor

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.

@blankdots
Copy link
Author

@ethankhall It would help if you can point me where to look and I will take a stab at it.

@ethankhall
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants