android lib upload on bintray - bintray

What went wrong:
Execution failed for task ':mylib:bintrayUpload'.
Could not create package 'username/maven/mylib': HTTP/1.1 404 Not Found [message:Repo 'maven' was not found]

Related

Getting error building a gradle project: An exception occurred applying plugin request [id: 'org.jetbrains.intellij', version: '1.5.2']

I am getting the next error message when I build a gradle project (gradle build):
An exception occurred applying plugin request [id: 'org.jetbrains.intellij', version: '1.5.2']
> Failed to apply plugin [id 'org.jetbrains.intellij']
> Could not create an instance of type org.jetbrains.intellij.utils.ArchiveUtils.
> Could not generate a decorated class for type ArchiveUtils.
> org/gradle/api/file/ArchiveOperations
My plugin section looks like this:
plugins {
id 'org.jetbrains.intellij' version '1.5.2'
id 'jacoco'
id 'groovy'
id 'signing'
id 'maven-publish'
}
I am using java version 11 and gradle 7.6. Not sure at this moment what is happening. I didn't find enough info regarding this error.
Any ideas?
Thanks!

Failed to apply plugin class 'nebula.plugin.release.ReleasePlugin'

Trying to build micrometer version 1.5.9.
Getting following error:-
Where:
Build file '/Users/abc/Desktop/micrometer/build.gradle' line: 29
What went wrong:
A problem occurred evaluating root project 'micrometer'.
Failed to apply plugin class 'nebula.plugin.release.ReleasePlugin'.
/Users/abc/Desktop/micrometer/config (Is a directory)
build.gradle
Line# 29 apply plugin: 'io.spring.release'
classpath 'io.spring.gradle:spring-release-plugin:0.20.1'
classpath 'com.netflix.nebula:nebula-project-plugin:3.4.0'
Any lead, what exactly is wrong here?
Thanks

Gradle 6.1 isn't finding the com.moowork.gulp plugin

Upgrading from Gradle 4.0 to 6.1, the com.moowork.glup plugin seems to have vanished. Yet, the https://plugins.gradle.org/plugin/com.moowork.gulp page show that the plugin does exist. The sample code works with the com.moowork.gulp line commented out.
plugins {
id 'java'
id 'maven'
id "com.moowork.gulp" version "1.3.0"
id "nebula.ospackage" version "8.0.3"
}
task testAgain {
println 'Configuration stage'
doLast {
println 'Execution stage'
}
}
Once the offending line is uncommented, the Gradle example fails.
$ ./gradlew -q testAgain
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'example'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find com.moowork.gradle:gradle-node-plugin:1.3.0.
Searched in the following locations:
- https://plugins.gradle.org/m2/com/moowork/gradle/gradle-node-plugin/1.3.0/gradle-node-plugin-1.3.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.moowork.gulp:com.moowork.gulp.gradle.plugin:1.3.0
[...]
BUILD FAILED in 1s
What am I missing?

Gradle publish RPM to Nexus Yum Repo fails on sha1 file

I am trying to publish an RPM artifact from our project into a Yum Repo on Nexus via Gradle:
publishing {
repositories {
ivy {
url 'http://myrepo:8081/repository/myproject'
credentials {
username "aaa"
password "xxx"
}
layout "pattern", {
artifact "${buildRpm.outputs.getFiles().getSingleFile().getName()}"
}
}
publications {
rpm(IvyPublication) {
artifact buildRpm.outputs.getFiles().getSingleFile()
}
}
}
}
When I run ./gradlew publish this task gets picked up and starts to upload the main .rpm artifact of 90MB. It then fails after this with the following error:
> Task :search:publishRpmPublicationToIvyRepository FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':search:publishRpmPublicationToIvyRepository'.
> Failed to publish publication 'rpm' to repository 'ivy'
> Could not write to resource 'http://myrepo/repository/myproject/myproject-1.23.4.noarch.rpm.sha1'.
> Could not PUT 'http://myrepo/repository/myproject/myproject-1.23.4.noarch.rpm.sha1'. Received status code 400 from server: Invalid path for a Yum repository
How can I prevent the .sha1 file to be uploaded? I only want the RPM to be uploaded (which is apparently the only thing allowed on this repo).
I also tried using maven-publish instead of ivy-publish but both give similar issues. maven-publish tries to upload a .pom with a similar failure.
I am able to upload the RPM fine manually using curl, but I would rather do it using Gradle plugins and standards.

How to publish to artifactory multimodule proj using gradle and spring-boot

I am using gradle 2.7
I am trying to publish one of my sub-modules into artifactory:
part of my sub modules being upload to snapshort and part of them into release.
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'
// Since spring-boot does not allow us to configure fat jar name...
task buildForCloud(type: Copy, dependsOn: [clean, build]) {
from jar.archivePath
into jar.destinationDir
rename {
'com.company.myapp-all.jar'
}
}
//this module being uploaded into release and as soon as I added this //part I am getting errors
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
}
buildForCloud.mustRunAfter(clean)
running this way:
./gradlew clean buildForCloud publishMavenJavaPublicationToMaven2Repository
the error:
* What went wrong:
Execution failed for task ':server:publishMavenJavaPublicationToMaven2Repository'.
> Failed to publish publication 'mavenJava' to repository 'maven2'
> Unable to initialize POM pom-default.xml: Failed to validate POM for project com.mycompany.app:server at /Users/mycomp/IdeaProjects/user-service/server/build/publications/mavenJava/pom-default.xml
Any idea?
Added the gradle log request:
Executing task ':server:sourceJar' (up-to-date check took 0.005 secs) due to:
Output file /Users/comp/IdeaProjects/user-service/server/build/libs/server-1.1-SNAPSHOT-sources.jar has changed.
Output file /Users/comp/IdeaProjects/user-service/server/build/libs/server-1.1-SNAPSHOT-sources.jar has been removed.
:server:sourceJar (Thread[main,5,main]) completed. Took 0.025 secs.
:server:publishMavenJavaPublicationToMaven2Repository (Thread[main,5,main]) started.
:server:publishMavenJavaPublicationToMaven2Repository
Executing task ':server:publishMavenJavaPublicationToMaven2Repository' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Publishing to repository org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository_Decorated#3c888166
[ant:null] An error has occurred while processing the Maven artifact tasks.
Diagnosis:
Unable to initialize POM pom-default.xml: Failed to validate POM for project com.mycompany.userservice:server at /Users/comp/IdeaProjects/user-service/server/build/publications/mavenJava/pom-default.xml
:server:publishMavenJavaPublicationToMaven2Repository FAILED
:server:publishMavenJavaPublicationToMaven2Repository (Thread[main,5,main]) completed. Took 0.029 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':server:publishMavenJavaPublicationToMaven2Repository'.
> Failed to publish publication 'mavenJava' to repository 'maven2'
> Unable to initialize POM pom-default.xml: Failed to validate POM for project com.mycompany.userservice:server at /Users/comp/IdeaProjects/user-service/server/build/publications/mavenJava/pom-default.xml
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 52.274 secs
Stopped 0 compiler daemon(s).
comps-MacBook-Pro-2:user-service comp$ ./gradlew clean buildForCloud -x test publishMavenJavaPublicationToMaven2Repository -i -

Resources