Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event: Failed: Profile target matcher or Staging repository is not in desired state #261

Open
duraivelBP90 opened this issue Aug 17, 2023 · 18 comments

Comments

@duraivelBP90
Copy link

Hi, I'm trying to close the repository and release it, where I;m getting this error "Event: Failed: Profile target matcher - profile-target-matching-staging"

Nexus repository manager : staging profiles screenshot
Screenshot 2023-08-17 at 8 18 33 AM

Nexus staging repository error screenshot
Screenshot 2023-08-16 at 4 14 58 PM

Screenshot while I;m run in the terminal,
Screenshot 2023-08-16 at 5 51 10 PM

@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

It seems those files doesn't correspond to the group you are permitted to publish to. See also https://issues.sonatype.org/browse/OSSRH-70341 or https://issues.sonatype.org/browse/OSSRH-48197 . You need to fix JAR building (you can examine the generated package with gw build and looking into build/libs directory, without publishing).

Btw, it is completely not related to the plugin.

@duraivelBP90
Copy link
Author

My GroupID is : com.oustme

And I can able to see that in the staging repositories and while build the app, I;m added the group as com.oustme

So, I;m not sure what is the issue with the group?

@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

Those files (paths) looks strange. Do you really need them in the archive? Have you been able to publish the project manually in the past?

@duraivelBP90
Copy link
Author

duraivelBP90 commented Aug 17, 2023

No, this is my first release to maven, I have followed the steps mentioned in this document : https://central.sonatype.org/publish/publish-guide/

And also I have followed this steps as well :
https://github.com/gradle-nexus/publish-plugin

@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

I propose to run gw build (or ./gradlew build), examine the produced JAR and think what would you like to publish. What is 34858478c42fac? IS that directory available in your JAR?

@duraivelBP90
Copy link
Author

Hi, I will run the above command, in the mean time, the 34858478c42fac is the staging repository available in the nexus repository manager.

Have a look at this screenshot :
Screenshot 2023-08-17 at 2 33 01 PM

@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

After ./gradlew build please take a look into the JAR in: build/libs. What files/directories are included there?

@duraivelBP90
Copy link
Author

Hi, in the generated jar file, contains path of com/oustme/oustsdk

Where, I can able to see all the contents,

Screenshot 2023-08-17 at 3 45 34 PM

@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

If those paths:
image

are not available in your JAR, then I don't know why Nexus complains about them. This plugin - in general - only works with a staging repository in Nexus - artifact build and uploading is done outside (by the maven-publish plugin & co).

You can try to publish your JAR manually without this plugin to verify it. You can also repo it in Sonatype's Jira, but first, I would recommend check if those path aren't somehow published there.

Btw, what Gradle version do you use? In the past, there is a problem with sha256 and sha512 checksums in Nexus. However, it was years ago.

@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

Btw, I wonder if outsSDK instrad of outssdk might also be a problem?

@duraivelBP90
Copy link
Author

I have tried with small case : oustsdk, but still the build is failing with the same error.
Screenshot 2023-08-17 at 4 44 59 PM

And, I;m using the following things,
The Gradle version : gradle-7.4.2
SHA : when I create the public key by using 4096

@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

Profile target mismatch - https://issues.sonatype.org/browse/OSSRH-65994?focusedId=1032285&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1032285 ?

Maybe you have problem with the group ID? You can try to publish artifacts to Nexus (just publish, without using the staging repository features) and see what files are uploaded and with what path. /34858478c42fac/ - as I already mentioned -l ooks strange.

@duraivelBP90
Copy link
Author

Hi, thanks for the info, the same I found after I sent you the earlier comment. I was suppose to use com.oustme not the artefact id.

And, I can able to close the staging repository, but I;m getting this error while releasing it. Eventhough I can't able to see the build comoustme-1008 in the nexus repository manager.

"Releasing staging repository with id 'comoustme-1008'
Current staging repository status: state: closed, transitioning: true
Attempt 1/61 failed with result: StagingRepository(id=comoustme-1008, state=closed, transitioning=true)
Current staging repository status: state: closed, transitioning: true
Attempt 2/61 failed with result: StagingRepository(id=comoustme-1008, state=closed, transitioning=true)

Expiring Daemon because JVM heap space is exhausted
Daemon will be stopped at the end of the build after running out of JVM memory
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted
Exception in thread "Thread-399" java.lang.OutOfMemoryError: Java heap space
at io.github.gradlenexus.publishplugin.shadow.okhttp3.internal.http2.Http2Connection.close(Http2Connection.java:481)
at io.github.gradlenexus.publishplugin.shadow.okhttp3.internal.http2.Http2Connection$ReaderRunnable.execute(Http2Connection.java:677)
at io.github.gradlenexus.publishplugin.shadow.okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.base/java.lang.Thread.run(Thread.java:1589)

Task :releaseSonatypeStagingRepository
Current staging repository status: state: not_found, transitioning: false
Repository with id 'comoustme-1008' effectively released
:releaseSonatypeStagingRepository (Thread[#543,included builds,5,main]) completed. Took 6 mins 34.473 secs.
:closeAndReleaseSonatypeStagingRepository (Thread[#547,Execution worker for ':' Thread 4,5,main]) started.

Task :closeAndReleaseSonatypeStagingRepository
Skipping task ':closeAndReleaseSonatypeStagingRepository' as it has no actions.
:closeAndReleaseSonatypeStagingRepository (Thread[#547,Execution worker for ':' Thread 4,5,main]) completed. Took 0.006 secs.
producer locations for task group 0 (Thread[#547,Execution worker for ':' Thread 4,5,main]) started.
producer locations for task group 0 (Thread[#547,Execution worker for ':' Thread 4,5,main]) completed. Took 0.0 secs.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 8m 50s
35 actionable tasks: 7 executed, 28 up-to-date
Watched directory hierarchies: [/Users/duraivel/AndroidStudioProjects/oustSDK]
Expiring Daemon because JVM heap space is exhausted
"

Attaching the screenshot for this,
Screenshot 2023-08-17 at 5 14 04 PM

@duraivelBP90
Copy link
Author

duraivelBP90 commented Aug 17, 2023

Now I;m getting this error, can you please help me with it

Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/oustme/oustsdk/2.10.1.14/oustsdk-2.10.1.14.aar'

Screenshot 2023-08-17 at 5 42 54 PM

@duraivelBP90
Copy link
Author

Thanks for the prompt response, now I can able to successfully release the build

@duraivelBP90 duraivelBP90 changed the title Event: Failed: Profile target matcher or Staging repository is not in desired state [closed] Event: Failed: Profile target matcher or Staging repository is not in desired state Aug 17, 2023
@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/oustme/oustsdk/2.10.1.14/oustsdk-2.10.1.14.aar'

Probably you wanted to release the same version twice or re-uploaded the same artifacts twice to the same staging repository.

@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

Exception in thread "Thread-399" java.lang.OutOfMemoryError: Java heap space
at io.github.gradlenexus.publishplugin.shadow.okhttp3.internal.http2.Http2Connection.close(Http2Connection.java:481)

Probably you could stop the Gradle deamon gw --stop and try again

@szpak
Copy link
Contributor

szpak commented Aug 17, 2023

Thanks for the prompt response, now I can able to successfully release the build

Cool, I could read all the messages before answering :).

Btw, you could write what was the problem(s) in your case, for people hitting this issue from the web search engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants