2011-10-31 5 views
0

モジュールを持つmavenプロジェクトがあります。すべてのモジュールのインストールフェーズが実行されたあと、親プロジェクトからのantタスクが実行された後に実行したいmvn install。私は、次の親のpom.xmlにmavenサブモジュールをビルドしてantタスクを実行します

<project> 
    ... 
    <build> 
     <plugins> 
      <plugin> 
       <artifactId>maven-antrun-plugin</artifactId> 
       <version>1.6</version> 
       <executions> 
           <execution> 
            <phase>install</phase>  
             ant task 
           </execution> 
          </executions> 
      </plugin> 
      </plugins> 
<modules> 
    <module>module1</module> 
    <module>module2</module> 
</modules> 

を持っているが、私はmvn install antタスクはすべてのモジュールではなく、ルートプロジェクト内で実行される実行したとき。

答えて

1

親pomは、基礎となるモジュールに関する一般情報を保持するために使用されます。これは期待通りに動作します。

あなたのantタスクを別のモジュールに移動し、このモジュール内でインストールフェーズの後にantスクリプトを呼び出すことができます。

関連する問題