[SOLVED] Fixing Module Snaphots Not Created in Nexus

Tags: #<Tag:0x00007f1f8039ce10> #<Tag:0x00007f1f8039ccf8>

I am working on a module, https://github.com/METS-Programme/openmrs-module-ugandaemr-reports, which currently has 2 released versions. However there are no snapshots created in http://mavenrepo.openmrs.org/nexus/content/repositories/snapshots, so my current Travis builds cannot deploy snapshots to the Nexus.

How do I create the module directory in Nexus, so that going forward Travis can automatically deploy snapshots there.

Does your .m2/settings.xml have a server node with id “openmrs-repo-snapshots” properly configured?

@dkayiwa What I do know is that other modules are deployed to snapshots on using the maven release:prepare, release:preform steps, but this one something happened and no entry was created in the snapshots repositories.

To deploy artifacts to a remote repo i.e the ones defined in the distributionManagement tag, you need to run the clean deploy goals, this is what the CI plans for RA application modules run. Do you actually have CI plans for your projects? If not you have to run it manually on your machine.

Just to add, release:perform calls the deploy goal against the created release tag behind the scenes to get the artifacts into nexus

Also to add, the mvn release:prepare/perform is for doing final releases.

You want Travis to do mvn clean deploy in its normal build to deploy a snapshot to nexus.

You need to define the right distributionManagement in your module’s pom.xml, and you need an account on mavenrepo.openmrs.org.

I ran mvn clean deploy and the snaphsots were created in Nexus, so I am now good to go