Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1324

[originalname] not expanded for source and javadoc types during publish in ivy:install

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0-RC1
    • Core
    • None
    • Ivy 2.2.0
      Ant 1.8.1
      Windows 7 x64

    Description

      When using ivy:install to create a local repository, [originalname] for the source and javadoc types is not expanded.

      The artifacts are correctly named in the cache, but when publishing to my local repository, original name is not expanded correctly.

      Related Jiras may be IVY-631 and IVY-1096 which fixed the expansion of [originalname] on retrieval

      I've created a simplified test which demonstrates the problem.

      ivy-settings.xml
      ----------------
      <ivysettings>
      <settings defaultResolver="maven.repo" />
      <resolvers>
      <filesystem name="incubator">
      <ivy pattern="${repository.dir}/[organisation]/[module]/[revision]/ivy.xml" />
      <artifact pattern="${repository.dir}/[organisation]/[module]/[revision]/[type]/[originalname].[ext]" />
      </filesystem>
      <ibiblio name="maven.repo" m2compatible="true" />
      </resolvers>
      </ivysettings>

      ivy-settings.properties
      -----------------------
      ivy.cache.dir=C:\\Temp\\ivytest
      cache
      repository.dir=C:\\Temp\\ivytest
      incubator

      build.xml
      ---------
      <?xml version="1.0"?>
      <project name="ivy-repository" default="ivy.init" xmlns:ivy="antlib:org.apache.ivy.ant">
      <target name="ivy.init">
      <property file="${basedir}/ivy-settings.properties" />
      <ivy:configure file="${basedir}/ivy-settings.xml" />
      </target>

      <target name="clean.incubator" depends="ivy.init"
      description=" ==> deletes the contents of the incubator directory">
      <delete dir="${repository.dir}" />
      </target>

      <target name="install.commons.collections" depends="ivy.init,clean.incubator">
      <ivy:install
      organisation="commons-collections"
      module="commons-collections"
      revision="3.1"
      type="*"
      transitive="true"
      overwrite="false"
      from="maven.repo"
      to="incubator" />
      </target>

      </project>

      Output produced
      ---------------

      16:21:36.29
      c:\Temp\ivytest>ant
      Buildfile: c:\Temp\ivytest\build.xml

      ivy.init:
      [ivy:configure] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
      [ivy:configure] :: loading settings :: file = c:\Temp\ivytest\ivy-settings.xml

      clean.incubator:
      [delete] Deleting directory C:\Temp\ivytest\incubator

      install.commons.collections:
      [ivy:install] :: installing commons-collections#commons-collections;3.1 ::
      [ivy:install] :: resolving dependencies ::
      [ivy:install] found commons-collections#commons-collections;3.1 in maven.repo
      [ivy:install] :: downloading artifacts to cache ::
      [ivy:install] :: installing in incubator ::
      [ivy:install] published commons-collections to C:\Temp\ivytest\incubator/commons-collections/commons-collections/3.1.part/javadoc/[originalname].jar
      [ivy:install] published commons-collections to C:\Temp\ivytest\incubator/commons-collections/commons-collections/3.1.part/jar/commons-collections-3.1.jar
      [ivy:install] published commons-collections to C:\Temp\ivytest\incubator/commons-collections/commons-collections/3.1.part/source/[originalname].jar
      [ivy:install] published ivy to C:\Temp\ivytest\incubator/commons-collections/commons-collections/3.1.part/ivy.xml
      [ivy:install] publish commited: moved C:\Temp\ivytest\incubator\commons-collections\commons-collections\3.1.part
      [ivy:install] to C:\Temp\ivytest\incubator\commons-collections\commons-collections\3.1
      [ivy:install] :: install resolution report ::
      [ivy:install] :: resolution report :: resolve 0ms :: artifacts dl 0ms
      ---------------------------------------------------------------------

        modules artifacts
      conf number search dwnlded evicted number dwnlded

      ---------------------------------------------------------------------

      default 1 0 0 0 3 0

      ---------------------------------------------------------------------

      BUILD SUCCESSFUL
      Total time: 0 seconds
      16:21:40.66
      c:\Temp\ivytest>

      Attachments

        Activity

          People

            maartenc Maarten Coene
            sadave64 David Featherstone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: