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

Ivy swallows ParseException when using a latest strategy requiring module descriptors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0-beta-2
    • 2.0.0-beta-2
    • None
    • None

    Description

      Using the Ivy trunk within IvyDE, it doesn't find a dependency.
      Here is the ivy.xml from which I try to do the resolve :

      <ivy-module version="1.0">
          <info organisation="com.company" module="app"/>
          <configurations>
              <conf name="default"/>
              <conf name="runtime" extends="default"/>
              <conf name="test" extends="compile,runtime"/>
              <conf name="compile" extends="default"/>
              <conf name="webapp"/>
              <conf name="debian"/>
              <conf name="mock"/>
              <conf name="mock-war" extends="runtime"/>
              <conf name="eclipse"/>
          </configurations>
          <publications>
              <artifact name="app-core" type="jar" ext="jar" conf="default"/>
              <artifact name="app-core" type="source" ext="jar" conf="default"/>
              <artifact name="app-core" type="war" ext="war" conf="webapp"/>
              <artifact name="app-core" type="deb" ext="deb" conf="debian"/>
          </publications>
          <dependencies>
              <dependency org="com.company" name="app-lib1" rev="latest.development" conf="default->runtime" changing="true"/>
              <dependency org="com.company" name="app-lib2" rev="1.4.5" conf="default" changing="true"/>
      
              <dependency org="com.company" name="app-lib3" conf="default" rev="latest.development"/> 
      
              <dependency org="javax.servlet" name="servlet-api" rev="2.4" conf="compile->default"/>
              <dependency org="org.apache" name="fam" rev="0.1.0-r510454" conf="default" />
              <dependency org="velocity" name="velocity" rev="1.4" conf="default"/>
              <dependency org="velocity-tools" name="velocity-tools" rev="1.2" conf="default"/>
      
              <dependency org="junit" name="junit" rev="3.8.2" conf="test->default" changing="true"/>
          </dependencies>
      </ivy-module>
      

      Here is my ivy-conf:

      <ivyconf>
          <properties file="ivyconf.properties"/>    
          <conf defaultResolver="default-chain" defaultConflictManager="conflict-latest-revision" defaultLatestStrategy="strategy-latest-revision" checkUpToDate="true" defaultCache="ivy2-cache"/>
          <latest-strategies>
              <latest-revision name="strategy-latest-revision">
                  <specialMeaning name="patched" value="3"/>
              </latest-revision>
          </latest-strategies>
          
          <conflict-managers>
              <latest-cm name="conflict-latest-revision" latest="strategy-latest-revision" />
          </conflict-managers>    
          <!--
              3 statuses defined, they will all have a different versioning information
              See build.xml for more information
              
              release     : [major].[minor].[patch]
              integration : [major].[minor].[patch]-[svn.revision]-dev
              development : [major].[minor].[patch]-[svn.revision]-dev-[timestamp]        
            -->
          <statuses default="development">
              <status name="release" integration="false"/>
              <status name="integration" integration="true"/>
              <status name="development" integration="true"/>
          </statuses>    
          
          <resolvers  checkUpToDate="true">
              
              <filesystem name="external" m2compatible="true" checkconsistency="true" checkmodified="true" allownomd="false">
                  <artifact pattern="external-libs/[organisation]/[module]/[revision]/[type]s/[artifact]-[revision].[ext]" />
                  <ivy pattern="external-libs/[organisation]/[module]/[revision]/ivy.xml"/>
              </filesystem>
              <filesystem name="internal" m2compatible="true" checkconsistency="true" checkmodified="true" allownomd="false">
                  <artifact pattern="internal-libs/[organisation]/[module]/[revision]/[type]s/[artifact]-[revision].[ext]" />
                  <ivy pattern="internal-libs/[organisation]/[module]/[revision]/ivy.xml"/>
              </filesystem>
              <filesystem name="local" m2compatible="true" checkconsistency="true" checkmodified="true" allownomd="false">
                  <artifact pattern="local-libs/[organisation]/[module]/[revision]/[type]s/[artifact]-[revision].[ext]" />
                  <ivy pattern="local-libs/[organisation]/[module]/[revision]/ivy.xml"/>
              </filesystem>
              
              <chain name="company-chain" returnFirst="true">
                  <resolver ref="local"/>
                  <resolver ref="internal"/>
              </chain>
      
              <chain name="default-chain" returnFirst="true">
                  <resolver ref="external"/>
              </chain>
      
          </resolvers>
          <modules>
              <module organisation="com.company.*" name=".*" matcher="regexp" resolver="company-chain"/>
          </modules>
      </ivyconf>
      

      The external repository is where we push the libraries external to my company, like Apache libs. The internal repo contains the released versions of our libraries. The local one is the developer one, this is where the locally builds are pushed.

      app-lib1 and app-lib2 are resolved correctly, but not app-lib3. The only difference between app-lib1 and app-lib3 is that app-lib3 was never released, so the only existing version is in local-libs, and the version is 0.1.0-117639-dev-20080115164755.
      Here is the app-lib3 resolve part:

      == resolving dependencies com.company#app;working@almeda->com.company#app-lib3;latest.development [default->default]
      found conflicting revisions for com.company#app-lib3;latest.development in com.company#app;working@almeda: [com.company#app-lib3;latest.development]
      selected revisions for com.company#app-lib3;latest.development in com.company#app;working@almeda: [com.company#app-lib3;latest.development]
      loadData of com.company#app-lib3;latest.development of rootConf=default
      	using company-chain to resolve com.company#app-lib3;latest.development
      company-chain: Checking cache for: dependency: com.company#app-lib3;latest.development {default=[default]}
      don't use cache for com.company#app-lib3;latest.development: checkModified=true
      don't use cache for com.company#app-lib3;latest.development: checkModified=true
      	 trying local-libs/com/company/app-lib3/latest.development/ivy.xml
      		tried local-libs/com/company/app-lib3/latest.development/ivy.xml
      		tried local-libs/com/company/app-lib3/[revision]/ivy.xml
      	listing all in local-libs/com/company/app-lib3/[revision]/ivy.xml
      	using local to list all in local-libs/com/company/app-lib3/
      		found 1 resources
      	found revs: [0.1.0-117639-dev-20080115164755]
      	local: found md file for com.company#app-lib3;latest.development
      		=> local-libs/com/company/app-lib3/0.1.0-117639-dev-20080115164755/ivy.xml (0.1.0-117639-dev-20080115164755)
      	parser = ivy parser
      	no ivy file in cache for com.company#app-lib3;0.1.0-117639-dev-20080115164755: tried ivy2-cache/com.company/app-lib3/ivy-0.1.0-117639-dev-20080115164755.xml
      downloading local-libs/com/company/app-lib3/0.1.0-117639-dev-20080115164755/ivy.xml ...
      	local: downloading local-libs/com/company/app-lib3/0.1.0-117639-dev-20080115164755/ivy.xml
      		to ivy2-cache/com.company/app-lib3/ivys/ivy.original-0.1.0-117639-dev-20080115164755.xml.part
      	[SUCCESSFUL ] com.company#app-lib3;0.1.0-117639-dev-20080115164755!ivy.original.xml(ivy) (31ms)
      pre 1.3 ivy file: using exactOrRegexp as default matcher
      	local: impossible to get module descriptor resource: local-libs/com/company/app-lib3/0.1.0-117639-dev-20080115164755/ivy.xml (0.1.0-117639-dev-20080115164755)
      		tried [0.1.0-117639-dev-20080115164755 (no or bad MD)]
      	local: no resource found for com/#app-lib3;latest.development: pattern=local-libs/[organisation]/[module]/[revision]/ivy.xml
      	local: no ivy file found for com.company#app-lib3;latest.development
      don't use cache for com.company#app-lib3;latest.development: checkModified=true
      	 trying internal-libs/com/company/app-lib3/latest.development/ivy.xml
      		tried internal-libs/com/company/app-lib3/latest.development/ivy.xml
      		tried internal-libs/com/company/app-lib3/[revision]/ivy.xml
      	listing all in internal-libs/com/company/app-lib3/[revision]/ivy.xml
      	using internal to list all in internal-libs/com/company/app-lib3/
      		no resources found
      	internal: unable to list resources for com/#app-lib3;latest.development: pattern=internal-libs/[organisation]/[module]/[revision]/ivy.xml
      	internal: no ivy file found for com.company#app-lib3;latest.development
      WARN: 	module not found: com.company#app-lib3;latest.development
      WARN: ==== local: tried
      WARN:   local-libs/com/company/app-lib3/latest.development/ivy.xml
      WARN:   local-libs/com/company/app-lib3/[revision]/ivy.xml
      WARN:   [0.1.0-117639-dev-20080115164755 (no or bad MD)]
      WARN: ==== internal: tried
      WARN:   internal-libs/com/company/app-lib3/latest.development/ivy.xml
      WARN:   internal-libs/com/company/app-lib3/[revision]/ivy.xml
      com.company#app-lib3;latest.development => dependencies resolved in default (68ms)
      

      Here is the app-lib1 resolve part:

      == resolving dependencies com.company#app;working@almeda->com.company#app-lib1;latest.development [default->runtime]
      found conflicting revisions for com.company#app-lib1;latest.development in com.company#app;working@almeda: [com.company#app-lib1;latest.development]
      selected revisions for com.company#app-lib1;latest.development in com.company#app;working@almeda: [com.company#app-lib1;latest.development]
      loadData of com.company#app-lib1;latest.development of rootConf=default
      	using company-chain to resolve com.company#app-lib1;latest.development
      company-chain: Checking cache for: dependency: com.company#app-lib1;latest.development {default=[runtime]}
      don't use cache for com.company#app-lib1;latest.development: checkModified=true
      don't use cache for com.company#app-lib1;latest.development: checkModified=true
      	 trying local-libs/com/company/app-lib1/latest.development/ivy.xml
      		local-libs/com/company/app-lib1/latest.development/ivy.xml
      		tried local-libs/com/company/app-lib1/[revision]/ivy.xml
      	listing all in local-libs/com/company/app-lib1/[revision]/ivy.xml
      	using local to list all in local-libs/com/company/app-lib1/
      		found 1 resources
      	found revs: [3.3.1-117388-dev-20080115104256]
      	local: found md file for com.company#app-lib1;latest.development
      		=> local-libs/com/company/app-lib1/3.3.1-117388-dev-20080115104256/ivy.xml (3.3.1-117388-dev-20080115104256)
      	parser = ivy parser
      	no ivy file in cache for com.company#app-lib1;3.3.1-117388-dev-20080115104256: tried local-libs/com/company/app-lib1/ivy-3.3.1-117388-dev-20080115104256.xml
      downloading local-libs/com/company/app-lib1/3.3.1-117388-dev-20080115104256/ivy.xml ...
      	local: downloading local-libs/com/company/app-lib1/3.3.1-117388-dev-20080115104256/ivy.xml
      		to ivy2-cache/com.company/app-lib1/ivys/ivy.original-3.3.1-117388-dev-20080115104256.xml.part
      	[SUCCESSFUL ] com.company#app-lib1;3.3.1-117388-dev-20080115104256!ivy.original.xml(ivy) (11ms)
      pre 1.3 ivy file: using exactOrRegexp as default matcher
      	default-cache: parsed downloaded md file for com.company#app-lib1;3.3.1-117388-dev-20080115104256; parsed=com.company#app-lib1;3.3.1-117388-dev-20080115104256
      com.company#app-lib1;3.3.1-117388-dev-20080115104256 is changing, but has not changed: will trust cached artifacts if any
      		[3.3.1-117388-dev-20080115104256] com.company#app-lib1
      	found com.company#app-lib1;3.3.1-117388-dev-20080115104256 in local
      	[3.3.1-117388-dev-20080115104256] com.company#app-lib1;latest.development
      conflict resolution already done for com.company#app-lib1;3.3.1-117388-dev-20080115104256 in com.company#app;working@almeda
      

      Attachments

        1. IVY-702-r612476.patch
          0.6 kB
          Nicolas Lalevée

        Activity

          People

            xavier Xavier Hanin
            hibou Nicolas Lalevée
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: