The Plugin Publishing Plugin incorrectly reports version as already existing


(Serban Iordache) #1

I published many versions of my plugin before and never had any issues. However, today there was a connection timeout during the execution of the publishPlugins task. Subsequent executions of this task failed with the error message:

Plugin: 'org.beryx.jlink', version: '2.1.7' exists already. It was created: 2018-06-27 09:00:37.039

This error message is incorrect. The version 2.1.7 does not exist. The publishPlugins task also fails with a similar error message when trying to publish the version 2.1.7-gradle4. These are the two versions I tried to publish during the time when my internet connection was unstable.

BTW, 2018-06-27 09:00:37.039 is actually the date when I published the 1.0.0 release of my plugin.

Could you please help with this issue? Thanks in advance!

Below is the Gradle output:

[dev@sio badass-jlink-plugin]$ ./gradlew -is publishPlugins
Initialized native services in: /home/dev/.gradle/native
Found daemon DaemonInfo{pid=32356, address=[5e4d0ac5-ccaa-45fc-8f52-9927db17c962 port:39253, addresses:[/127.0.0.1]], state=Idle, lastBusy=1543832025242, context=DefaultDaemonContext[uid=e902d5cb-e2ca-4363-9393-d4d1d694de86,javaHome=/opt/java/jdk1.8.0_25,daemonRegistryDir=/home/dev/.gradle/daemon,pid=32356,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=ISO-8859-1,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=/home/dev/siordache/jdk-11.0.1+13,daemonRegistryDir=/home/dev/.gradle/daemon,pid=7541,idleTimeout=null,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=ISO-8859-1,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=e902d5cb-e2ca-4363-9393-d4d1d694de86,javaHome=/opt/java/jdk1.8.0_25,daemonRegistryDir=/home/dev/.gradle/daemon,pid=32356,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=ISO-8859-1,-Duser.country=US,-Duser.language=en,-Duser.variant]

  Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 3122). The daemon log file: /home/dev/.gradle/daemon/5.0-milestone-1/daemon-3122.out.log
Starting 4th build in daemon [uptime: 4 mins 2.75 secs, performance: 100%]
Using 12 worker leases.
Starting Build
Settings evaluated using settings file '/home/dev/siordache/badass-jlink-plugin/settings.gradle'.
Projects loaded. Root project using build file '/home/dev/siordache/badass-jlink-plugin/build.gradle'.
Included projects: [root project 'badass-jlink-plugin']

> Configure project :
Evaluating root project 'badass-jlink-plugin' using build file '/home/dev/siordache/badass-jlink-plugin/build.gradle'.
Adding license extension
Adding licenseMain task for sourceSet main
Adding licenseTest task for sourceSet test
Applying license defaults to task: :licenseFormatMain
Applying license defaults to task: :licenseFormatTest
Applying license defaults to task: :licenseMain
Applying license defaults to task: :licenseTest
Adding download licenses extension
Applying defaults to download task: :downloadLicenses
[Asciidoctor] asciidoctorj: 1.6.0-RC.1
[Asciidoctor] asciidoctorj-groovy-dsl: 1.6.0-alpha.2
Applying license defaults to task: :licenseCheckGroovy
You are using one or more deprecated Asciidoctor task or plugins. To help with migration run with --warnings=all
All projects evaluated.
Selected primary task 'publishPlugins' from project :
Tasks to be executed: [task ':compileJava', task ':compileGroovy', task ':pluginDescriptors', task ':processResources', task ':classes', task ':jar', task ':groovydoc', task ':publishPluginGroovyDocsJar', task ':publishPluginJar', task ':javadoc', task ':publishPluginJavaDocsJar', task ':publishPlugins']
:compileJava (Thread[Execution worker for ':',5,main]) started.

> Task :compileJava NO-SOURCE
file or directory '/home/dev/siordache/badass-jlink-plugin/src/main/java', not found
Skipping task ':compileJava' as it has no source files and no previous output files.
:compileJava (Thread[Execution worker for ':',5,main]) completed. Took 0.018 secs.
:compileGroovy (Thread[Execution worker for ':',5,main]) started.

> Task :compileGroovy UP-TO-DATE
Skipping task ':compileGroovy' as it is up-to-date.
:compileGroovy (Thread[Execution worker for ':',5,main]) completed. Took 0.089 secs.
:pluginDescriptors (Thread[Execution worker for ':',5,main]) started.

> Task :pluginDescriptors UP-TO-DATE
Skipping task ':pluginDescriptors' as it is up-to-date.
:pluginDescriptors (Thread[Execution worker for ':',5,main]) completed. Took 0.006 secs.
:processResources (Thread[Execution worker for ':',5,main]) started.

> Task :processResources UP-TO-DATE
Skipping task ':processResources' as it is up-to-date.
:processResources (Thread[Execution worker for ':',5,main]) completed. Took 0.015 secs.
:classes (Thread[Execution worker for ':',5,main]) started.

> Task :classes UP-TO-DATE
Skipping task ':classes' as it has no actions.
:classes (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:jar (Thread[Execution worker for ':',5,main]) started.

> Task :jar UP-TO-DATE
Skipping task ':jar' as it is up-to-date.
:jar (Thread[Execution worker for ':',5,main]) completed. Took 0.008 secs.
:groovydoc (Thread[Execution worker for ':',5,main]) started.

> Task :groovydoc UP-TO-DATE
Skipping task ':groovydoc' as it is up-to-date.
:groovydoc (Thread[Execution worker for ':',5,main]) completed. Took 0.032 secs.
:publishPluginGroovyDocsJar (Thread[Execution worker for ':',5,main]) started.

> Task :publishPluginGroovyDocsJar UP-TO-DATE
Skipping task ':publishPluginGroovyDocsJar' as it is up-to-date.
:publishPluginGroovyDocsJar (Thread[Execution worker for ':',5,main]) completed. Took 0.008 secs.
:publishPluginJar (Thread[Execution worker for ':',5,main]) started.

> Task :publishPluginJar UP-TO-DATE
Skipping task ':publishPluginJar' as it is up-to-date.
:publishPluginJar (Thread[Execution worker for ':',5,main]) completed. Took 0.008 secs.
:javadoc (Thread[Execution worker for ':',5,main]) started.

> Task :javadoc NO-SOURCE
file or directory '/home/dev/siordache/badass-jlink-plugin/src/main/java', not found
Skipping task ':javadoc' as it has no source files and no previous output files.
:javadoc (Thread[Execution worker for ':',5,main]) completed. Took 0.007 secs.
:publishPluginJavaDocsJar (Thread[Execution worker for ':',5,main]) started.

> Task :publishPluginJavaDocsJar UP-TO-DATE
Skipping task ':publishPluginJavaDocsJar' as it is up-to-date.
:publishPluginJavaDocsJar (Thread[Execution worker for ':',5,main]) completed. Took 0.005 secs.
:publishPlugins (Thread[Execution worker for ':',5,main]) started.

> Task :publishPlugins FAILED
Task ':publishPlugins' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Publishing plugin org.beryx.jlink version 2.1.7
:publishPlugins (Thread[Execution worker for ':',5,main]) completed. Took 0.556 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':publishPlugins'.
> Failed to post to server.
  Server responded with:
  Plugin: 'org.beryx.jlink', version: '2.1.7' exists already. It was created: 2018-06-27 09:00:37.039

* Try:
Run with --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 ':publishPlugins'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:96)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:65)
        at org.gradle.api.internal.tasks.execution.ActionEventFiringTaskExecuter.execute(ActionEventFiringTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.TimeoutTaskExecuter.execute(TimeoutTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.SnapshotAfterExecutionTaskExecuter.execute(SnapshotAfterExecutionTaskExecuter.java:38)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:61)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:47)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:288)
        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: java.lang.RuntimeException: Failed to post to server.
Server responded with:
Plugin: 'org.beryx.jlink', version: '2.1.7' exists already. It was created: 2018-06-27 09:00:37.039
        at com.gradle.publish.ResponseUtil.assertValidResponse(ResponseUtil.java:17)
        at com.gradle.publish.OAuthHttpClient.send(OAuthHttpClient.java:78)
        at com.gradle.publish.PublishTask.doSignedPost(PublishTask.java:292)
        at com.gradle.publish.PublishTask.publishToPortal(PublishTask.java:175)
        at com.gradle.publish.PublishTask.publish(PublishTask.java:55)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        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$1.run(ExecuteActionsTaskExecuter.java:117)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:106)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:85)
        ... 33 more


* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.0-milestone-1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3s
9 actionable tasks: 1 executed, 8 up-to-date
Closing Git publish repo: /home/dev/siordache/badass-jlink-plugin/build/gitPublish