aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/maven/ArtifactId.java
blob: 4452dda26962f5a2e076418b21c7e99c81a782a6 (plain) (blame)
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
28
29
30
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.maven;

import static java.util.Objects.requireNonNull;

/**
 * Identifier for an artifact.
 *
 * @author jonmv
 */
public class ArtifactId {

    private final String groupId;
    private final String artifactId;

    public ArtifactId(String groupId, String artifactId) {
        this.groupId = requireNonNull(groupId);
        this.artifactId = requireNonNull(artifactId);
    }

    /** Group ID of this. */
    public String groupId() { return groupId; }

    /** Artifact ID of this. */
    public String artifactId() { return artifactId; }

    @Override
    public String toString() { return groupId + "." + artifactId; }

}