Add proxy to Mekom maven repository

Hi @cintiadr and @mksd and @mksrom,

I’m wondering if it would be possible to configure the OpenMRS maven repository to act as a proxy to the Mekom public maven repository for artifacts that are hosted there. As things stand now, we have to add both the Mekom repository and OpenMRS repository to many of our POMs (and we’ve also found we have to update our local .m2/settings.xml in some cases), and there may be a few other side effects that we haven’t fully investigated, and we think having OpenMRS proxy the Mekom repo might allow us to avoid those. Is that possible?

Here’s what we have in our pom as an example:

<repositories>
    <repository>
        <id>openmrs-repo</id>
        <name>OpenMRS Nexus Repository</name>
        <url>http://mavenrepo.openmrs.org/nexus/content/repositories/public</url>
    </repository>
    <repository>  <!-- Mekom repository, for Initializer -->
        <id>mks-nexus-public</id>
        <url>https://nexus.mekomsolutions.net/repository/maven-public/</url>
        <snapshots>
            <updatePolicy>always</updatePolicy>
        </snapshots>
    </repository>
</repositories>

Thoughts?

Thanks, Mike

cc @mogoodrich

… another option would be for us to push Iniz to OpenMRS’ Bintray.

@cintiadr to say what’s easier. I guess the latter.

1 Like

Hi @mseaton and @mksd

It’s not a problem at all to proxy a maven repo from our maven repo.

The problem is that specific repository you are pointing seems to have a lot of things that are already proxied by maven central:

https://nexus.mekomsolutions.net/#browse/browse:maven-public

So ideally, in order to prevent artefact collisions, it would be better for us to proxy a repository that only has the missing artefacts, with uniques the groupID/artifactsID

I assume that would be maven-releases? https://nexus.mekomsolutions.net/#browse/browse

1 Like

No snapshots as well.

Yes @mksrom it doesn’t make sense that our Nexus proxies the rest of the world. I guess we just let it be by default, we probably need to revisit this now.

So both your maven-releases and maven-snapshots?

That’s fine by me, but it means that you cannot rename those repositories without breaking the proxy we have :smiley:

Now, you have the chance of creating another group repo like ‘releases-and-snapshots-for-OpenMRS’ instead, but that will be the interface we’ll have them.

1 Like

Yes that’d be great. I’ll have a look at this and let you know.

1 Like

There you go:

https://nexus.mekomsolutions.net/repository/maven-releases-and-snapshots-for-openmrs/

maven-releases-and-snapshots-for-openmrs repo groups maven-snapshots and maven-releases. Now we’ll have control over this in the future.

Thanks for the suggestion @cintiadr :+1:

2 Likes

Done.

For future reference, it’s raised in ticket: https://issues.openmrs.org/browse/ITSM-4261

2 Likes

Great stuff! Thanks @cintiadr!

1 Like

Thanks @cintiadr and @mksd for the work on this!!

1 Like