moditect / layrry

A Runner and API for Layered Java Applications
Apache License 2.0
335 stars 33 forks source link

Support custom repositories other than Maven Central and Maven Local #26

Closed aalmiray closed 3 years ago

gunnarmorling commented 4 years ago

That already is supported (I think) via settings.xml in $M2_HOME. Or did you think of something else?

aalmiray commented 4 years ago

Oh I see. Then I think this has to be documented in the README.

aalmiray commented 4 years ago

Alright, so repositories are configurable via external sources, I can go with that, but what if you wanted to close down the available repositories without external interference? That is, repositories might need to be configured via LayersConfig, wouldn't they?

aalmiray commented 4 years ago

Additionally, consider offline mode with access to a local repository that's not Maven Local (~/.m2/repository or whatever is defined in ~/.m2/settings.xml) rather a directory with repo layout as created by the appassambler-maven-plugin for example.

gunnarmorling commented 4 years ago

Yes, good points. So we'd need an option on the launcher for customizing the local repo location. And perhaps another option which takes the location of a custom settings.xml, for overriding remote repos and more? WDYT?

aalmiray commented 4 years ago

Agreed. Potentially we're looking at he following scenarios:

  1. consume from default settings without any config -> this means using at ~/.m2/settings.xml which gives us Maven Central, Maven Local, and any other repository found in settings.xml. This is the current state.
  2. consume from alternate settings.xml -> requires specifying location to settings file.
  3. consume from closed local repository -> may require specific repo layout (g/a/v/gav.jar || gav.jar) and location of repo dir
  4. a combination of (1 | 2) & 3 where you want a set of dependencies to be resolved by remote repos (1 | 2) and locally available artifacts with 3. Useful for overwriting JARs locally without affecting a repo.
gunnarmorling commented 3 years ago

Done.