Uploaded image for project: 'ShrinkWrap Resolvers'
  1. ShrinkWrap Resolvers
  2. SHRINKRES-32

Enable dependency resolver to be cached for time-sensitive environments

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0-alpha-2
    • 2.0.0-alpha-1
    • maven
    • None

      In time sensitive environments, caching DependencyResolvers.use(classOf[MavenDependencyResolver]) would be very useful to avoid all the rewiring of plexus/aether/guice internals. So, once resolveAsXYZ() is has been called, it would be handy to do some cleanup, so that further artifacts can be resolved without the need to recreate the resolver. Here's an IRC chat:

      [10:17]  <galderz> over last few days I discovered that DependencyResolvers.use(classOf[MavenDependencyResolver]) cannot be cached and reused
      [10:17]  <galderz> once you've resolved an artifact, that's somehow cached and new resolutions don't work
      [10:18]  <galderz> not being able to cache it sucks cos there's a lot of useless rewiring related to plexus/aether/guice that happens whenever DependencyResolvers.use(classOf[MavenDependencyResolver]) is called
      [10:18]  <galderz> kpiwko, any plans to improve this?
      [10:18]  <galderz> my use case of DependencyResolvers.use(classOf[MavenDependencyResolver]) is to use it when apps of a particular type are deployed, so time's gold :)
      [10:19]  <kpiwko> galderz: I see
      [10:19]  * maeste (~maeste4@redhat/jboss/maeste) has joined #jbosstesting
      [10:19]  <kpiwko> galderz: I was not thinking of such usage at all
      [10:20]  <galderz> kpiwko, i thought so, not the usual stuff
      [10:20]  <kpiwko> but it might be reasonable to clean the internal state after resolveAsXYZ() is called
      [10:20]  <kpiwko> however, the question here is, how far do you want to go with cleanup
      [10:20]  <galderz> in fact kpiwko, runnin SW resolver as a jboss module is not straightforward
      [10:20]  <galderz> u need to do some magic so that the plexus components.xml is found
      [10:21]  <galderz> kpiwko, yeah, i was thinking of smth like that
      [10:21]  <galderz> kpiwko, well, the cleanup should go as far as the maven artifcast/files that's it's resolved
      [10:21]  <galderz> i would not change any pom xml settings or anything
      [10:21]  <kpiwko> I see
      [10:21]  <kpiwko> can you file a jira about that?
      [10:21]  <galderz> kpiwko, think about: resolve library: x.y.z:1.1 and then, resolve: a.b.c.1.2.3
      [10:22]  <kpiwko> I think that your approach make sense
      [10:22]  <galderz> kpiwko, sure
      [10:22]  * paul_dijou (51fcf764@gateway/web/freenode/ip.81.252.247.100) has joined #jbosstesting
      [10:22]  <galderz> kpiwko, https://issues.jboss.org/browse/SHRINKRES ?
      [10:22]  <kpiwko> yep

              kpiwko Karel Piwko
              rh-ee-galder Galder ZamarreƱo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: