0
を私はアリmavenのは、失敗したプラグイン - 実行する@ hbm2java
MVN antrunこのコマンドを実行すると:私はANT_HOMEをANT 1.8をインストールし、設定した
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ciccio 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (hbm2java) @ ciccio ---
Downloading: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.9.4/ant-1.9.4.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.9.4/ant-1.9.4.pom (10 KB at 9.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.9.4/ant-1.9.4.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.9.4/ant-1.9.4.jar (1972 KB at 1036.8 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.267 s
[INFO] Finished at: 2016-11-27T23:32:16+01:00
[INFO] Final Memory: 15M/144M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (hbm2java) on project ciccio: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] jar:file:/C:/Users/ciro/.m2/repository/org/apache/maven/plugins/maven-antrun-plugin/1.8/maven-antrun-plugin-1.8.jar!/org/apache/maven/ant/tasks/antlib.xml:24: The following error occurred while executing this line:
[ERROR] jar:file:/C:/Users/ciro/.m2/repository/org/apache/ant/ant/1.9.4/ant-1.9.4.jar!/org/apache/tools/ant/antlib.xml:37: Could not create task or type of type: componentdef.
[ERROR]
[ERROR] Ant could not find the task or a class this task relies upon.
[ERROR]
[ERROR] This is common and has a number of causes; the usual
[ERROR] solutions are to read the manual pages then download and
[ERROR] install needed JAR files, or fix the build file:
[ERROR] - You have misspelt 'componentdef'.
[ERROR] Fix: check your spelling.
[ERROR] - The task needs an external JAR file to execute
[ERROR] and this is not found at the right place in the classpath.
[ERROR] Fix: check the documentation for dependencies.
[ERROR] Fix: declare the task.
[ERROR] - The task is an Ant optional task and the JAR file and/or libraries
[ERROR] implementing the functionality were not found at the time you
[ERROR] yourself built your installation of Ant from the Ant sources.
[ERROR] Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
[ERROR] task and make sure it contains more than merely a META-INF/MANIFEST.MF.
[ERROR] If all it contains is the manifest, then rebuild Ant with the needed
[ERROR] libraries present in ${ant.home}/lib/optional/ , or alternatively,
[ERROR] download a pre-built release version from apache.org
[ERROR] - The build file was written for a later version of Ant
[ERROR] Fix: upgrade to at least the latest release version of Ant
[ERROR] - The task is not an Ant core or optional task
[ERROR] and needs to be declared using <taskdef>.
[ERROR] - You are attempting to use a task defined using
[ERROR] <presetdef> or <macrodef> but have spelt wrong or not
[ERROR] defined it at the point of use
[ERROR]
[ERROR] Remember that for JAR files to be visible to Ant tasks implemented
[ERROR] in ANT_HOME/lib, the files must be in the same directory or on the
[ERROR] classpath
[ERROR]
[ERROR] Please neither file bug reports on this problem, nor email the
[ERROR] Ant mailing lists, until all of these causes have been explored,
[ERROR] as this is not an Ant bug.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
このエラーを得た実行する@ hbm2java
をウィンドウのパスの中にbinフォルダを置く。
あなたがしてはいけないことをしようとしているような気分になります。たとえば、私はリポジトリとしてant apacheのバージョン1.9をダウンロードしていますが、なぜそれがわかりません。その後、
編集
おかげで、私は私のマシンのアリにインストールされているという事実を無視し、私が述べたことを確認してください。私はバージョン1.9のjarファイルの名前を1.8に変更しました。すべてが完璧に機能します。しかし、これらの手口なしですべてがうまくいくことが良いでしょう。
から使用依存関係のバージョンです。また、1.8より最近のAntが必要だと思います。なぜAntrunを使い始めるのですか? – Tunaki
すべての人に感謝して投稿しました – ciro
Antを経由する代わりにMavenプラグインを直接使用してみませんか? http://stackoverflow.com/a/1900320/1743880 – Tunaki