Failed to publish publication 'mavenJava' to repository 'maven' - gradle

I am trying to upload a library to mavencentral for the first time. I get to build and run some tasks from maven-publish gradle plugin. But, On publish task, I get below error.
* What went wrong:
Execution failed for task ':publishMavenJavaPublicationToMavenRepository'.
> Failed to publish publication 'mavenJava' to repository 'maven'
> Could not write to resource 'https://oss.sonatype.org/service/local/staging/deploy/maven2/dev/spiti/utilities/data-reader/1.0.0/data-reader-1.0.0.jar'.
> Read timed out
Also, I tried the solution from here Gradle build configured signatory to complete :signArchives. Cmd ./gradlew assemble -x signArchives runs successfully but issue seem to persist.
Can someone guide me thru how to overcome this.

Related

Could not resolve all files for configuration ':_:detachedConfiguration1' when using node plugin on gradle kotlin dsl

I'm trying to integrate Java and npm Builds Using Gradle Kotlin DSL.
I was going through the example dzone article and github example code.
I'm in npm-app project folder and running the command gradle npm_run_build.
$ gradle npm_run_build
Task :npm-app:nodeSetup FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':npm-app:nodeSetup'.
Could not resolve all files for configuration ':npm-app:detachedConfiguration1'.
Could not find org.nodejs:node:10.14.1.
Searched in the following locations:
- https://nodejs.org/dist/v10.14.1/ivy.xml
Required by:
project :npm-app
BUILD FAILED in 810ms
1 actionable task: 1 executed
How can I fix this error?
try switching your node plugin:
plugins {
id "com.github.node-gradle.node" version "1.5.3"
}

Failed to capture snapshot of input files for task

I am newbee to Groovy, Gradle, IntelliJ IDEA, Gradle Plugin Development.
Whenever I click on the publishToMavenLocal, I am getting the following error,
Task :compileGroovy FAILED
FAILURE: Build failed with an exception.
What went wrong: Failed to capture snapshot of input files for task ':compileGroovy' property 'classpath' during up-to-date check. >
Failed to create MD5 hash for file content. Deprecated Gradle features
were used in this build, making it incompatible with Gradle 5.0. BUILD
FAILED in 11s 2 actionable tasks: 2 executed Data error (cyclic
redundancy check)
Can anyone help me resolve this ? This is a pure Gradle plugin developed using Groovy.

Trouble downloading my published files on Bintray from JCenter

I'm developing a very basic Gradle plugin (mainly to get experience) and I've published a version to my Bintray repository which should be viewable here.
I've linked my repository to JCenter (and can find my plugin here) and now, to test it all works, I'm trying to download those artifacts from a Gradle build script and apply my plugin to a mock project:
apply plugin: 'semver'
apply plugin: 'java'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.tagc:semver-plugin:0.1.0'
}
}
semver {
versionFilePath = 'version.properties'
}
However, Gradle can't resolve that dependency and throws this exception:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'TestSemver'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find com.github.tagc:semver-plugin:0.1.0.
Searched in the following locations:
https://jcenter.bintray.com/com/github/tagc/semver-plugin/0.1.0/semver-plugin-0.1.0.pom
https://jcenter.bintray.com/com/github/tagc/semver-plugin/0.1.0/semver-plugin-0.1.0.jar
Required by:
:TestSemver:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.703 secs
This is because JCenter doesn't seem to be hosting my files (under com/github/tagc). I'm not sure why this is the case. After getting a confirmation that my repository is linked with JCenter, are there any additional steps I need to take to make it host my uploaded files so that I can access them in the way shown in the build script? Or is just that it takes some time for the files to appear on JCenter? It's been about 5 hours since my repository was linked to JCenter.
Any help or advice would be appreciated.
It turns out that I just needed to be patient and let JCenter update. It's on there now, and my build script runs fine.
Considering that it takes a fair amount of time to update (~12 hours for me), I think that the user experience might be improved by letting first-time users know that there's a lengthy update process and that they haven't simply missed a step. This would remove some of the anxiety of wondering "Have I missed a step, and if so will I be waiting forever?"
Other than that, the Bintray UX is absolutely wonderful.

Gradle publishing error to maven; uploadArchives

I want to publish my library github to maven central, trying to push it with gradle uploadArchives
I always get the same error, i've almost search everywhere but there is no clear explanation to host your library in maven central.
Error is;
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':library:androidJavadocs'.
Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): 'C:\DynamicLayout-master\DynamicLayout-master\library\build\tmp\androidJavadocs\javadoc.options'
the log of terminal is here: http://pastebin.com/gKU2Kkpt
this is the lib that i try to publish it; https://github.com/Swisyn/DynamicLayout/tree/master

Properties file path was not found! (Relevant only for builds running on a CI Server)

I get the following message from gradle when I run a 'gradle build' with Artifactory configured.
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
It starts appearing when I include the following line in my build.gradle:
apply plugin: 'com.jfrog.artifactory'
I would like to know what it exactly means and what to do about it, but I cannot find anything anywhere about it.
Gradle integration with Artifactory can be achieved by using the Gradle Artifactory Plugin or alternatively from a CI server (Jenkims, Bamboo or TeamCity), by using the relevant Artifactory Plugin for the CI server.
All Artifactory Plugins for the CI servers share the same code with the Gradle Artifactory Plugin to integrate with Artifactory.
The warning message you're getting is relevant only in case the build is running on a CI server. If it is not, this message is not an indication of a problem and it should be ignored. To avoid confusion, in the next release this message type will be changed to info instead of warning.
As for the actual meaning of this message, here's a short description:
The Artifactory Plugins for CI servers use a property file to pass
information to the build tool process (Gradle for example). The Gradle
Artifactory Plugin code (running as part of the Gradle process) uses
the data of in the file for artifact resolution and deployment from/to
Artifactory, as well as deployment for the build information to
Artifactory.
Using the Gradle Artifactory Plugin directly from your build script does not use or require this properties file and that's why you're seeing this message.

Resources