【发布时间】:2017-12-08 14:46:47
【问题描述】:
这是我的执行配置:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.mule.MuleServer</mainClass>
<arguments>
<argument>-config</argument>
<argument>src/main/app/prioritisation-api.xml</argument>
<argument>-classpath</argument>
<argument>src/main/app</argument>
</arguments>
<classpathScope>compile</classpathScope>
</configuration>
</plugin>
我得到的错误
org.springframework.beans.MethodInvocationException: Property 'protocol' threw exception; nested exception is java.lang.IllegalArgumentException: Address '${prioritisation.api.console.endpoint}' for protocol 'http' should start with http://
这向我表明 mule-app.properties 没有得到正确解决。问题是,当我运行为 Maven Mule 项目时,这一切都在 Anypoint Studio 中有效。我错过了什么?
编辑:
我正在尝试使用以下方式运行 mule:mvn exec:java -DrunMule
骡版:<mule.version>3.4.0</mule.version>
属性位于:src/main/app/mule-app.properties
Maven 版本:Apache Maven 3.2.1
【问题讨论】:
-
mule-app.properties are not being resolved properly是什么意思?你能显示你的完整pom文件吗?这些物业位于何处?您使用哪个 Maven 版本?你怎么称呼Maven?它可以从命令行工作吗? -
我在问题中添加了版本等。属性未正确解析,因为它没有将
${prioritisation.api.console.endpoint}替换为属性值。