summaryrefslogtreecommitdiff
path: root/qa/qa/fixtures/package_managers/maven/build_upload.gradle.erb
blob: c14e63e11df81b7d2df01299c682c699a401e2e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
plugins {
    id 'java'
    id 'maven-publish'
}

publishing {
    publications {
        library(MavenPublication) {
            groupId '<%= group_id %>'
            artifactId '<%= artifact_id %>'
            version '<%= package_version %>'
            from components.java
        }
    }
    repositories {
        maven {
            url "<%= gitlab_address_with_port %>/api/v4/projects/<%= package_project.id %>/packages/maven"
            credentials(HttpHeaderCredentials) {
                name = "Private-Token"
                value = "<%= personal_access_token %>"
            }
            authentication {
                header(HttpHeaderAuthentication)
            }
        }
    }
}