Non-resolvable parent POM

Sheikh Zubair picture Sheikh Zubair · May 19, 2014 · Viewed 23.5k times · Source

I am trying to develop a custom connector for mule by following http://www.mulesoft.org/documentation/display/current/Creating+a+Connector+Project tutorial. As shown in the tutorial, I am creating the project through command line by executing

mvn archetype:generate
    -DarchetypeGroupId=org.mule.tools.devkit
    -DarchetypeArtifactId=mule-devkit-archetype-cloud-connector
    -DarchetypeVersion=3.4.3
    -DgroupId=org.hello
    -DartifactId=hello-connector
    -Dversion=1.0-SNAPSHOT
    -DmuleConnectorName=Hello
    -Dpackage=org.hello
    -DarchetypeRepository=http://repository.mulesoft.org/releases

After importing the project to mule studio I am getting following error in my pom.xml file near the parent tag.

Project build error: Non-resolvable parent POM:
        Could not transfer artifact
        org.mule.tools.devkit:mule-devkit-parent:pom:3.4.3 from/to
        mulesoft-releases (http://repository.mulesoft.org/releases/):
        connection timed out to
        http://repository.mulesoft.org/releases/org/mule/tools/devkit/mule-devkit-parent/3.4.3/mule-devkit-parent-3.4.3.pom
        and 'parent.relativePath' points at wrong local POM.

Here is my pom.xml file.

<?xml version="1.0" encoding="UTF-8"?>
project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.hello</groupId>
    <artifactId>hello-connector</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>mule-module</packaging>
    <name>Hello Connector</name>

    <parent>
        <groupId>org.mule.tools.devkit</groupId>
        <artifactId>mule-devkit-parent</artifactId>
        <version>3.4.3</version>
    </parent>

    <properties>
        <junit.version>4.9</junit.version>
        <mockito.version>1.8.2</mockito.version>
        <jdk.version>1.7</jdk.version>
        <category>Community</category>
        <licensePath>LICENSE.md</licensePath>
        <devkit.studio.package.skip>false</devkit.studio.package.skip>
    </properties>

    <scm>
        <connection>scm:git:git://github.com:mulesoft/hello-connector.git</connection>
        <developerConnection>scm:git:[email protected]:mulesoft/hello-connector.git</developerConnection>
        <url>http://github.com/mulesoft/hello-connector</url>
    </scm>

    <repositories>
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>http://repository.mulesoft.org/releases/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>mulesoft-snapshots</id>
            <name>MuleSoft Snapshots Repository</name>
            <url>http://repository.mulesoft.org/snapshots/</url>
            <layout>default</layout>
        </repository>
    </repositories>

</project>

I have changed the jdk version to 1.7. it was 1.6 in the auto generated pom. ignore any error in the heading, some formatting issue. I have tried various solutions mentioned on here but am not able to resolve the issue.

Answer

Aaron Digulla picture Aaron Digulla · May 19, 2014

There is probably a firewall between your computer and the internet. You either have to configure Java to use this proxy.

Or you must download the parent POM manually and install it yourself into the local m2 repo. See this question how to do that: How to manually install an artifact in Maven 2?

Since you only need to install a POM, you need to trick mvn install:install-file:

mvn install:install-file -Dfile=<path-to-pomfile> -Dpackaging=pom -DpomFile=<path-to-pomfile>

This command will just install the POM itself.