Adding a repository for setup

I have a module and a distro called “mirebalais.” I recently added the repository for Mekom to it –

<repository>  <!-- Mekom repository, for Initializer -->                

now appears in the top-level pom.xml for openmrs-module-mirebalais. It works fine when installing, building, and running an existing server.

However, when I try to create a new server using

mvn openmrs-sdk:setup -DserverId=my-server -Ddistro=org.openmrs.module:mirebalais:1.2-SNAPSHOT -DdbUri=jdbc:mysql://localhost:3306/" my_server             

I get

[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.13.2:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to execute mojo: Unable to find artifact. Failure to find org.openmrs.module:initializer-omod:jar:1.1.0 in was cached in the local repository, resolution will not be reattempted until the update interval of archetype has elapsed or updates are forced
[ERROR] Try downloading the file manually from the project website.
[ERROR] Then, install it using the command:
[ERROR]     mvn install:install-file -DgroupId=org.openmrs.module -DartifactId=initializer-omod -Dversion=1.1.0 -Dpackaging=jar -Dfile=/path/to/file                                                    
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR]     mvn deploy:deploy-file -DgroupId=org.openmrs.module -DartifactId=initializer-omod -Dversion=1.1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]                      
[ERROR]   org.openmrs.module:initializer-omod:jar:1.1.0
[ERROR] from the specified remote repositories:
[ERROR]   archetype (, releases=true, snapshots=true),
[ERROR]   openmrs-repo (, releases=true, snapshots=true),
[ERROR]   openmrs-repo-thirdparty (, releases=true, snapshots=true),                                                                  
[ERROR]   openmrs-bintray-repo (, releases=true, snapshots=true),
[ERROR]   central (, releases=true, snapshots=false)
[ERROR] -> [Help 1]

One thing I notice about this error log is that the list of repositories, besides not including the Mekom repo, includes repositories not listed in the mirebalais POM, such as openmrs-bintray-repo.

How can one add a repository that will be used during openmrs-sdk:setup?

@mksd @mogoodrich

Hi @bistenes,

From the top of my head sdk:setup only relies on the and runs locally without needing other Maven repositories than the local one. Could you confirm that?

I got it figured out, following a pointer from @mseaton. openmrs-sdk:setup uses the repos configured in .m2/settings.xml. I had just had to add the Mekom repo to that list.