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

Update Maven deploy docs #20691

Merged
merged 2 commits into from Aug 7, 2022
Merged

Conversation

KN4CK3R
Copy link
Member

@KN4CK3R KN4CK3R commented Aug 6, 2022

fixes #20666

@KN4CK3R KN4CK3R added type/docs This PR mainly updates/creates documentation topic/packages labels Aug 6, 2022
@KN4CK3R KN4CK3R added this to the 1.18.0 milestone Aug 6, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Aug 6, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 7, 2022
If you want to publish a prebuild package to the registry, you can use [`mvn deploy:deploy-file`](https://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html):

```shell
mvn deploy:deploy-file -Durl=https://gitea.example.com/api/packages/{owner}/maven -DrepositoryId=gitea -Dfile=/path/to/package.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mvn deploy:deploy-file -Durl=https://gitea.example.com/api/packages/{owner}/maven -DrepositoryId=gitea -Dfile=/path/to/package.jar
mvn deploy:deploy-file -Durl=$GITEA_URL/api/packages/$OWNER/maven -DrepositoryId=gitea -Dfile=$PATH_TO_PACKAGE.jar

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the parameters get changed here we need to change them in all package docs.

I have no real preference how it should look like.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me neither, I simply thought that would be more fitting given that you use it in a fenced shell block, and hence the variables would be highlighted correctly.
However, I'd still add the URL and the PACKAGE_LOCATION as variables, because you have to look at the command right now to see that those need to be replaced as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all code blocks are shell blocks but I may add another PR which changes the URLs for a placeholder.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ps: there are a lot of "example.com" in docs, so maybe there should be some guideline about how to write documents with example URLs.

Comment on lines +90 to +92
| Parameter | Description |
| -------------- | ----------- |
| `owner` | The owner of the package. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Parameter | Description |
| -------------- | ----------- |
| `owner` | The owner of the package. |
| Parameter | Description |
| -------------- | ----------- |
| `GITEA_URL` | The URL of the Gitea instance (i.e. `https://gitea.example.com`)|
| `OWNER` | The owner of the package. |
| `PATH_TO_PACKAGE` | The path where the jar is located |

@wxiaoguang wxiaoguang merged commit 64c371a into go-gitea:main Aug 7, 2022
@KN4CK3R KN4CK3R deleted the docs-maven-deploy-file branch August 7, 2022 14:04
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 8, 2022
* giteaofficial/main: (23 commits)
  [skip ci] Updated translations via Crowdin
  Fix v220 migration to be compatible for MSSQL 2008 r2 (go-gitea#20702)
  Rework repo buttons (go-gitea#20602)
  Switch to building with go1.19 (go-gitea#20695)
  Update maven deploy docs (go-gitea#20691)
  Add support for Pub packages (go-gitea#20560)
  Fix typo overrided -> overridden (go-gitea#20687)
  [skip ci] Updated licenses and gitignores
  Update JS dependencies, adjust eslint (go-gitea#20659)
  Background color of private list-items updated (go-gitea#20630)
  Use request timeout for git service rpc (go-gitea#20689)
  Increase default item listing size `ISSUE_PAGING_NUM` to 20 (go-gitea#20547)
  [skip ci] Updated translations via Crowdin
  Allow multiple metadata files for Maven packages (go-gitea#20674)
  docs: update comparison.zh-cn.md (go-gitea#20656)
  Add a notice for breaking check in upgrade document (go-gitea#20682)
  move handleGlobalEnterQuickSubmit into a separate file to avoid cycle-import (go-gitea#20679)
  Use correct field name. (go-gitea#20675)
  [skip ci] Updated translations via Crowdin
  Use correct context to get package content (go-gitea#20673)
  ...

# Conflicts:
#	templates/repo/wiki/view.tmpl
vsysoev pushed a commit to IntegraSDL/gitea that referenced this pull request Aug 10, 2022
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/packages type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maven Packages Repository: deploy:deploy-file
6 participants