我想制作一个ant脚本,它将为我的项目创建一个发行包。我已经开始在Eclipse gui中使用Generate Javadoc命令生成一个Javadoc ant脚本。从Eclipse创建的蚂蚁脚本生成Javadoc
生成的脚本如下
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="javadoc">
<target name="javadoc">
<javadoc access="protected" author="true" classpath="C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\jaxb-2.2.7\lib\jaxb-impl.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\httpcomponents-client-4.2.5\lib\httpclient-4.2.5.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\httpcomponents-client-4.2.5\lib\commons-codec-1.6.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\jaxb-2.2.7\lib\jaxb-xjc.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\jaxb-2.2.7\lib\jaxb-api.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\jaxb-2.2.7\lib\jaxb-core.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\httpcomponents-client-4.2.5\lib\httpcore-4.2.4.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\httpcomponents-client-4.2.5\lib\commons-logging-1.1.1.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\commons-configuration-1.9\commons-configuration-1.9.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\jaxb-2.2.7\lib\jaxb-jxc.jar;C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\resources\libraries\commons-lang-2.6\commons-lang-2.6.jar" destdir="C:\Users\jender\Desktop\javadoc" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="com.TersoSolutions.Jetstream.SDK.XML.Events.LogicalDeviceAddedEvent,com.TersoSolutions.Jetstream.SDK.XML.Model.GetConfigurationResponse,com.TersoSolutions.Jetstream.SDK.XML.Model.ConfigureResponse,com.TersoSolutions.Jetstream.SDK.XML.Events.ObjectEvent,com.TersoSolutions.Jetstream.SDK.XML.Events.CommandQueuedEvent,com.TersoSolutions.Jetstream.SDK.XML.Model.CommandResponse,com.TersoSolutions.Jetstream.SDK.Application.User.DeviceSpecificCommands.TS,com.TersoSolutions.Jetstream.SDK.XML,com.TersoSolutions.Jetstream.SDK.Application.User,com.TersoSolutions.Jetstream.SDK.Application.Events,com.TersoSolutions.Jetstream.SDK.XML.Events.SensorReadingEvent,com.TersoSolutions.Jetstream.SDK.XML.Events.DeviceFailureEvent,com.TersoSolutions.Jetstream.SDK.XML.Model.RemoveEventsResponse,com.TersoSolutions.Jetstream.SDK.XML.Events.HeartbeatEvent,com.TersoSolutions.Jetstream.SDK.XML.Model.GetDeviceDefinitionsResponse,com.TersoSolutions.Jetstream.SDK.XML.Events.LogicalDeviceRemovedEvent,com.TersoSolutions.Jetstream.SDK.XML.Events.CommandCompletionEvent,com.TersoSolutions.Jetstream.SDK.XML.Events.LogEntryEvent,com.TersoSolutions.Jetstream.SDK.Application,com.TersoSolutions.Jetstream.SDK.XML.Events.DeviceRestoreEvent,com.TersoSolutions.Jetstream.SDK.XML.Model.GetPoliciesResponse,com.TersoSolutions.Jetstream.SDK.XML.Model.GetEventsResponse,com.TersoSolutions.Jetstream.SDK.XML.Events.AggregateEvent" source="1.7" sourcepath="C:\Eclipse\workspace\JetstreamSDK-Java\JetstreamSDK-Java\src" splitindex="true" use="true" version="true"/>
</target>
</project>
向前发展,我决定测试脚本之前,但我不能让它正常运行。我试图用下面的命令
ant javadoc -buildfile javadoc_protected.xml
ant javadoc -buildfile javadoc_protected.xml C:\Program Files\Java\jdk1.7.0_25\bin\javadoc.exe
ant javadoc -buildfile javadoc_protected.xml "C:\Program Files\Java\jdk1.7.0_25\bin\javadoc.exe"
和上面后运行的脚本没有工作,我读通过http://ant.apache.org/manual/Tasks/javadoc.html页面,并试图
ant javadoc -buildfile javadoc_protected.xml -executable C:\Program Files\Java\jdk1.7.0_25\bin\javadoc.exe
,但我仍然没有运气。我对蚂蚁极其缺乏经验,如果有人能解释我做错了什么,我将不胜感激。