I ran into a case where I resolve one ivy file that references a artifact called tools. Then later I try to get a new build number of the tools artifact and it acts as if it does not exist and starts at 1.
This seems to occur because in the IvyBuildNumber it uses a ModuleId object which does some caching of the module information and then does object comparisions in the getMatcher method.
In my case the String object ends up changing and so it thinks there is not an existing artifact giving me the 1.0 version instead of the correct one.
I have some test build to simulate the problem and would attach it if I could. You can ping me and I can send it to you.
Note the second output will be: [echo] tool current revision is: email@example.com; new revision is: 1.0
Since there is a tools artifact with 1.1.0 it should return a result of 1.2 and not 1.0.
I found the fix was to modify the IvyBuildNumber to do String comparisons using the equals operator instead of the ==. Here is the diff that fixes the issue: