jfrog / bower-art-resolver

Apache License 2.0
15 stars 17 forks source link

Resolver doesn't take in account orders with many sources #18

Closed manrueda closed 8 years ago

manrueda commented 8 years ago

If i have many sources in the search array in my .bowerrc, the resolver try to resolve to my artifact source even if i put another bower source before that.

Here is an example:

{
  "directory": "app/bower_components",
  "registry": {
    "search": [
      "http://bower.XXXXXX.com",
      "http://XXXXXX/artifactory/api/bower/default.bower.local",
      "https://bower.herokuapp.com"
    ]
  },
  "resolvers": [
    "bower-art-resolver"
  ]
}

If our private registry has a component called my-component pointing to a git repository and at the same time someone configure a bower component with the same name in our artifact repository. The resolver will get the component from the artifact and not from our private registry. Even if a put first our registry and the the artifacts.

eyalbe4 commented 8 years ago

@ManRueda, if you put your Artifactory URL first in the search list, bower should resolve from Artifactory. Please let me know if this works for you.

manrueda commented 8 years ago

@eyalbe4 , the problem is in the other way. I want to put another registry (not Artifactory URL) first and the resolve with that and not with Artifactory URL. Even when the Artifactory URL has a component with the same name.

Also, if i put the component in my bower.json file pointing directly to a git repository, the resolver will resolve with Artifactory URL

eyalbe4 commented 8 years ago

@ManRueda, since I'm not sure I completely understand the use case you're describing, I suggest you send an e-mail to support@jfrog.com with a link to this thread. If needed, we'll setup a call to discuss this with you. Thank you.

manrueda commented 8 years ago

It's working now, i don't know what i was doing wrong. The resolver take in account the order of the sources

manrueda commented 8 years ago

Hi, i have created the issue with an incorrect explanation. Here is whats happens

The bowerrc file is the same.

If i have a component in Artifactory and not in my custom registry. And run bower info my-component Bower throws this:

bower info my-component
bower not-cached    art://my-component/my-component#*
bower resolve       art://my-component/my-component#*
bower EREQUEST      Request to http://bower.int.XXXXX.com/refs/my-component/my-component returned 404 status code.
ipritish commented 8 years ago

I have following issue. I have two bower packages with different name in same server. resolver does not search for the package in second package. here is the configuration

"registry" : {
        "search": [
            "http://<local_url>/artifactory/api/bower/first_bower_package",
            "http://<local_url>/artifactory/api/bower/second_bower_package"
        ]
    }

bower version 1.7.9 bower-art-resolver 2.0.5 throws 404 error for the packages present in second_bower_package. is it a configuration issue or resolver issue?

ipritish commented 8 years ago

Update on my comment. my issue can easily be resolved with listing all the local repositories in virtual repository in artifactory.

eyalbe4 commented 8 years ago

Thanks for the update @ipritish. May we close this issue then?

ipritish commented 8 years ago

yea please go ahead