home >  Apache > Maven

Maven2のcobertura-maven-pluginで「Unable to find the mojo 'dump-datafile'」

Maven2を実行すると以下のエラーが出た。
 [INFO] Error getting reports from the plugin 'org.codehaus.mojo:cobertura-maven-plugin:2.3': Unable to find the mojo 'dump-datafile' (or one of its required components) in the plugin 'org.codehaus.mojo:cobertura-maven-plugin'
 net/sourceforge/cobertura/coveragedata/CoverageDataContainer (Unsupported major.minor version 49.0)
すごくはまったんだけど、これはpom.xmlの書き方がおかしいときに発生するみたい。

上の例はcobertura-maven-plugin2.3で発生したんだけど、JDKのバージョンによってはエラーになるみたい。 cobertura-maven-pluginのサイトを読んでみると、Goalsに書いているpom.xmlの書き方と、Usageに書いてあるpom.xmlの書き方が異なる。

どうも、Usageの書き方はJDK1.4で動く。
 <project>
   ・・・
   <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin
        </artifactId>
        <configuration>
          <formats>
          <format>xml</format>
          <format>html</format>
          </formats>
        </configuration>
      </plugin>
    </plugins>
   </reporting>
 </project>
JDK1.6(たぶん、1.5も?)の場合は、Goalsの書き方じゃないと動かなかった。
 <project>
   ・・・
  <build>
    <pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.3</version>
      </plugin>
    </plugins>
    </pluginManagement>
    <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.3</version>
        </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.3</version>
          <configuration>
            <formats>
            <format>xml</format>
            <format>html</format>
            </formats>
          </configuration>
        </plugin>
    </plugins>
  </reporting>
 <project>

参考

Apache Mavenはビルドスクリプトを再利用するためのフレームワークです。... 続き
Maven 2520円 
本書はMavenの概要からインストール方法、使い方、高度なテクニックまでがバラン... 続き
Java開発において安定したプロジェクト開発構成を提供するMavenについて、そ... 続き

トラックバック(0)

このブログ記事を参照しているブログ一覧: Maven2のcobertura-maven-pluginで「Unable to find the mojo 'dump-datafile'」

このブログ記事に対するトラックバックURL: http://daipresents.com/mt/bin/mt-tb.cgi/1793

コメントする


画像の中に見える文字を入力してください。

著者:Venkat Subramaniam, Andy Hunt, Shane Warden 税込2,520円
アジャイルの核心となるプラクティスについての、包括的かつ焦点の定まった簡潔な要約。特定のアジャイルな方法論を押し付けるのでなく、いろいろな方法論に共通するプラクティスを結びつけ、首尾一貫した全体像を描き出している。
著者:Yugui 税込 2,310 円
他言語でのプログラミング経験を持つ人を対象に、Rubyの特徴、Rubyならではの方法や慣習について解説。Rubyの基礎的な部分とメタクラスやブロック構文のような独自の概念、それらにまつわる文化を説明し、Ruby特有の考え方を知ってもらうことを目的としている。Ruby1.8及び1.9に対応している。 「BOOK」データベースより
著者:前田剛 税込 2,100 円
RubyonRailsで実施されたWebベースのプロジェクト管理システムRedmaineの解説書。

daipresents!!

҂̑蕨

tWn{github

tWn{Google Code