Hi all, We have had some struggling and strange behavior with the m2eclipse plug-in the last two days. We thought it might be worthwhile sharing:
The original problem, which i posted already was regarding the resolution of maven dependencies. We would like the plug-in to detect what the version of an eclipse project is, and based on the current version within eclipse, and the wanted version in a pom-file, decide to resolve either the eclipse project or a jar (with a different version then the eclipse project) as the correct dependency. The behavior that we observed was that local eclipse projects were always preferred over jars, independent of the version information. Since this feature was indispensable to us, we started browsing the source code of the repository, and made a small change of which we thought would solve the problem (in file : BuildPathManager.java). I won't go into the details of the changes, since it is besides the point of this mail. Then we tried to install the changed version of the plug-in in eclipse, and came across lots of issues, restarts, etc. to try to get it running. Since we had problems getting our adapted version to run, we looked around and realized that the code that we got of the svn repo was not the code of the latest stable version of the feature/plug-in that is offered on the codehouse plug-in repository (http://m2eclipse.codehaus.org/update/). The version of the svn code was 0.0.11, while the packaged version is 0.0.10. So we went back in the svn repo to find the souce of v0.0.10 (revision 210 it turned out to be). Before we made our changes in that revision of the source code, we compiled it to see of the basic plug-in functionality was ok. Now it turned out that the plug-in at revision 210 DID the dependency resolution correctly as we wanted it in the first place !!! A change in wanted version in the pom.xml was nicely reflected in a choice between a jar or a live eclipse project !?! To make things even more complicated: We cleaned an existing eclipse installation of the plug-in (including the cache in eclipse/.../bundles/) and reinstalled the plug-in **from the codehouse repository** (that is, the 0.0.10 version as a packaged feature). Now the plug-in AGAIN showed the wanted behavior of choosing between jar and project based on version number. This left us completely confused, since we never got this behavior before and had no idea why it worked now. We did not make any changes to anything else in the code or pom-files. Result of this all: We now have both a svn 0.0.10 version and a 0.0.10 version of the codehouse feature repo running fine on two eclipse instances (different machines), BOTH exhibiting the wanted behavior of choosing jar vs. eclipse project based on version number. This all *without* any changes to the code. So the functionality must have been there all the time. The question is: why didn't it work before, and, why does it work now all of a sudden ?? If somebody has any clues, very welcome.. Regards, Piet www.powerscan.be --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
