2014-08-27 29 views
1

,我已創建了一個「ESB配置工程」的序列,使用位於WSDL文件這個代理服務WSO2 ESB代理服務一個「註冊資源項目」。我還創建了一個「Composite Application Project」來生成我的.car文件(包括代理服務,序列和資源),並在我的WSO2 ESB安裝中成功部署此文件。WSO2ESB - 使用WSO2開發工作室(版本3.7.0)建立CAR文件與Maven

現在我想使用maven命令生成(再部署)的。汽車檔案。

我第一次嘗試這樣的解決方案:https://docs.wso2.com/display/DVS370/Deploying+a+CAR+File+with+the+Maven+Plug-In。 當執行命令我ESB配置項目「MVN乾淨安裝」,我得到這個錯誤:

[ERROR] The goal you specified requires a project to execute but there is no POM in this directory ([ESB Config Project Path]\target\capp). 
Please verify you invoked Maven from the correct directory. -> [Help 1] 

事實上,安裝目標被配置在「目標/ CAPP」目錄下執行:

<directory>target/capp</directory> 
<plugins> 
    <plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>exec-maven-plugin</artifactId> 
    <version>1.2</version> 
    <extensions>true</extensions> 
    <executions> 
     <execution> 
     <id>install</id> 
     <phase>install</phase> 
     <goals> 
      <goal>exec</goal> 
     </goals> 
     <configuration> 
      <executable>mvn</executable> 
      <workingDirectory>${project.build.directory}</workingDirectory> 
      <arguments> 
      <argument>clean</argument> 
      <argument>install</argument> 
      <argument>-Dmaven.test.skip=${maven.test.skip}</argument> 
      </arguments> 
     </configuration> 
     </execution> 
... 

然後我試圖建立一個「Maven的多模塊項目」,如下建議:maven build for WSo2 artifacts,但我沒有找到任何解決辦法,使其工作:

以下從這個文檔(https://docs.wso2.com/display/DVS310/Using+Maven+with+Developer+Studio?src=search)中的步驟,我創建了一個「Maven Mul ti模塊項目「,並將我的配置,資源和複合項目選爲兒童。然後我啓動了「mvn clean install」命令,但仍然在ESB Config Project上發現錯誤(在target/capp文件夾中沒有POM)。

其實,我只是沒有找到有關這些錯誤的任何信息,不明白爲什麼WSO2記錄解決方案並沒有爲我工作。

有沒有人有關於此的建議? WSO2 Developer Studio如何生成.car文件?

謝謝

回答

0

我終於成功地生成了一個.car文件並創建了一個maven多模塊項目。

我試圖創建WSO2開發工作室3.7.0我所有的Maven項目,雖然樣品信息使用3.2.0版本。隨着WSO2的maven插件版本的改變,它現在可以正常工作,執行帶插件v2.0.4的maven安裝。

而且一個maven多模塊項目最後只用模塊Maven項目,所以它是確定。

1

我找到了這個問題的另一個答案。 exec-maven-plugin版本似乎是buggy。 WSO2 Developer Studio 3.7.0在創建項目時添加buggy版本(1.2)。你只需要改變從神器:

<groupId>org.codehaus.mojo</groupId> 
<artifactId>exec-maven-plugin</artifactId> 
<version>1.2</version> 

到:

<groupId>org.codehaus.mojo</groupId> 
<artifactId>exec-maven-plugin</artifactId> 
<version>1.4.0</version> 

認爲這是一個互補的信息: exec-maven-plugin says cannot run specified program, even though it is on the PATH

相關問題