开发者

Check if a package exist in Ant script?

I am writing Ant script to generate Javadoc for my program. the ant script as:

<javadoc access="public" 
    source="1.6" 
    sourcepath="${basedir}/../${current.project}/src" 
    destdir="${basedir}/dist/doc/${curr开发者_JAVA技巧ent.project}" 
    packagenames="${current.project}" />

But I got trouble if the ${current.project} (packagenames="${current.project}") does not exist, then Ant will throw error and stop the progress.

I want to ask is there any way to check that if the package name (${current.project}) does not exist, then Ant will continue to do its jobs until end?


you could add the attribute failonerror="false" to your javadoc task, so it will prevend the whole build from failing - but the javadoc task won´t run anyway.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜