She*_*air 5 mule pom.xml maven parent-pom mule-studio
我正在尝试通过遵循http://www.mulesoft.org/documentation/display/current/Creating+a+Connector+Project教程为m子开发自定义连接器。如本教程所示,我通过执行以下命令通过命令行创建项目
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
Run Code Online (Sandbox Code Playgroud)
将项目导入到Mule Studio后,我pom.xml在父标记附近的文件中收到以下错误。
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.
Run Code Online (Sandbox Code Playgroud)
这是我的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>
Run Code Online (Sandbox Code Playgroud)
我已将jdk版本更改为1.7。自动生成的pom中为1.6。忽略标题中的任何错误以及某些格式问题。我尝试了此处提到的各种解决方案,但无法解决问题。
您的计算机和互联网之间可能存在防火墙。您必须配置 Java 才能使用此代理。
或者您必须手动下载父 POM 并将其自行安装到本地 m2 存储库中。请参阅这个问题如何做到这一点:如何在 Maven 2 中手动安装工件?
由于您只需要安装 POM,因此您需要欺骗mvn install:install-file:
mvn install:install-file -Dfile=<path-to-pomfile> -Dpackaging=pom -DpomFile=<path-to-pomfile>
Run Code Online (Sandbox Code Playgroud)
该命令将仅安装 POM 本身。
| 归档时间: |
|
| 查看次数: |
20176 次 |
| 最近记录: |