私のmaven-javaプラグインはmaven-antrun-pluginを使用して、私のアプリケーションをデプロイするdeploy.xml antスクリプトを実行します。 deploy.xmlは<if>
タスクを使用していますが、これは問題を引き起こしているようです。antcontribの使用<if>タスクからmaven-antrun-plugin
[INFO]実行タスク
[のtaskdef]リソースネット/ SF/antcontrib/antlib.xmlから定義をロードできませんでした。それは見つけることができませんでした。展開:
[INFO] --------------------------------------- ---------------------------------
[エラー] BUILD ERROR
[情報] ----- -------------------------------------------------- -----------------
[INFO] Antビルドエラーが発生しました:この行の実行中に次のエラーが発生しました:
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>
は、なぜ私はant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar
を見ることができ、私のMavenのレポで見て、私は瓶の中を見たとき、私はそう問題はないがnet/sf/antcontrib/antcontrib.properties
を見ることができます。私はantcontrib
への参照を見ることができないmaven.compile.classpath
、maven.compile.classpath
とmaven.compile.classpath
の値を確認する場合
、これが問題になるだろうか?なぜ彼らはantcontrib
が依存として定義されているときに表示されませんか?
https://stackoverflow.com/questions/4368243/maven-antrun-with-sequential-ant-contrib-fails-to-run/45958355#45958355 –