ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <nicolas.lale...@hibnet.org>
Subject Re: IvyDE Workspace Resolver
Date Wed, 08 Jun 2011 12:09:41 GMT

Le 8 juin 2011 à 13:36, efe4it a écrit :

> 
> 
> Nicolas Lalevée wrote:
>> 
>> About how the workspace resolver work, you have to understand that IvyDE
>> is then trying to see the eclipse workspace as an Ivy repository. So the
>> ivy.xml files in the Eclipse project must have enough information so that
>> it really looks like a repository. The only difference should be about the
>> artifacts. Since there is nothing actually published, IvyDE doesn't really
>> care about the <publications> tag in the ivy.xml. But you should not
>> reference any artifact in the dependencies section.
>> 
>> Nicolas
>> 
> 
> My IVY file now looks like this (every module is asame, just change the name
> of module and artefacts)
> Here my module "win32registry" depends on my other module "exception".
> 
> 
> 
>> <ivy-module version="1.0">
>>    <info organisation="org.efe4it" module="efe4it-lib-win32registry"
>> revision="trunk"/>
>>    <configurations>
>>    	<conf name="main-compile" description="compilation of main source
>> tree"/>
>>    	<conf name="javadoc" description="documentation"/>
>>    	<conf name="test-compile" description="compilation of test source
>> tree"/>
>>    	<conf name="runtime" extends="main-compile" visibility="private"
>> description="run"/>
>>    	<conf name="test" extends="test-compile,runtime" visibility="private"
>> description="test"/>
>>    </configurations>
>>    <publications>
>>    	<artifact name="efe4it-lib-win32registry-main" type="jar" 
>> conf="main-compile" ext="jar"/> 
>> 	<artifact name="efe4it-lib-win32registry-javadoc" type="javadoc"
>> conf="javadoc" ext="zip"/>
>>    </publications>
>>    <dependencies>
>>        <dependency org="org.slf4j" name="slf4j" rev="1.5.8"
>> conf="main-compile,javadoc->core"/>
>>        <dependency org="org.slf4j" name="slf4j" rev="1.5.8"
>> conf="runtime->log4j"/>
>>        <dependency org="org.junit" name="junit" rev="4.5"
>> conf="test-compile,test->default"/>
>>        <dependency org="org.efe4it" name="efe4it-lib-exception"
>> rev="trunk" conf="main-compile->main-compile"/>
>>    </dependencies>
>> </ivy-module>
>> 
> 
> And ivy console verbose output is
> 
> 
>> IVYDE: calling resolve on ivy.xml
>> 
>> :: resolving dependencies :: org.efe4it#efe4it-lib-win32registry;trunk
>> 	confs: [main-compile, test, test-compile, runtime]
>> 	validate = true
>> 	refresh = false
>> resolving dependencies for configuration 'main-compile'
>> == resolving dependencies for org.efe4it#efe4it-lib-win32registry;trunk
>> [main-compile]
>> [...]
>> == resolving dependencies
>> org.efe4it#efe4it-lib-win32registry;trunk->org.efe4it#efe4it-lib-exception;trunk
>> [main-compile->main-compile]
>> efe4it-lib-win32registry-ivyde-workspace-chain-resolver: Checking cache
>> for: dependency: org.efe4it#efe4it-lib-exception;trunk
>> {main-compile=[main-compile]}
>> 	found org.efe4it#efe4it-lib-exception;trunk in
>> efe4it-lib-win32registry-ivyde-workspace-resolver
>> [...]
>> :: resolution report :: resolve 296ms :: artifacts dl 16ms
>> 	---------------------------------------------------------------------
>> 	|                  |            modules            ||   artifacts   |
>> 	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
>> 	---------------------------------------------------------------------
>> 	|   main-compile   |   2   |   1   |   1   |   0   ||   3   |   0   |
>> 	|       test       |   4   |   1   |   1   |   0   ||   9   |   0   |
>> 	|   test-compile   |   1   |   0   |   0   |   0   ||   3   |   0   |
>> 	|      runtime     |   3   |   1   |   1   |   0   ||   6   |   0   |
>> 	---------------------------------------------------------------------
>> WARN: 	::::::::::::::::::::::::::::::::::::::::::::::
>> WARN: 	::          UNRESOLVED DEPENDENCIES         ::
>> WARN: 	::::::::::::::::::::::::::::::::::::::::::::::
>> WARN: 	:: org.efe4it#efe4it-lib-exception;trunk: configuration not found
>> in org.efe4it#efe4it-lib-exception;trunk: 'main-compile'. It was required
>> from org.efe4it#efe4it-lib-win32registry;trunk main-compile
>> WARN: 	::::::::::::::::::::::::::::::::::::::::::::::
>> 
>> 
>> :: problems summary ::
>> :::: WARNINGS
>> 		::::::::::::::::::::::::::::::::::::::::::::::
>> 
>> 		::          UNRESOLVED DEPENDENCIES         ::
>> 
>> 		::::::::::::::::::::::::::::::::::::::::::::::
>> 
>> 		:: org.efe4it#efe4it-lib-exception;trunk: configuration not found in
>> org.efe4it#efe4it-lib-exception;trunk: 'main-compile'. It was required
>> from org.efe4it#efe4it-lib-win32registry;trunk main-compile
>> 
>> 		::::::::::::::::::::::::::::::::::::::::::::::
>> 
> 
> If I follow you, having IvyDE ignoring the publication section make
> module-exception "main" JAR not visible to module-win32registry.

Ivy doesn't build anything, so Ivy won't produce that "main" jar. It is ant which is doing
that. In Eclipse, no jar is not build neither. The trick to make your project win32registry
compile without having that "main" jar, is to make a dependency between the two projects.
That is what IvyDE is doing with the workspace resolver.

So the resolve on win32registry is about:
* reading the ivy.xml of win32registry : Ivy finds a dependency on efe4it-lib-exception;trunk[main-compile]
* looking for efe4it-lib-exception;trunk[main-compile] in the repositories
* the first repository to look for is the workspace
* it should find the ivy.xml of the Java project efe4it-lib-exception and should see that
the version match
* resolved finished it gather every artifacts and add them to the classpath. For the ivy.xml
resolved via the workspace resolver, the artifact is an eclipse project.


> I'm afraid that would mean I need a distinct ivy file for Eclipse/IvyDE.
> 
> If you can spare some time, you may have a broader view of my setup here
> (from tomorrow on, some things are actually broken now that I will fix
> tonight):
> 
> 
>> svn checkout http://efe4it-suite.googlecode.com/svn/trunk/
>> efe4it-suite-read-only 
>> 

your ivy.xml files looks fine to me. I have been able to make a proper resolve in workspace
(I removed every dependency and I used a default ivysettings). Try to clean your caches.
If you still have issues, their maybe an issue in your ivysettings, which is not on svn (yet
?).

Nicolas


Mime
View raw message