|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
IvyDE Workspace ResolverHi
I have some questions about the way to use revision when publishing module's artifacts. I also cannot get IvyDE's Workspace resolver to work. See http://ant.apache.org/ivy/ivyde/history/latest-milestone/cpc/workspace.html I am quite new to IVY and after having followed the tutorials, I try to setup my own Ivy repositories and settings I actually work on migrating to ivy an old multimodule project, that previously relied on a shared "javalibs" folder. I use: ANT-1.8.2 IVY 2.2.0.final_20100923230623 Eclipe-3.6 with IvyDE-2.1.0.201008101807-RELEASE My settings: In my specific ivysettings file, I use an url resolver (called external) for third party librairies and a file resolver (called project) for my own modules. see attached ivysettings-dev02.xml ivysettings-dev02.xml I have two projects/modules IvyTest-lib-exception and IvyTest-lib-win32registry, with win32registry depending on exception. Since I have 2 modules, I need to publish the dependee to compile the depender. IvyTest-lib-exception declares one artifact of type jar see attached lib-exception.ivy.xml lib-exception.ivy.xml <publications> <artifact name="${ivy.module}-main" type="jar" conf="compile" ext="jar"/> </publications> I publish the "trunk" revision using <ivy:publish resolver="project" artifactspattern="build/lib/[artifact].[ext]" pubrevision="trunk" conf="*(public)" update="true" overwrite="true" /> When publishing IvyTest-lib-exception, the jar file "IvyTest-lib-exception-main.jar" is correctly written to the "project" repository under the path "org.efe4it\IvyTest-lib-exception\trunk\jars" IvyTest-lib-win32registry declares a dependancy on "trunk" revision of IvyTest-lib-exception module see attached lib-win32registry.ivy.xml win32registry.ivy.xml When publishing via ANT, using ivy:buildlist task to order the build, everything works fine. Under Eclipse, the IvyTest-lib-win32registry project does resolve fine. If I delete the files under my local repository ("project"), this project won't resolve any more. I have configured the "build path" to and the dependancy on the other project .classpath is: <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src/main/java"/> <classpathentry kind="src" path="src/test/java"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&confs=*"/> <classpathentry combineaccessrules="false" kind="src" path="/IvyTest-lib-exception"/> <classpathentry kind="output" path="bin"/> </classpath> Error message box says: Some projects fail to be resolved Impossible to resolve dependencies of org.efe4it#IvyTest-lib-win32registry;working@wgl-9016 download failed: org.efe4it#IvyTest-lib-exception;working@wgl-9016!IvyTest-lib-exception-main.jar download failed: org.efe4it#IvyTest-lib-exception;working@wgl-9016!IvyTest-lib-exception-main.jar download failed: org.efe4it#IvyTest-lib-exception;working@wgl-9016!IvyTest-lib-exception-main.jar Ivy Console: :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS resolving dependencies of ivy.xml in 'IvyTest-lib-win32registry' IVYDE: calling resolve on ivy.xml :: resolving dependencies :: org.efe4it#IvyTest-lib-win32registry;working@wgl-9016 confs: [compile, runtime, test] found org.slf4j#slf4j;1.5.8 in external found org.apache.log4j#log4j;1.2.15 in external [1.2.15] org.apache.log4j#log4j;[1.2,1.3[ found org.efe4it#IvyTest-lib-exception;working@wgl-9016 in IvyTest-lib-win32registry-ivyde-workspace-resolver [working@wgl-9016] org.efe4it#IvyTest-lib-exception;trunk (forced) found org.apache.commons#commons-collections;3.2.1 in external found org.junit#junit;4.5 in external :: resolution report :: resolve 188ms :: artifacts dl 15ms --------------------------------------------------------------------- | | modules || artifacts | | conf | number| search|dwnlded|evicted|| number|dwnlded| --------------------------------------------------------------------- | compile | 4 | 2 | 1 | 0 || 5 | 0 | | runtime | 4 | 2 | 1 | 0 || 6 | 0 | | test | 5 | 2 | 1 | 0 || 7 | 0 | --------------------------------------------------------------------- :: problems summary :: :::: WARNINGS [FAILED ] org.efe4it#IvyTest-lib-exception;working@wgl-9016!IvyTest-lib-exception-main.jar: (0ms) I do not understand why IvyDE is looking for the revision "working@`hostname`" Any ideas ? Regards Emmanuel |
|
|
Re: IvyDE Workspace ResolverSince yesterday I found my problem is described in bug IVY-186 (https://issues.apache.org/jira/browse/IVYDE-186) and is marked as fixed.
My setup looks like the one described by Nicolas However it still does not work, whereas I used IvyDE-2.1.0. Could anyone try to reproduce. I Definitely need help Regards |
|
|
Re: IvyDE Workspace ResolverLe 19 avr. 2011 à 12:40, efe4it a écrit : > > Since yesterday I found my problem is described in bug IVY-186 > (https://issues.apache.org/jira/browse/IVYDE-186) and is marked as fixed. > > My setup looks like the one described by Nicolas > > >> project1 with no revision in ivy.xml, project2 depending on project1 >> rev="1.2" >> > > However it still does not work, whereas I used IvyDE-2.1.0. > Could anyone try to reproduce. > > I Definitely need help Maybe it is due to the way you declare your dependencies. In your ivy.xml files, you declare the artifacts you actually want to resolve. I think you're not forced to in your use case. This kind of declaration are only needed when you try to resolve against a repository which doesn't declare the artifacts of a module, typically for modules without any ivy.xml. So it may confuse the workspace resolver as it does not provides any jar. It only resolves the dependency and provides the classpath of the resolved project. Try to remove the "artifact" elements in your ivy.xml. Nicolas |
|
|
Re: IvyDE Workspace ResolverYou are right! I removed the <artifact> child of my <dependancy>s in ivy.xml files and the problem disappeared. Many thanks. Emmanuel |
|
|
Re: IvyDE Workspace ResolverHi
Small update here, because I had some troubles again with the workspace resolver. When using ANT outside Eclipse, I tell it to publish using "trunk" revision. Using a non-default publish revision, instead of letting IVY set it to "working@`host`" leads to strange behavior of IvyDE. Suppose you cleaned cache and local (user-private) repository. 1/ Then if you resolve deps with IvyDE, it complains about moduleB not finding "trunk" revision of moduleA. That's normal: Local repository is empty, and WorkspaceResolver knows only of the "working@..." revision of moduleA, because there is nowhere to tell it what to use instead 2/ Then you run ANT and "moduleA;trunk" is published to local repo. In Eclipse, no more complains. Fine, but that's not what you would want: IvyDE must find the eclipse projects' revisions in the WorkspaceResolver. And if possible, ANT & IvyDE must works on the same revision. To have IvyDE use the same publish revision label (i.e. trunk), I modified "ivy.xml" and set "revision" attribute of <info> tag to "trunk" Now IvyDE looks only for trunk revision, that are found in the WorkspaceResolver Btw, IvyConsole view helped a lot HTH Emmanuel |
|
|
Re: IvyDE Workspace ResolverHi
Since my previous post, I added javadoc artefact publication, which works fine if calling ivy from ANT (after some tweaking of deliver/publish). But now the WorkspaceResolver is lost again, and my only solution to stop it complaining is to disable version checking in the global IvyDE preferences. However this is only a workaround. Now I would like to debug IvyDE to understand what happen. How do you setup Eclipse to debug the resolve step of IvyDE ? Regards |
|
|
Re: IvyDE Workspace ResolverLe 6 juin 2011 à 16:53, efe4it a écrit : > > Hi > > Since my previous post, I added javadoc artefact publication, which works > fine if calling ivy from ANT (after some tweaking of deliver/publish). > > But now the WorkspaceResolver is lost again, and my only solution to stop it > complaining is to disable version checking in the global IvyDE preferences. > However this is only a workaround. > > Now I would like to debug IvyDE to understand what happen. > How do you setup Eclipse to debug the resolve step of IvyDE ? The usual first step is to look into the Ivy Console: http://ant.apache.org/ivy/ivyde/history/latest-milestone/console.html 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 |
|
|
Re: IvyDE Workspace ResolverMy 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". And ivy console verbose output is If I follow you, having IvyDE ignoring the publication section make module-exception "main" JAR not visible to module-win32registry. 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):
Regards Emmanuel |
|
|
Re: IvyDE Workspace ResolverLe 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 |
|
|
Re: IvyDE Workspace ResolverI now have fixed things and uploaded all required files, along with post checkout installation instructions (see project wiki and readme files). Let me know if you find anything inappropriate in my settings. Commit r16 works fine on my workstation with ANT, but IvyDE still fails for win32registry project after first settings reload. Meanwhile I will try with a fresh Eclipse installation and workspace. Emmanuel |
|
|
Re: IvyDE Workspace ResolverLe 8 juin 2011 à 22:14, efe4itcc a écrit : > > > Nicolas Lalevée wrote: >> >> >>>> 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 >> >> > > I now have fixed things and uploaded all required files, along with post > checkout installation instructions (see project wiki and readme files). > Let me know if you find anything inappropriate in my settings. > > Commit r16 works fine on my workstation with ANT, but IvyDE still fails for > win32registry project after first settings reload. This works fine for me. Since I don't a full setup locally, I remove every dependency in the ivy.xml files, except the dependency on win32registry on lib-exception. Have you tried to clean your caches ? Nicolas |
|
|
Re: IvyDE Workspace ResolverHi Nicolas. I indeed did clean the caches many times, both using IvyDE or the ANT task. I spend a couple a hours tonight testing around and I finally found out how to reproduce the bug. I started from a fresh Eclipse runtime and a new Workspace. Below is the exact sequence I used. 1/ Downloaded Package Helios SR2 classic 2/ Added plugins/features: Subclipse TeamProvider & SVNKit for svn-1.6.x, Eclipse MarketPlace and Easy Shell, then IVY-2.2.0 and IvyDE-2.1.0 3/ Imported my projects from working copy, but keep win32registry closed 4/ Created 2 new projects in default location: moduleA and moduleB 5/ For both created ivy.xml on efe4it's template ivy files. ModuleB depends on ModuleA and resolve works fine. 6/ Opened win32registry project and resolve fails as before. Finally I found that resolve does fail when ivy.module matches the project name, i.e.: "ivy.xml"!/ivy-module/info@module == ".project"!/projectDescription/name To help you test _with_ the dependancy, I added to SVN a tool to setup the "external" repository used in Javalibs (see also readme) https://efe4it-suite.googlecode.com/svn/trunk/BuildTools/IVY/CorpRepoInstaller Emmanuel |
|
|
Re: IvyDE Workspace ResolverI tried a last time to recreate the eclipse project from scrap, and ensuring their name does not match the ivy-module name anymore. One done, the resolve fails again. Then: 1/ I edit ivy file of exception, modifying the name of the module and artefact. 2/ I edit ivy file of registry, modifying the dependancy Now it works, and keeps working, even after restarting eclipse. To summarize the problem: I cannot resolve when "project name is sub-part of ivy-module name". Regards Emmanuel |
|
|
Re: IvyDE Workspace ResolverNotification:
I upgraded to Indigo but still do not manage to get a reliable behaviour. I finally decided to disable the workspace resolver. This is acceptable in my setup since I am currently doing solo work and I do not care having to switch to shell and launch ant build. For teamwork this looks more like a blocker (many people I worked with happen to dislike being forced to "leave the IDE") But as other people do not encounter the same difficulties, I believe something I my configuration must confuse the plugin. Being a newbie in eclipse plugin development, I do not know whether I will managed to find out what is amiss. Regards |
| Free embeddable forum powered by Nabble | Forum Help |