All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.ackeecz.danger.dependenciescheck.model.xml.update.XmlOutdatedDependency.kt Maven / Gradle / Ivy

Go to download

Plugin for danger-kotlin for checking project dependencies (e.g. new available updates or vulnerabilities)

There is a newer version: 1.0.1
Show newest version
package io.github.ackeecz.danger.dependenciescheck.model.xml.update

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty
import io.github.ackeecz.danger.dependenciescheck.model.ArtifactId
import io.github.ackeecz.danger.dependenciescheck.model.DependencyName
import io.github.ackeecz.danger.dependenciescheck.model.GroupId
import io.github.ackeecz.danger.dependenciescheck.model.Version
import io.github.ackeecz.danger.dependenciescheck.model.update.OutdatedDependency

@JsonIgnoreProperties(ignoreUnknown = true)
internal data class XmlOutdatedDependency(
    @field:JacksonXmlProperty(localName = "group")
    val groupId: String,
    @field:JacksonXmlProperty(localName = "name")
    val artifactId: String,
    @field:JacksonXmlProperty(localName = "version")
    val currentVersion: String,
    @field:JacksonXmlProperty(localName = "available")
    val availableVersion: XmlAvailableVersion,
) {

    fun toOutdatedDependency() = OutdatedDependency(
        name = DependencyName(
            groupId = GroupId(groupId),
            artifactId = ArtifactId(artifactId),
            version = Version(currentVersion),
        ),
        newestAvailableVersion = Version(availableVersion.version),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy