0

I'm attempting to re-load at runtime a Maven dependency. The reason for this is I have a set of dependencies that load their own configuration, each of these dependencies can overwrite each others configuration depending on how they are loaded. I can view the loaded configuration via a method call : getConfig() . I want to determine at runtime how loading each dependency alters the configuration returned by getConfig(), therefore re-load at runtime a Maven dependency.

In Maven, how can I dynamically build a property value at runtime? references building a property at runtime, also can lookup dependencies at runtime : Maven - lookup dependencies at runtime ut I'm unable to find docs relating to reloading a dependency at runtime

J Fabian Meier
  • 30,532
  • 9
  • 61
  • 119
blue-sky
  • 49,326
  • 140
  • 393
  • 691
  • 1
    Not practical. You can't explicitly unload a class from a classloader. By the way, Maven is a built tool so is completely irrelevant at runtime. I wouldn't be including 'Maven' in your search terms anywhere. – Michael Feb 18 '20 at 14:50
  • 1
    Seems like you are more interested in an OSGi solution rather than a Maven build tool solution – Roman Vottner Feb 18 '20 at 16:00

0 Answers0