Stefan Seifert created SLING-12566:
--------------------------------------
Summary: Feature Model: ArtifactManagerConfig assumes maven repo
at ~/.m2/repository}
Key: SLING-12566
URL: https://issues.apache.org/jira/browse/SLING-12566
Project: Sling
Issue Type: Bug
Components: Feature Model
Reporter: Stefan Seifert
Fix For: Feature Model 2.0.4
the default configuration in ArtifactManagerConfig assumes the local maven
repository located at {{~/.m2/repository}}:
https://github.com/apache/sling-org-apache-sling-feature/blob/b30900086e45ecb7a6c4bba2985da035952417c2/src/main/java/org/apache/sling/feature/io/artifacts/ArtifactManagerConfig.java#L60-L68
this may be the case in most cases, but it may be that the {{settings.xml}} in
that directory points to a different {{localRepository}} path.
i stumbled across this when using the sling project archetype
https://github.com/apache/sling-project-archetype
this creates a launcher project based on starting sling using the feature
launcher without any additional arguments except the feature file - and this
fails if the maven repository is not at the expected default location.
im my pov the code should look for a file {{~/.m2/settings.xml}} and take the
path from there - and only if it not exists default to {{~/.m2/repository}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)