2022-03-30 10:42:47 +02:00
|
|
|
{{if eq .PackageDescriptor.Package.Type "maven"}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
|
2022-03-30 10:42:47 +02:00
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="ui form">
|
|
|
|
<div class="field">
|
2024-02-22 18:02:33 +01:00
|
|
|
<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.maven.registry"}}</label>
|
2022-03-30 10:42:47 +02:00
|
|
|
<div class="markup"><pre class="code-block"><code><repositories>
|
|
|
|
<repository>
|
|
|
|
<id>gitea</id>
|
2024-03-15 03:05:31 +01:00
|
|
|
<url><origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url></url>
|
2022-03-30 10:42:47 +02:00
|
|
|
</repository>
|
|
|
|
</repositories>
|
|
|
|
|
|
|
|
<distributionManagement>
|
|
|
|
<repository>
|
|
|
|
<id>gitea</id>
|
2024-03-15 03:05:31 +01:00
|
|
|
<url><origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url></url>
|
2022-03-30 10:42:47 +02:00
|
|
|
</repository>
|
|
|
|
|
|
|
|
<snapshotRepository>
|
|
|
|
<id>gitea</id>
|
2024-03-15 03:05:31 +01:00
|
|
|
<url><origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></origin-url></url>
|
2022-03-30 10:42:47 +02:00
|
|
|
</snapshotRepository>
|
|
|
|
</distributionManagement></code></pre></div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2024-02-22 18:02:33 +01:00
|
|
|
<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.maven.install"}}</label>
|
2022-03-30 10:42:47 +02:00
|
|
|
<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">
|
2023-09-25 10:56:50 +02:00
|
|
|
<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.maven.install2"}}</label>
|
2022-03-30 10:42:47 +02:00
|
|
|
<div class="markup"><pre class="code-block"><code>mvn install</code></pre></div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 10:56:50 +02:00
|
|
|
<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.maven.download"}}</label>
|
2024-03-15 03:05:31 +01:00
|
|
|
<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>
|
2022-03-30 10:42:47 +02:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2024-02-22 18:02:33 +01:00
|
|
|
<label>{{ctx.Locale.Tr "packages.registry.documentation" "Maven" "https://forgejo.org/docs/latest/user/packages/maven/"}}</label>
|
2022-03-30 10:42:47 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{if .PackageDescriptor.Metadata.Description}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
|
2022-03-30 10:42:47 +02:00
|
|
|
<div class="ui attached segment">
|
|
|
|
{{.PackageDescriptor.Metadata.Description}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .PackageDescriptor.Metadata.Dependencies}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
|
2022-03-30 10:42:47 +02:00
|
|
|
<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}}
|