私の Maven Java プロジェクトは、maven-antrun-plugin を使用して、私のアプリをデプロイする deploy.xml ant スクリプトを実行します。deploy.xml は<if>
タスクを使用しており、これが問題を引き起こしているようです。
[INFO] タスクを実行
中 [taskdef] リソース net/sf/antcontrib/antlib.xml から定義を読み込めませんでした。見つかりませんでした。デプロイ:
[情報] ---------------------------------------------- ---------------------------
[エラー] ビルド エラー
[情報] --------------- -------------------------------------------------- -------
[情報] Ant BuildException が発生しました: この行の実行中に次のエラーが発生しました:
E:\My_Workspace\xxxxxx\xxxxxx\xxxxxxx\deploy.xml:24: 問題: タスクまたはタイプの作成に失敗しました原因: 名前が
定義されていません。
処置: スペルを確認してください。
処置: カスタム・タスク/タイプが宣言されていることを確認してください。
処置: <presetdef>/<macrodef>宣言が行われたことを確認してください。
これが私のpomからのantrunプラグイン構成です。
<plugin>
<inherited>false</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>remote-deploy</id>
<phase>install</phase>
<configuration>
<tasks>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath"/>
<property name="compile_classpath" refid="maven.compile.classpath" />
<property name="runtime_classpath" refid="maven.runtime.classpath" />
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<echo message="compile classpath: ${compile_classpath}"/>
<echo message="runtime classpath: ${runtime_classpath}"/>
<echo message="plugin classpath: ${plugin_classpath}"/>
<ant antfile="${basedir}/deploy.xml">
<target name="deploy" />
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-jsch</artifactId>
<version>1.7.1</version>
</dependency>
</dependencies>
</plugin>
.. これが私の deploy.xml の関連セクションです。
<target name="deploy" if="deploy">
<if> <!-- line 24 -->
<and>
なぜ私は自分のmavenレポを見ることant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar
ができ、瓶の中を見るとnet/sf/antcontrib/antcontrib.properties
問題がないことがわかります。
の値を確認すると、maven.compile.classpath
への参照が表示されません。これが問題でしょうか? が依存関係として定義されている場合に表示されないのはなぜですか?maven.compile.classpath
maven.compile.classpath
antcontrib
antcontrib