[1.9-rc-2] tasks.remove failure

When I run the tests in the “tasks” subproject of this github project https://github.com/ReadyTalk/gradle-plugins on 1.9-rc-2, I get this problem:

java.lang.RuntimeException: Tried to remove model tasks.sign but it is not registered
        at org.gradle.model.internal.DefaultModelRegistry.remove(DefaultModelRegistry.java:96)
        at org.gradle.model.internal.ModelRegistryBackedModelRules.remove(ModelRegistryBackedModelRules.java:61)
        at org.gradle.api.internal.project.AbstractProject$2.execute(AbstractProject.java:232)
        at org.gradle.api.internal.project.AbstractProject$2.execute(AbstractProject.java:230)
        at org.gradle.listener.ActionBroadcast.execute(ActionBroadcast.java:39)
        at org.gradle.api.internal.DefaultDomainObjectCollection.doRemove(DefaultDomainObjectCollection.java:210)
        at org.gradle.api.internal.DefaultDomainObjectCollection.remove(DefaultDomainObjectCollection.java:205)
        at com.readytalk.gradle.tasks.JarSignTest.cleanup(SignJarTest.groovy:46)

I do not get this error on 1.8… (right now the wrapper in the project is 1.8, but if you run the wrapper task, 1.9-rc-2 will be used).

Hi seth, thanks for reporting this. There seems to be a regression when a task with the same name is added/removed multiple times as it happens in your unit test. I’m currently working on a fix and will ping you again once we have a gradle version with a fix available.

cheers, René

Hello Matt,

I’ve committed a fix and created another 1.9 snapshot at http://services.gradle.org/distributions-snapshots/gradle-1.9-20131030210600+0000-bin.zip can you give it a try and verify your issue is fixed in that snapshot?

cheers, René

Works for me! Thanks Rene.