-
Notifications
You must be signed in to change notification settings - Fork 698
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
Automatically creating a server called github
can cause surprising errors
#51
Comments
You can already override the Maven server ID with the action's Line 21 in b74d5a6
Line 10 in b74d5a6
My unscientific guess is, that this is the behavior helping the majority of all users and shouldn't be changed in order to avoid friction for the majority's use case. https://github.com/actions/setup-java#publishing-using-apache-maven |
What I don't understand it how a user would know that the following action will create a server called
I assumed this action would simply setup Java 1.8. Using a default server name if credentials are specified would be one thing, but creating a default server with blank credentials when no server or credentials are specified seems surprising! 😕 To put it another way, I don't understand how creating a creating a default server with blank credentials would help anyone. They won't be able to publish or consume packages using this server. |
@jcansdale As far as I understand the code, the Lines 44 to 60 in b74d5a6
The
https://github.com/actions/setup-java/runs/701460926?check_suite_focus=true#step:5:15
Since it's using credentials for the GitHub repository the |
@joschi ,
I wonder if this is working as intended? Here I change my server id to You can see this fails with:
Any idea what I'm doing wrong? 🤔 |
Related to #60 |
Automatic creation of |
I was setting up a Maven workflow. Everything worked fine locally and I was able to publish using
mvn deploy -D token=TOKEN
. When I added theactions/setup-java@v1
action, things mysteriously started to fail.It turned out it would work as long as my repository wasn't called
github
. You can see the workflow fails when I rename the repository/server fromfoobarbaz
togithub
:https://github.com/actions-packages-examples/maven-example/commit/b529abbd86131a0da8feb1a3404be5d93d4a63f3
If I user needs to consume any packages, they will need to create a server configuration for every repository they're consuming packages from. Having a server called
github
implicitly defined is likely to get in the way and cause confusion.Could we make it so that that
server-id
needs to be explicitly set and isn't automatically created?The text was updated successfully, but these errors were encountered: