I get the below error when I use the gradle publish task,
Execution failed for task ‘:publishMavenJavaPublicationToMavenRepository’. Failed to publish publication ‘mavenJava’ to repository ‘maven’
Invalid publication ‘mavenJava’: groupId cannot be empty
To resolve this I need to specify the group id in the project though it had already been specified in settigns.gradle for all subprojects. Also - only certain projects report this error . Someprojects are able to get the group defined in the parent settings.gradle
It works fine if i use the old upload task. I am using gradle 1.10
Few observation :
The issue actually happens when i add apply plugin:‘java’ to init.gradle ( This is needed for the publishing task ) . If I remove the apply plugin:‘java’ and use the normal upload task - it works fine.
Let me know if somebody had faced this issue and found a solution.