stempler / gradle-versioneye-plugin

Plugin for Gradle to update your project's dependencies status on www.versioneye.com
MIT License
31 stars 5 forks source link

Unable to run update with 1.3.0 #23

Closed msteiger closed 8 years ago

msteiger commented 8 years ago

I just upgraded the plugin from 1.1.0 to 1.3.0 and I'm getting the following error:

Execution failed for task ':engine:versioneye-update'.
> org.apache.http.entity.ContentType.create(Ljava/lang/String;[Lorg/apache/http/NameValuePair;)Lorg/apache/http/entity/ContentType;

It looks like the wrong version of the apache http library was used. Here's the full gradle script:

https://github.com/MovingBlocks/Terasology/blob/develop/engine/build.gradle

I'm happy to help debugging, if needed.

stempler commented 8 years ago

Can you check the build script dependencies if there is anything else that has an Apache HTTP client dependency and thus might lead to a conflict? Because in principal it should work with the declared dependencies.

msteiger commented 8 years ago

I'm extracting the buildscript dependencies with the following task:

task buildScriptDependencies(type: org.gradle.api.tasks.diagnostics.DependencyReportTask) {
    configurations = project.buildscript.configurations
    doLast {
        println configurations
    }
}

For version 1.1.0, the output is

\--- org.standardout:gradle-versioneye-plugin:1.1.0
     +--- org.apache.httpcomponents:httpmime:4.3.3
     |    \--- org.apache.httpcomponents:httpclient:4.3.3
     |         +--- org.apache.httpcomponents:httpcore:4.3.2
     |         +--- commons-logging:commons-logging:1.1.3
     |         \--- commons-codec:commons-codec:1.6
     \--- org.codehaus.groovy.modules.http-builder:http-builder:0.7.1
          +--- org.apache.httpcomponents:httpclient:4.2.1 -> 4.3.3 (*)
          +--- net.sf.json-lib:json-lib:2.3
          |    +--- commons-beanutils:commons-beanutils:1.8.0
          |    |    \--- commons-logging:commons-logging:1.1.1 -> 1.1.3
          |    +--- commons-collections:commons-collections:3.2.1
          |    +--- commons-lang:commons-lang:2.4
          |    +--- commons-logging:commons-logging:1.1.1 -> 1.1.3
          |    \--- net.sf.ezmorph:ezmorph:1.0.6
          |         \--- commons-lang:commons-lang:2.3 -> 2.4
          \--- xml-resolver:xml-resolver:1.2

For version 1.3.0, the output is

\--- org.standardout:gradle-versioneye-plugin:1.3.0
     +--- org.apache.httpcomponents:httpmime:4.5.2
     |    \--- org.apache.httpcomponents:httpclient:4.5.2
     |         +--- org.apache.httpcomponents:httpcore:4.4.4
     |         +--- commons-logging:commons-logging:1.2
     |         \--- commons-codec:commons-codec:1.9
     \--- org.codehaus.groovy.modules.http-builder:http-builder:0.7.1
          +--- org.apache.httpcomponents:httpclient:4.2.1 -> 4.5.2 (*)
          +--- net.sf.json-lib:json-lib:2.3
          |    +--- commons-beanutils:commons-beanutils:1.8.0
          |    |    \--- commons-logging:commons-logging:1.1.1 -> 1.2
          |    +--- commons-collections:commons-collections:3.2.1
          |    +--- commons-lang:commons-lang:2.4
          |    +--- commons-logging:commons-logging:1.1.1 -> 1.2
          |    \--- net.sf.ezmorph:ezmorph:1.0.6
          |         \--- commons-lang:commons-lang:2.3 -> 2.4
          \--- xml-resolver:xml-resolver:1.2
(*) - dependencies omitted (listed previously)

As I understand it, httpclient 4.5.2 is used for version 1.3.0. Is this what you expect?

michel-kraemer commented 8 years ago

I'm following this discussion with great interest. I added a dependency to Apache HttpClient in gradle-download-task [1] recently, too. See its build file [2]. I haven't noticed any problems yet.

You're not using gradle-download-task, are you?

[1] https://github.com/michel-kraemer/gradle-download-task [2] https://github.com/michel-kraemer/gradle-download-task/blob/master/build.gradle

msteiger commented 8 years ago

It just added the gradle-download-task plugin (3.0.0) and it fails with a similar error:

Execution failed for task ':engine:downloadFile'.
> Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory

I checked out some example gradle scripts in an empty folder and they are running fine. So I assume it is linked to other build scripts such as the Artifactory plugin. I guess I need to remove code piece by piece to identify the conflicting parties.

stempler commented 8 years ago

@msteiger Were you able to resolve this? Please reopen the issue in case there is something to be adapted in the plugin.

michel-kraemer commented 8 years ago

Yep. I would be interested too if the problem was resolved or not.

msteiger commented 8 years ago

The problem is still unresolved - I'm still running version 1.1.0 so this is not a high-priority issue for me. Will investigate further as soon as I find the time and report back.

My assumption is that the update of httpmime from 4.3.3 to 4.5.2 is inconsistent with http-builder:0.7.1. Could that be it?

stempler commented 8 years ago

I don't think so as 1.3.0 is working without problems in other project setups. The initial error you posted doesn't give much information. Do have a stacktrace and error message to accompany that?