Mule XML SDK и его ошибка в настройках Maven. xml - PullRequest
0 голосов
/ 03 апреля 2020

Я делаю XML SDK в Mule 4.2.2 с Maven 3.6.3 [хотя Mule встроен с использованием (3.6.9)] и AnypointStudio 7.4.2. Пожалуйста, проясните мои сомнения

1) Это XML SDK connector Создание плагина поддерживается только в версии Mule-EE или publi c?

2) Я использую приведенную ниже команду Maven и settings. xml, который выбрасывает 401 Unauthorized (Warning) и ошибку как проблему 'Archetype'.

 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)] 

Ниже приведены настройки. 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>

Я также пытался дать Publi c Repo вместо Mule -Ее в вышеуказанных настройках. Все та же ошибка. Направьте мне стандартные настройки. xml для Mule, если есть.

3) Хотя Mule встроен для этой среды выполнения 4.2.2 с использованием Maven 3.6.9. Можем ли мы использовать более низкую версию 3.6.3 (я считаю, что это стабильная версия)?

Ссылка: https://docs.mulesoft.com/mule-sdk/1.1/xml-sd k

Заранее спасибо за вашу помощь. Пожалуйста, дайте мне знать, если нужно больше информации.

1 Ответ

0 голосов
/ 04 апреля 2020

Я думаю, вам нужно объявить репозитории как pluginRepositories, чтобы архетип работал. НТН

...