having issues with the sdk

Since yesterday I’ve been having this error with mvn openmrs-sdk:deploy command

[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.8.2:deploy (default-cli) on project basicexample: Unable to execute mojo: Unable to find artifact. Failure to find org.openmrs.maven.parents:maven-parent-openmrs-module-omod:jar:1.1.0 in http://mavenrepo.openmrs.org/nexus/content/repositories/public was cached in the local repository, resolution will not be reattempted until the update interval of openmrs-repo has elapsed or updates are forced

I have been getting this for the past 24 hours. In an attempt to fix it I deleted ~/.m2/repositories/org/openmrs/maven/parents/maven-parent-openmrs-module-omod and tried the command again but still get the same error. I have even deleted the whole ~/.m2 directory and setup sdk from scratch and when I get deploying a module I still get that error.

cc @SolDevelo @raff

It doesn’t seem like an issue with SDK. Does your module build at all when you call “mvn clean install”?

Please share the pom of your module. It seems like you are depending on maven-parent-openmrs-module-omod of type jar, which is not correct. It is possible to depend on maven-parent-openmrs-module (note there’s no -omod) of type pom as the parent pom.

mvn clean install is successful.

The module was created with the sdk and I’ve made no changes to it. I used mvn openmrs-sdk:create-project to create my module and after that I built with mvn clean package and tried deploying with mvn openmrs-sdk:deploy then I had that error.

Below is a snapshot of mvn clean package

And here is my pom.xml

4.0.0

<parent>
    <groupId>org.openmrs.maven.parents</groupId>
    <artifactId>maven-parent-openmrs-module</artifactId>
    <version>1.1.0</version>
</parent>

<groupId>org.openmrs.module</groupId>
<artifactId>basicexample</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Basicexample</name>
<description>no description</description>

<url>https://wiki.openmrs.org/x/FQ4z</url>

<scm>
	<connection>scm:git:git@github.com:openmrs/openmrs-module-basicexample.git</connection>
	<developerConnection>scm:git:git@github.com:openmrs/openmrs-module-basicexample.git</developerConnection>
	<url>https://github.com/openmrs/openmrs-module-basicexample/</url>
</scm>

<modules>
	<module>api</module>
	<module>omod</module>
</modules>

<dependencyManagement>
	<dependencies>
		<!-- Importing versions from refapp distro -->
        <dependency>
            <groupId>org.openmrs.distro</groupId>
            <artifactId>referenceapplication</artifactId>
            <version>2.4</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
	</dependencies>
</dependencyManagement>

<repositories>
	<repository>
		<id>openmrs-repo</id>
		<name>OpenMRS Nexus Repository</name>
		<url>http://mavenrepo.openmrs.org/nexus/content/repositories/public</url>
	</repository>
	<repository>
		<id>central</id>
		<name>Maven Repository Switchboard</name>
		<layout>default</layout>
		<url>http://repo1.maven.org/maven2</url>
	</repository>
</repositories>
<pluginRepositories>
	<pluginRepository>
		<id>openmrs-repo</id>
		<name>OpenMRS Nexus Repository</name>
		<url>http://mavenrepo.openmrs.org/nexus/content/repositories/public</url>
		<snapshots>
			<enabled>false</enabled>
		</snapshots>
	</pluginRepository>
</pluginRepositories>

<properties>
	<openmrsPlatformVersion>1.11.6</openmrsPlatformVersion>
</properties>

Thanks for clarifying. I was able to reproduce the issue. I’ll add it to JIRA once the service is back (created SDK-215, the fix will be released today).

You can work around the issue before it is fixed by calling: mvn clean install openmrs-sdk:deploy -DartifactId=basicexample -DgroupId=org.openmrs.module -Dversion=1.0.0-SNAPSHOT

Fixed in OpenMRS SDK 3.9.0.

Thanks. Its working now.