Why can't I successfully install OpenMRS SDK?

C:\Program Files\omrssdk-1.0.7>mvn -v Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:3 7+02:00) Maven home: C:\apache-maven-3.3.3\bin… Java version: 1.8.0_05, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.8.0_05\jre Default locale: en_ZA, platform encoding: Cp1252 OS name: “windows 7”, version: “6.1”, arch: “x86”, family: “dos”

C:\Program Files\omrssdk-1.0.7>mvn org.openmrs.maven.plugins:openmrs-sdk-maven-p lugin:setup-sdk -Dmaven.remote.repo=http://mavenrepo.openmrs.org/nexus/content/r epositories/public [INFO] Scanning for projects… [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.094 s [INFO] Finished at: 2015-07-20T11:54:12+02:00 [INFO] Final Memory: 4M/15M [INFO] ------------------------------------------------------------------------ [ERROR] Error resolving version for plugin ‘org.openmrs.maven.plugins:openmrs-sd k-maven-plugin’ from the repositories [local (C:\Users\mashinc.m2\repository), openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public), c entral (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin r epository -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionR esolutionException

C:\Program Files\omrssdk-1.0.7>

I have been battling for the past two weeks. Even if I am to use Java Netbeans IDE 8, I have this error message

cd C:\OpenMRS\Developer\mavenproject1; “JAVA_HOME=C:\Program Files\Java\jdk1.8.0_05” cmd /c “”“C:\Program Files\NetBeans 8.0\java\maven\bin\mvn.bat” -DskipTests=true -Dmaven.ext.class.path=“C:\Program Files\NetBeans 8.0\java\maven-nblib\netbeans-eventspy.jar” -Djava.net.useSystemProxies=true -POpenMRS clean install"" Scanning for projects…


Building mavenPlatformApp 1.0-SNAPSHOT

The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is missing, no dependency information available

BUILD FAILURE

Total time: 0.140s Finished at: Mon Jul 20 11:26:49 CAT 2015 Final Memory: 4M/15M

Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Failure to find org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of 4ZS17R1 has elapsed or updates are forced -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Below is a copy of the POM and settings XML respectively

<?xml version="1.0" encoding="UTF-8"?>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openmrs.maven</groupId>
<artifactId>mavenPlatformApp-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>mavenPlatformApp</name>
Maven Plugin issues http://mojo.codehaus.org
<repositories>
    <repository>
        <id>jdk18</id>
        <name>Repository for JDK 1.8 builds</name>
        <url>http://maven.apache.org/POM/4.0.0</url>
        <layout> default</layout>
    </repository>
</repositories>
    
<pluginRepositories>
    <pluginRepository>
        <id>4ZS17R1</id>
        <name>NetBeans</name>
        <url>http://repo1.maven.org/maven2</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
   
<build>
    <pluginManagement>
        <plugins>
           <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
            </plugin>
            <plugin>
                <groupId> org.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin \</artifactId>
                <version> 2.7</version>
            </plugin>
            <plugin>
                <groupId> org.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version> 2.3.1</version>
            </plugin>
                               
            <plugin>
            <groupId> org.maven.plugins</groupId>
            <artifactId> maven-site-plugin</artifactId>
            <version> 3.0 </version>
            </plugin>
                                                             
        </plugins>
    </pluginManagement>
</build>
<modules></modules>
<properties>
    <netbeans.version>RELEASE80</netbeans.version>
    <brandingToken>mavenplatformapp</brandingToken>
</properties>
        
<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.0</version>
        <type>jar</type>
        <scope>test</scope>
        <optional>true</optional>
    </dependency>

    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.4.1</version>
        <type>jar</type>
    </dependency>
org.apache.maven.plugins maven-clean-plugin 2.5 pom
     <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install</artifactId>
        <version>2.3.1</version>
        <type>pom</type>
    </dependency>
    
 </dependencies>
<?xml version="1.0" encoding="UTF-8"?>
<interactiveMode>true</interactiveMode>
<offline>false</offline>
<pluginGroups> 
    <pluginGroup>org.openmrs.maven.plugins</pluginGroup>
</pluginGroups>
optional true http proxyuser proxypassword localhost 8080 OpenMRS true http://mavenrepo.openmrs.org/nexus/content/repositories/public/archetype-catalog.xml http://mavenrepo.openmrs.org/nexus/content/repositories/public openmrs-repo OpenMRS Nexus Repository http://mavenrepo.openmrs.org/nexus/content/repositories/public
  </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>
</profile>

I am very new to OpenMRS

Thank you.

Did you have an internet connection at the time of running this command?

Hi Daniel, Yes I do have . My Netbeans IDE was even upgraded to 8.0.2 today.

Hi, @chetenm!

Thank you for your feedback! We just fixed this problem, now you can just execute

mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk

to install SDK on your PC. See updated wiki.

2 Likes

Hi All,

Its working after I started from scratch.

Trying so many times in so many ways, from last 1-2 weeks. Getting the same error while running

mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk

seems the error hadn’t been handled yet as mentioned in post#4. Help me in getting through that.

Regards, Speedy