public Build()

in src/main/java/org/apache/maven/buildcache/xml/Build.java [53:75]


    public Build(
            List<String> goals,
            Artifact artifact,
            List<Artifact> attachedArtifacts,
            ProjectsInputInfo projectsInputInfo,
            List<CompletedExecution> completedExecutions,
            String hashAlgorithm) {
        this.dto = new org.apache.maven.buildcache.xml.build.Build();
        this.dto.setCacheImplementationVersion(MavenProjectInput.CACHE_IMPLEMENTATION_VERSION);
        this.dto.setBuildTime(new Date());
        try {
            this.dto.setBuildServer(InetAddress.getLocalHost().getCanonicalHostName());
        } catch (UnknownHostException ignore) {
            this.dto.setBuildServer("unknown");
        }
        this.dto.setHashFunction(hashAlgorithm);
        this.dto.setArtifact(artifact);
        this.dto.setGoals(goals);
        this.dto.setAttachedArtifacts(attachedArtifacts);
        this.dto.setExecutions(completedExecutions);
        this.dto.setProjectsInputInfo(projectsInputInfo);
        this.source = CacheSource.BUILD;
    }