Pat*_*nan 3 ant javadoc ivy artifactory amazon-web-services
具有以下内容ivy.xml:
<dependency org="com.amazonaws" name="aws-java-sdk" rev="1.4.5">
<artifact name="aws-java-sdk" ext="jar"/>
</dependency>
Run Code Online (Sandbox Code Playgroud)
它会下载aws-java-sdk-1.4.5.jar,这是 AWS SDK,即类。
很好,但我还想获得 Javadoc 和源代码。
遵循Ivy: Fetching Javadocs and Sources 的建议,我将以下内容放入ivy.xml
<configurations>
<conf name="default" />
<conf name="compile" visibility="public"/>
<conf name="sources" visibility="public"/>
<conf name="javadoc" visibility="public"/>
</configurations>
<dependency org="com.amazonaws" name="aws-java-sdk"
rev="1.4.5" transitive="true"
conf="javadoc->javadoc;sources->sources;compile->default"/>
Run Code Online (Sandbox Code Playgroud)
aws-java-sdk-1.4.5.jar 它仅下载,并且是Javadoc(无类或源文件)。
更新:可能有用的文件片段
<project name="aws-project" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<target name="build" depends="clean,configure-ivy-settings,artifactory-retrieve">
Run Code Online (Sandbox Code Playgroud)
<project name="artifactory-bootstrap" xmlns:ac="http://ant-contrib.sourceforge.net" xmlns:ivy="antlib:org.apache.ivy.ant" default="configure-ivy-settings">
<target name="configure-ivy-settings" unless="skip.artifact.retrieve">
<echoproperties prefix="ivy" />
<!-- Change this to point to the branch in artifactory -->
<property name="artifactory.branch" value="20.0" />
<!-- Change this to the SRCROOT of your build -->
<property name="build.srcroot" value="${bootstrap.basedir}" />
<!-- Configure IVY Settings -->
<ivy:settings url="https://artifactory.mycompany.com/artifactory/simple/bootstrap/${artifactory.branch}/ivysetting-artifactory.xml" id="artifactory.ivy.settings" host="artifactory.mycompany.com" realm="Artifactory Realm" username="${artifactory.user}" passwd="${artifactory.password}" />
</target>
<target name="artifactory-retrieve" unless="skip.artifact.retrieve">
<property name="download.dir" value="${bootstrap.basedir}/extlib" />
<delete dir="${download.dir}" />
<mkdir dir="${download.dir}" />
<ivy:resolve settingsRef="artifactory.ivy.settings" file="${ivy.file}" />
<ivy:cachefileset settingsRef="artifactory.ivy.settings" setid="latest.downloads" />
<echo message="Artifacts are available at : ${download.dir}" />
<copy flatten="true" todir="${download.dir}">
<fileset refid="latest.downloads" />
</copy>
<fileset id="ivy.fileset" dir="${download.dir}">
<include name="*.jar" />
</fileset>
<property name="ivy.downloads.fileset" refid="ivy.fileset" />
<!-- Construct classpath to downloads //-->
<path id="ivy.classpath">
<fileset dir="${download.dir}">
<include name="*.jar" />
</fileset>
</path>
<property name="ivy.downloads.classpath" refid="ivy.classpath" />
<echo message="ivy.downloads.classpath=${ivy.downloads.classpath}"/>
<echo message="Artifacts are available at : ${download.dir}" />
<echo message="They can be referenced using fileset refid ivy.downloads.fileset or ivy.downloads.classpath" />
</target>
Run Code Online (Sandbox Code Playgroud)
\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 build\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 lib\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 compile\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 aws-java-sdk-1.4.5.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 commons-codec-1.3.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 commons-logging-1.1.1.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 httpclient-4.1.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 httpcore-4.1.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 jackson-core-asl-1.8.9.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 jackson-mapper-asl-1.8.9.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 javadoc\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 aws-java-sdk-1.4.5-javadoc.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 sources\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 aws-java-sdk-1.4.5-sources.jar\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 build.xml\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 ivy.xml\nRun Code Online (Sandbox Code Playgroud)\n\n<project name="demo" default="build" xmlns:ivy="antlib:org.apache.ivy.ant">\n\n <target name="build" description="Compile code">\n <ivy:retrieve pattern="build/lib/[conf]/[artifact]-[revision](-[classifier]).[ext]"/>\n </target>\n\n <target name="clean" description="Additionally purge ivy cache">\n <delete dir="build"/>\n <ivy:cleancache/>\n </target>\n\n</project>\nRun Code Online (Sandbox Code Playgroud)\n\n笔记:
\n\n<ivy-module version="2.0">\n <info organisation="com.myspotontheweb" module="demo"/>\n\n <configurations>\n <conf name="compile" description="Required to compile application"/>\n <conf name="sources" description="Source code"/>\n <conf name="javadoc" description="Javadocs"/>\n </configurations>\n\n <dependencies>\n <dependency org="com.amazonaws" name="aws-java-sdk" rev="1.4.5" conf="compile->default;sources;javadoc"/>\n </dependencies>\n\n</ivy-module>\nRun Code Online (Sandbox Code Playgroud)\n\n笔记:
\n\n这次的替代目录布局:
\n\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 build\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 doc\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 aws-java-sdk-1.4.5-javadoc.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 lib\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 aws-java-sdk-1.4.5.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 commons-codec-1.3.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 commons-logging-1.1.1.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 httpclient-4.1.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 httpcore-4.1.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 jackson-core-asl-1.8.9.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 jackson-mapper-asl-1.8.9.jar\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 src\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 aws-java-sdk-1.4.5-sources.jar\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 build.xml\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 ivy.xml\nRun Code Online (Sandbox Code Playgroud)\n\n<project name="demo" default="build" xmlns:ivy="antlib:org.apache.ivy.ant">\n\n <target name="build" description="Compile code">\n <ivy:retrieve pattern="build/lib/[artifact]-[revision].[ext]" conf="compile"/>\n <ivy:retrieve pattern="build/src/[artifact]-[revision](-[classifier]).[ext]" conf="sources"/>\n <ivy:retrieve pattern="build/doc/[artifact]-[revision](-[classifier]).[ext]" conf="javadoc"/>\n </target>\n\n <target name="clean" description="Additionally purge ivy cache">\n <delete dir="build"/>\n <ivy:cleancache/>\n </target>\n\n</project>\nRun Code Online (Sandbox Code Playgroud)\n\n笔记:
\n\n| 归档时间: |
|
| 查看次数: |
2670 次 |
| 最近记录: |