I would like to move the coordinates of the elasti...
# questions
u
I would like to move the coordinates of the elasticsearch-plugin from org.grails.plugins:elasticsearch to org.grails.plugins:grails-elasticsearch as it seems more in line with modern plugins and would make the artifact easier to find. Any opinions on that?
👍 1
j
Since it's our established pattern, and that project is in the grails-plugins org, I think ti's a reasonable change. I would move forward with it, but document it in the readme.
u
ok, I can document it, but need some help regarding the maven repo, the current publishing action gets a 401: https://github.com/grails-plugins/grails-elasticsearch/actions/runs/25110128941/job/73582474162
j
I can help you on my lunch break, but at the moment I'm tied up at work.
👌 1
@sbglasius do you have any time to help copy the secrets from something like grails-web-console into the elastic search?
s
I have time to do so later today, but what is weird, is that grails-web-console gets it's credentials from the org and so does grails-mail and others, and likewise grails-elasticsearch - so there shouldn't be an issue?
And they are identical
u
strange
u
I feel, that I am not able to help/resolve this issue
j
I can try to make this me once we get these releases staged
s
The only difference between https://github.com/grails-plugins/grails-elasticsearch/blob/5.0.x/.github/workflows/ci.yml and https://github.com/grails-plugins/grails-server-timing/blob/main/.github/workflows/ci.yml I can spot is that
server-timing
runs on ubuntu-24.04 and
elastisearch
is on ubuntu-22.04, and then I saw that in https://github.com/grails-plugins/grails-elasticsearch/blob/5.0.x/.github/workflows/ci.yml#L114 it uses
actions/setup-java@v4
vs
actions/setup-java@v5
The publish`Publish Gradle Artifacts` are identical
j
I assume it's the actual secrets ?
s
That's just weird, since they share the
grails-plugins
orgs secrets 🤔
j
oh
the issue is we had failed releases and we need to call that special api to remove them
you added some doc on the publish plugin about this
let me find it
s
but this is snapthot releases?
j
ah, was looking at the release one first
image.png
the wrong passwords are setup in the CI.yaml
it should be MAVEN_PUBLISH*
but htey're setup as NEXUS instead
s
Then why does it work grails-server-timing?
never mind. Oversight on my part.
👍 1
so it should be:
Copy code
- name: "📤 Publish Snapshot Artifacts"
        env:
          GRAILS_PUBLISH_RELEASE: 'false'
          MAVEN_PUBLISH_URL: '<https://central.sonatype.com/repository/maven-snapshots/>'
          MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
          MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
        run: >
          ./gradlew publish
          --no-build-cache
          --rerun-tasks
j
your secret references are wrong
you still have NEXUS_PUBLISH_USERNAME
the snapshot login is different than the official login
s
but MAVEN_PUBLISH_USERNAME is for the grails repo?
That snipped above is taken from
grails-server-timing
j
maybe i knew they were the same
let's give it a try
u
will try
u
Copy code
- name: "📤 Publish Gradle Snapshot Artifacts"
  env:
    GRAILS_PUBLISH_RELEASE: 'false'
    MAVEN_PUBLISH_URL: '<https://central.sonatype.com/repository/maven-snapshots/>'
    MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
    MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
  run: >
    ./gradlew publish
    --no-build-cache
    --rerun-tasks
still leads to 401, is the repo-url wrong or any other ideas? The error message is:
Copy code
* What went wrong:
Execution failed for task ':grails-elasticsearch:publishMavenPublicationToMavenRepository'.
> Failed to publish publication 'maven' to repository 'maven'
   > Could not PUT '<https://central.sonatype.com/repository/maven-snapshots/org/grails/plugins/grails-elasticsearch/5.0.0-SNAPSHOT/grails-elasticsearch-5.0.0-20260430.142620-1.jar>'. Received status code 401 from server: Unauthorized
j
i wonder if the account got locked