2014-10-11 66 views
1

我有這種依賴關係,在我的POM文件神器部署目標配置:Wildfly Maven插件錯誤:部署神器必須指定的artifactId

.... 
<dependency> 
    <groupId>org.postgresql</groupId> 
    <artifactId>postgresql</artifactId> 
    <version>9.3-1102-jdbc41</version> 
    <scope>provided</scope> 
</dependency> 
.... 
.... 
<plugin> 
    <groupId>org.wildfly.plugins</groupId> 
    <artifactId>wildfly-maven-plugin</artifactId> 
    <version>1.0.2.Final</version> 
    <configuration> 
     <hostname>127.0.0.1</hostname> 
     <port>9991</port> 
     <username>xxxx</username> 
     <password>xxxx</password> 
     <name>App.war</name> 
    </configuration> 
    <executions> 
     .... 
     <execution> 
      <id>deploy-artifact</id> 
      <phase>install</phase> 
      <goals> 
       <goal>deploy-artifact</goal> 
      </goals> 
      <configuration> 
       <groupId>org.postgresql</groupId> 
       <artifactId>postgresql</artifactId> 
       <name>postgresql-9.3-1102-jdbc41.jar</name> 
      </configuration> 
     </execution> 
     .... 
    </executions> 
</plugin> 
.... 

但是,如果我運行:MVN wildfly:部署神器我recive此錯誤消息:

Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:deploy-artifact (default-cli) on project Zeus: deploy-artifact must specify the artifactId -> [Help 1] 

似乎在執行目標時的配置部分不讀!我錯在哪裏?有人可以幫助我嗎?

回答

0

您已經在執行中定義了配置。當你執行一個特定的目標時,它使用在插件上定義的配置,而不是定義的任何執行。

您需要將配置移至基本插件,執行安裝階段或創建可觸發的配置文件。

+0

好的!感謝詹姆斯! – orion91 2014-10-14 12:41:01