diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-10-11 10:27:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-10-11 10:27:00 +0000 |
commit | 65aa53fc52ff15efe54df4147564828d535837f8 (patch) | |
tree | 31c51dad04fdcca80e6d3043c8bd49d2f1a51f83 /templates/package/content/maven.tmpl | |
parent | Initial commit. (diff) | |
download | forgejo-debian.tar.xz forgejo-debian.zip |
Adding upstream version 8.0.3.HEADupstream/8.0.3upstreamdebian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'templates/package/content/maven.tmpl')
-rw-r--r-- | templates/package/content/maven.tmpl | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/templates/package/content/maven.tmpl b/templates/package/content/maven.tmpl new file mode 100644 index 00000000..7f7e3faf --- /dev/null +++ b/templates/package/content/maven.tmpl @@ -0,0 +1,75 @@ +{{if eq .PackageDescriptor.Package.Type "maven"}} + <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4> + <div class="ui attached segment"> + <div class="ui form"> + <div class="field"> + <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.maven.registry"}}</label> + <div class="markup"><pre class="code-block"><code><repositories> + <repository> + <id>gitea</id> + <url><origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url></url> + </repository> +</repositories> + +<distributionManagement> + <repository> + <id>gitea</id> + <url><origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url></url> + </repository> + + <snapshotRepository> + <id>gitea</id> + <url><origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url></url> + </snapshotRepository> +</distributionManagement></code></pre></div> + </div> + {{if .PackageDescriptor.Metadata}} + <div class="field"> + <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.maven.install"}}</label> + <div class="markup"><pre class="code-block"><code><dependency> + <groupId>{{.PackageDescriptor.Metadata.GroupID}}</groupId> + <artifactId>{{.PackageDescriptor.Metadata.ArtifactID}}</artifactId> + <version>{{.PackageDescriptor.Version.Version}}</version> +</dependency></code></pre></div> + </div> + <div class="field"> + <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.maven.install2"}}</label> + <div class="markup"><pre class="code-block"><code>mvn install</code></pre></div> + </div> + <div class="field"> + <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.maven.download"}}</label> + <div class="markup"><pre class="code-block"><code>mvn dependency:get -DremoteRepositories=<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url> -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}</code></pre></div> + </div> + <div class="field"> + <label>{{ctx.Locale.Tr "packages.registry.documentation" "Maven" "https://forgejo.org/docs/latest/user/packages/maven/"}}</label> + </div> + {{end}} + </div> + </div> + + {{if .PackageDescriptor.Metadata}} + {{if .PackageDescriptor.Metadata.Description}} + <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4> + <div class="ui attached segment"> + {{.PackageDescriptor.Metadata.Description}} + </div> + {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} + <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4> + <div class="ui attached segment"> + <div class="ui list"> + {{range .PackageDescriptor.Metadata.Dependencies}} + <div class="item"> + <i class="icon">{{svg "octicon-package-dependencies" 16 ""}}</i> + <div class="content"> + <div class="header">{{.GroupID}}:{{.ArtifactID}}</div> + <div class="description text small">{{.Version}}</div> + </div> + </div> + {{end}} + </div> + </div> + {{end}} + {{end}} +{{end}} |