You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "Cao, Lili (NSN - CN/Hangzhou)" <li...@nsn.com> on 2015/02/03 10:25:00 UTC

Can't download certain type of artifacts

Hi,
  I encounter issue that ivy can only download jar files from repository, but can't download other type of artifacts, could you please help checking the issue?

  Here is what I defined in properties file:
      ivy.default.ivy.pattern=[orgPath]/[module]/[branch]/[revision]/[type]/ivy_${component}.xml
  ivy.default.artifact.pattern=[orgPath]/[module]/[branch]/[revision]/[type]/[artifact].[ext]

 Here is used in ivysettings.xml
                                <url name="httpResolver" >
                     <ivy
                            pattern="http://${ivy.nexus.server}/nexus/content/repositories/${ivy.default.ivy.pattern}"
                           />
                     <artifact
                            pattern="http://${ivy.nexus.server}/nexus/content/repositories/${ivy.default.artifact.pattern}"
                           />
              </url>

I defined two types for artifacts:
<artifact name="a" type="jar" ext="jar"/>
      <artifact name="a_changes" type="readme" ext="html"/>

Here is publish and download part:
<target name="publish_artifacts"  depends="set_ivy_settings" description="publish artifacts to repository. this target is only for testing. we need do this during promotion.">
              <ivy:publish  pubrevision="${build_version}"  resolver="httpResolver" update="true" overwrite="true">
              <artifacts pattern="${output.dir}/[artifact].[ext]" />
              <artifacts pattern="${output.dir}/jar/[artifact].[ext]"/>
              <artifacts pattern="${output.dir}/readme/[artifact].[ext]"/>
       </ivy:publish>
       </target>
   <target name="download_artifacts" description="download artifacts of dependent components." depends="ivy_file_resolve">
              <ivy:retrieve pattern="${artifacts.dir}/[type]/[artifact].[ext]" type="jar,readme"/>
   </target>


I can publish artifacts correctly in my repository, but only jar files download to local, readme files can't be downloaded, could you please help on this? Which part might be wrong?  Thanks!

Br,
Lillian