gpt4 book ai didi

java - Mule - 使用 Maven 运行时项目构建失败

转载 作者:行者123 更新时间:2023-11-30 06:31:36 24 4
gpt4 key购买 nike

我在尝试运行 Hello World Mulesoft 项目时遇到失败,它看起来与我正在运行的 Mulesoft 版本有关,我用 google 搜索了一下,但找不到任何信息来帮助解决此问题,这是构建错误:

[10:01:21] Running: mvn clean package -DskipMunitTests
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Mule firsttest Application 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.mulesoft.muleesb:mule-core-ee:jar:3.8.4 is missing, no dependency information available
[WARNING] The POM for com.mulesoft.muleesb.modules:mule-module-spring-config-ee:jar:3.8.4 is missing, no dependency information available
[WARNING] The POM for com.mulesoft.muleesb.transports:mule-transport-jdbc-ee:jar:3.8.4 is missing, no dependency information available
[WARNING] The POM for com.mulesoft.muleesb.transports:mule-transport-jms-ee:jar:3.8.4 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.496 s
[INFO] Finished at: 2017-08-31T10:01:27-05:00
[INFO] Final Memory: 8M/245M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "compiler" could not be activated because it does not exist.
[ERROR] Failed to execute goal on project firsttest: Could not resolve dependencies for project com.schwab:firsttest:mule:1.0.0-SNAPSHOT: Failed to collect dependencies at org.mule.transports:mule-transport-file:jar:3.8.4: Failed to read artifact descriptor for org.mule.transports:mule-transport-file:jar:3.8.4: Failure to find org.mule.transports:mule-transports:pom:3.8.4 in http://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of Central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

这是 POM 文件:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.schwab</groupId>
<artifactId>firsttest</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule</packaging>
<name>Mule firsttest Application</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<mule.version>3.8.4</mule.version>
<mule.tools.version>1.2</mule.tools.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-app-maven-plugin</artifactId>
<version>${mule.tools.version}</version>
<extensions>true</extensions>
<configuration>
<copyToAppsDirectory>true</copyToAppsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/app/</directory>
</resource>
<resource>
<directory>src/main/api/</directory>
</resource>
<resource>
<directory>mappings/</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<!-- Mule Dependencies -->
<dependencies>
<!-- Xml configuration -->
<dependency>
<groupId>com.mulesoft.muleesb</groupId>
<artifactId>mule-core-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Xml configuration -->
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-spring-config-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Transports -->
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-file</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.transports</groupId>
<artifactId>mule-transport-jdbc-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.transports</groupId>
<artifactId>mule-transport-jms-ee</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-vm</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Modules -->
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-scripting</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- for testing -->
<dependency>
<groupId>org.mule.tests</groupId>
<artifactId>mule-tests-functional</artifactId>
<version>${mule.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-spring-config</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<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>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mulesoft-release</id>
<name>mulesoft release repository</name>
<layout>default</layout>
<url>http://repository.mulesoft.org/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

</project>
<小时/>

知道发生了什么吗?

感谢您的帮助。

最佳答案

Maven 找不到 transports:mule-transport-file:jar:3.8.4因为它在 pom 中配置的 Mule Maven 存储库中不可用 <repositories> 。这是公共(public) Mule 存储库,但似乎 3.8.4 运行时及其依赖项并未公开,可能仅适用于企业用户。您可以通过浏览存储库亲自查看,JAR 丢失了:https://repository-master.mulesoft.org/nexus/content/repositories/releases/org/mule/transports/mule-transport-file/3.8.4

您可以使用您的依赖项可用的 Mule 3.8.1(在 pom 中更改 Mule 版本),或者如果您有适当的许可证和访问权限,则配置 Enterprise (EE) 存储库(请参阅 https://docs.mulesoft.com/mule-user-guide/v/3.8/configuring-maven-to-work-with-mule-esb )

*不相关的注释:看来您正在 Studio 中运行 Mule EE。 Studio 提供 EE 运行时用于测试目的,因此 Maven 不会(太多)提示缺少 EE 依赖项,但如果您尝试在 Studio 之外运行 Mule EE,则需要配置 EE 存储库。 *

关于java - Mule - 使用 Maven 运行时项目构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45985457/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com