簡體   English   中英

問題:無法創建任務或鍵入 thrift,因為缺少 ant-contrib-1.0b3.jar

[英]Problem: failed to create task or type thrift because ant-contrib-1.0b3.jar is missing

當我使用Ant在 Eclipse 上構建我的項目時,它可以工作。 但是當我用Jenkins做這件事時,我有這個錯誤:

Problem: failed to create task or type thrift
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

我發現它一定是因為缺少一個外部 jar: ant-contrib-1.0b3.jar 在 Eclipse 上,我配置了window/preferences/ant/runtime並添加了我的外部 jar,但我不知道如何使用 Jenkins。

你知道我可以在配置的什么地方添加這個 jar 嗎?

提前致謝

jar 可以位於系統的任何位置; 您只需要向 build.xml 添加一個taskdef步驟,其中包含指向它的classpath http://ant-contrib.sourceforge.net/

<taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath>
        <pathelement location="/path/to/ant-contrib-1.0b3.jar"/>
    </classpath>
</taskdef>

也就是說,據我所知,ant-contrib 不包含thrift任務。 這是 ant-contrib 添加的所有額外任務的列表: http : //ant-contrib.sourceforge.net/tasks/tasks/index.html

也許你正在尋找這個? https://github.com/ehrmann/thrift-task

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM