bintray / gradle-bintray-plugin

Apache License 2.0
1.28k stars 197 forks source link

bintrayUpload fails with an error (Not able to understand what is causing this) #287

Closed krmahadevan closed 5 years ago

krmahadevan commented 5 years ago

Note: Since I am not aware of what is the correct forum for getting help with this issue, I am posting my query as an issue.

When attempting to execute ./gradlew bintrayUpload I am seeing the below exception

19:12:05.288 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
19:12:05.288 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':bintrayUpload'.
19:12:05.288 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not upload to 'https://api.bintray.com/content/krmahadevan/maven/testng/7.0.0-beta7/property(class java/lang/String, fixed(class java/lang/String, org/testng))/property(class java.lang.String, fixed(class java.lang.String, testng))/property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7))/property(class java.lang.String, fixed(class java.lang.String, testng))-property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7)).pom': HTTP/1.1 400 Bad Request [message:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'property(class java/lang/String, fixed(class java/lang/String, org/testng))/property(class java.lang.String, fixed(class java.lang.String, testng))/property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7))/property(class java.lang.String, fixed(class java.lang.String, testng))-property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7)).pom']

I am trying to build and publish TestNG artifact.

Version used "com.jfrog.bintray" version "1.7.3" Gradle version : 5.1.1

Build files :

Steps that I followed

bintray.user=<BintrayUserNameGoesHere>
bintray.apikey=<BintrayApiKeyGoesHere>

Referred here for creating the api key

Complete stack trace is as below

* What went wrong:
Execution failed for task ':bintrayUpload'.
> Could not upload to 'https://api.bintray.com/content/krmahadevan/maven/testng/7.0.0-beta7/property(class java/lang/String, fixed(class java/lang/String, org/testng))/property(class java.lang.String, fixed(class java.lang.String, testng))/property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7))/property(class java.lang.String, fixed(class java.lang.String, testng))-property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7)).pom': HTTP/1.1 400 Bad Request [message:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'property(class java/lang/String, fixed(class java/lang/String, org/testng))/property(class java.lang.String, fixed(class java.lang.String, testng))/property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7))/property(class java.lang.String, fixed(class java.lang.String, testng))-property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7)).pom']

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':bintrayUpload'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:95)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:79)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:119)
        at org.gradle.api.internal.tasks.execution.ResolvePreviousStateExecuter.execute(ResolvePreviousStateExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:93)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:45)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:94)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:67)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.api.GradleException: Could not upload to 'https://api.bintray.com/content/krmahadevan/maven/testng/7.0.0-beta7/property(class java/lang/String, fixed(class java/lang/String, org/testng))/property(class java.lang.String, fixed(class java.lang.String, testng))/property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7))/property(class java.lang.String, fixed(class java.lang.String, testng))-property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7)).pom': HTTP/1.1 400 Bad Request [message:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'property(class java/lang/String, fixed(class java/lang/String, org/testng))/property(class java.lang.String, fixed(class java.lang.String, testng))/property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7))/property(class java.lang.String, fixed(class java.lang.String, testng))-property(class java.lang.String, fixed(class java.lang.String, 7.0.0-beta7)).pom']
        at com.jfrog.bintray.gradle.BintrayUploadTask$_bintrayUpload_closure8_closure36_closure38_closure40.doCall(BintrayUploadTask.groovy:389)
        at groovyx.net.http.HTTPBuilder$1.handleResponse(HTTPBuilder.java:503)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:1142)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:1076)
        at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:515)
        at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:434)
        at groovyx.net.http.HTTPBuilder.request(HTTPBuilder.java:366)
        at groovyx.net.http.HTTPBuilder$request.call(Unknown Source)
        at com.jfrog.bintray.gradle.BintrayUploadTask$_bintrayUpload_closure8_closure36.doCall(BintrayUploadTask.groovy:374)
        at com.jfrog.bintray.gradle.BintrayUploadTask$_bintrayUpload_closure8.doCall(BintrayUploadTask.groovy:365)
        at com.jfrog.bintray.gradle.BintrayUploadTask$_bintrayUpload_closure13.doCall(BintrayUploadTask.groovy:466)
        at com.jfrog.bintray.gradle.BintrayUploadTask.bintrayUpload(BintrayUploadTask.groovy:465)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:48)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:704)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:671)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:284)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)

Hope someone can help me out with this. Please let me know if any additional information is required.

krmahadevan commented 5 years ago

ping @eyalbe4 - Would you have a few minutes to help me out with this? This is basically preventing us from going forward with a TestNG beta release and I am trying to get that sorted out.

PS : My gradle skills aren't that great.. So please bear with the naivety

krmahadevan commented 5 years ago

Updated to 1.8.1 which fixed this issue.