Failing 'grails generate-pom' in Grails 2.4

Today I had some fun while trying to publish the new version of LittleGoblin.

The publish-plugin step failed while generating the pom file, with a rather obscure error:


ingo@turtle:~/personalWorkspace/goblin$ grails publish-plugin --no-scm --dry-run --stacktrace --verbose
Base Directory: /home/ingo/personalWorkspace/goblin
| Packaging Grails application.....
[...]
| Plugin packaged grails-goblin-0.4.0.1.zip
| Generating POM file.....
| Error Exception in thread "DefaultMetadataResolver-0-2"
| Error Exception in thread "DefaultMetadataResolver-0-0"
| Error Exception in thread "DefaultMetadataResolver-0-3"
| Error Exception in thread "DefaultMetadataResolver-0-1"
| Error java.lang.NoSuchMethodError: org.apache.http.client.utils.URIUtils.extractHost(Ljava/net/URI;)Lorg/apache/http/HttpHost;
| Error at org.eclipse.aether.transport.http.HttpTransporter.<init>(HttpTransporter.java:112)
| Error at org.eclipse.aether.transport.http.HttpTransporterFactory.newInstance(HttpTransporterFactory.java:93)
| Error at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:110)
| Error at org.eclipse.aether.connector.basic.BasicRepositoryConnector.<init>(BasicRepositoryConnector.java:115)
| Error at org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(BasicRepositoryConnectorFactory.java:180)
| Error at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:113)
| Error at org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:603)
| Error at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
| Error at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| Error at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| Error at java.lang.Thread.run(Thread.java:724)
| Error java.lang.NoSuchMethodError: org.apache.http.client.utils.URIUtils.extractHost(Ljava/net/URI;)Lorg/apache/http/HttpHost;
| Error at org.eclipse.aether.transport.http.HttpTransporter.<init>(HttpTransporter.java:112)
| Error at org.eclipse.aether.transport.http.HttpTransporterFactory.newInstance(HttpTransporterFactory.java:93)
| Error at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:110)
| Error at org.eclipse.aether.connector.basic.BasicRepositoryConnector.<init>(BasicRepositoryConnector.java:115)
| Error at org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(BasicRepositoryConnectorFactory.java:180)
| Error at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:113)
| Error at org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:603)
| Error at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
| Error at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| Error at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| Error at java.lang.Thread.run(Thread.java:724)
| Error java.lang.NoSuchMethodError: org.apache.http.client.utils.URIUtils.extractHost(Ljava/net/URI;)Lorg/apache/http/HttpHost;
| Error at org.eclipse.aether.transport.http.HttpTransporter.<init>(HttpTransporter.java:112)
| Error at org.eclipse.aether.transport.http.HttpTransporterFactory.newInstance(HttpTransporterFactory.java:93)
| Error at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:110)
| Error at org.eclipse.aether.connector.basic.BasicRepositoryConnector.<init>(BasicRepositoryConnector.java:115)
| Error at org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(BasicRepositoryConnectorFactory.java:180)
| Error at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:113)
| Error at org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:603)
| Error at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
| Error at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| Error at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| Error at java.lang.Thread.run(Thread.java:724)
| Error java.lang.NoSuchMethodError: org.apache.http.client.utils.URIUtils.extractHost(Ljava/net/URI;)Lorg/apache/http/HttpHost;
| Error at org.eclipse.aether.transport.http.HttpTransporter.<init>(HttpTransporter.java:112)
| Error at org.eclipse.aether.transport.http.HttpTransporterFactory.newInstance(HttpTransporterFactory.java:93)
| Error at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:110)
| Error at org.eclipse.aether.connector.basic.BasicRepositoryConnector.<init>(BasicRepositoryConnector.java:115)
| Error at org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(BasicRepositoryConnectorFactory.java:180)
| Error at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:113)
| Error at org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:603)
| Error at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
| Error at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| Error at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| Error at java.lang.Thread.run(Thread.java:724)
| Error Error executing script PublishPlugin: org.apache.http.client.utils.URIUtils.extractHost(Ljava/net/URI;)Lorg/apache/http/HttpHost;
java.lang.NoSuchMethodError: org.apache.http.client.utils.URIUtils.extractHost(Ljava/net/URI;)Lorg/apache/http/HttpHost;
at org.eclipse.aether.transport.http.HttpTransporter.<init>(HttpTransporter.java:112)
at org.eclipse.aether.transport.http.HttpTransporterFactory.newInstance(HttpTransporterFactory.java:93)
at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:110)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.<init>(BasicRepositoryConnector.java:115)
at org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(BasicRepositoryConnectorFactory.java:180)
at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:113)
at org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:603)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
| Error Error executing script PublishPlugin: org.apache.http.client.utils.URIUtils.extractHost(Ljava/net/URI;)Lorg/apache/http/HttpHost;

After some searching I found the culprit:

A dependency on an old version of Groovy HttpBuilder:

compile("org.codehaus.groovy.modules.http-builder:http-builder:0.5.2") {
excludes "groovy"
}

The current version is at 0.7.2, but that one is not yet available to maven dependency resolution. So I use 0.7.1 and generate-pom now works.