我正在使用 Maven 3.6.3 [尽管 Mule inbuild using (3.6.9)] 和 AnypointStudio 7.4.2 在 Mule 4.2.2 中执行 XML SDK。请澄清我的疑惑
1)XML SDK connector
插件创建是否仅在 Mule-EE 版本或公共版本中支持?
2) 我正在使用以下 Maven 命令和 settings.xml ,它抛出 401 Unauthorized (Warning) 和错误作为“原型”问题。
mvn archetype:generate -DarchetypeGroupId=org.mule.extensions -DarchetypeArtifactId=xml-mule-extensions-archetype -DarchetypeVersion=1.0.1 -DgroupId=org.mule.extension -DartifactId=error-handler-framework -DmuleConnectorName=ErrorHandler
我得到的错误如下。但我无需登录即可评估此 URL https://repository.mulesoft.org/releases/ 。不知道为什么它会抛出 401
[WARNING] Failure to transfer org.mule.tools/maven-metadata.xml from
https://repository.mulesoft.org/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of mulesoft-releases has elapsed or updates are forced. Original error: Could not transfer metadata org.mule.tools/maven-metadata.xml from/to mulesoft-releases (https://repository.mulesoft.org/releases/): authenticationrequired (401)
[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.mule.tools, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\jxsubr\.m2\repository), mulesoft-releases (https://repository.mulesoft.org/releases/), central (https://repo.maven.apache.org/maven2)]
下面是settings.xml
<?xml version="1.0"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>C:\Users\star\.m2\repository</localRepository>
<profiles>
<profile>
<id>Mule</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
</repositories>
</profile>
<profile>
<id>standard-repositories</id>
<repositories>
<repository>
<id>Central</id>
<name>Central</name>
<url>http://repo1.maven.org/maven2/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-ee-release</id>
<url>https://repository.mulesoft.org/nexus-ee/content/repositories/releases-ee/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
..............
</profile>
我还尝试在上述设置中提供 Public Repo,而不是 Mule-ee。还是同样的错误。如果有的话,请给我一个标准的Mule settings.xml。
3) 虽然 Mule 使用 Maven 3.6.9 为这个运行时 4.2.2 构建。我们可以使用低版本 3.6.3(我相信这是现在的稳定版本)吗?
参考:https ://docs.mulesoft.com/mule-sdk/1.1/xml-sd k
在此先感谢您的帮助。如果需要更多信息,请告诉我。