不可解析的父POM [英] Non-resolvable parent POM

查看:112
本文介绍了不可解析的父POM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试通过遵循为for子开发自定义连接器http://www.mulesoft.org/documentation/display/current/Creating+a+Connector+Project 教程. 如本教程中所示,我正在通过执行以下命令通过命令行创建项目:

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

将项目导入到Mule Studio后,我的pom.xml文件中的父标记附近出现以下错误.

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.

这是我的pom.xml文件.

<?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:git@github.com: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>

我已将jdk版本更改为1.7.自动生成的pom中为1.6. 忽略标题中的任何错误以及某些格式问题. 我已经尝试过这里提到的各种解决方案,但无法解决问题.

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.

推荐答案

您的计算机和Internet之间可能存在防火墙.您要么必须配置Java才能使用此代理.

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

或者,您必须手动下载父POM并将其自己安装到本地m2存储库中.看到这个问题该怎么做:如何手动安装工件在Maven 2中?

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?

由于只需要安装POM,因此需要欺骗mvn install:install-file:

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>

此命令将仅安装POM本身.

This command will just install the POM itself.

这篇关于不可解析的父POM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆