2014-06-13 34 views
0

我使用maven exec插件來運行Mule 3.我有一些屬性在我的屬性文件中正確解析,但是如果我嘗試將它們提供爲JVM選項他們不會得到解決/重寫。下面是我的行家EXEC配置:Mule無法使用maven exec來解析佔位符

 <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> 
        <argument>-Dmule3.http.root=http://localhost:8095</argument> 
       </arguments> 
       <classpathScope>compile</classpathScope> 
      </configuration> 
     </plugin> 

我也使用-M-Dmule3.http.root=http://localhost:8095嘗試,但沒有奏效。

+0

如果您從命令行運行相同的功能,它會工作嗎? –

+0

您的Spring屬性佔位符配置爲允許系統屬性覆蓋? –

回答

0

exec插件有兩個目標javaexec。您正在使用java這意味着:

(摘自文檔):

的exec:java的執行在當前VM提供的Java類與 封閉項目的依賴關係爲類路徑。

我建議使用exec目標代替,並啓動一個單獨的JVM,您可以提供不同的參數。

相關問題