project(xmlns = http://maven.apache.org/POM/4.0.0)
{
    modelVersion = 4.0.0
    groupId      = org.libxmq
    artifactId   = xmq
    version      = 0.1.3
    properties {
        project.build.sourceEncoding = UTF-8
        maven.compiler.source        = 17
        maven.compiler.target        = 17
    }
    name        = libxmq
    description = 'Library to work with xmq/xml/html/json.'
    url         = https://libxmq.org
    licenses {
        license {
            name = 'MIT License'
            url  = https://raw.githubusercontent.com/libxmq/xmq/refs/heads/master/LICENSE
        }
    }
    developers {
        developer {
            id    = weetmuts
            name  = 'Fredrik Öhrström'
            email = oehrstroem@gmail.com
        }
    }
    scm {
        connection          = scm:git:https://github.com/libxmq/xmq.git
        developerConnection = scm:git:https://github.com/libxmq/xmq.git
        url                 = https://github.com/libxmq/xmq
    }
    parent {
        groupId    = org.springframework.boot
        artifactId = spring-boot-starter-parent
        version    = 3.0.1
    }
    build {
        directory = build
        plugins {
            plugin {
                groupId    = org.codehaus.mojo
                artifactId = versions-maven-plugin
                version    = 2.16.2
            }
            plugin {
                groupId    = org.apache.maven.plugins
                artifactId = maven-compiler-plugin
                version    = 3.14.1
                configuration {
                    release = 17
                }
            }
            plugin {
                groupId    = org.springframework.boot
                artifactId = spring-boot-maven-plugin
                configuration {
                    mainClass  = org.libxmq.imp.Main
                    executable = false
                    classifier = exec
                }
            }
            // Attach sources
            plugin {
                groupId    = org.apache.maven.plugins
                artifactId = maven-source-plugin
                version    = 3.3.0
                executions {
                    execution {
                        id = attach-sources
                        goals {
                            goal = jar
                        }
                    }
                }
            }
            // Attach Javadocs
            plugin {
                groupId    = org.apache.maven.plugins
                artifactId = maven-javadoc-plugin
                version    = 3.6.0
                executions {
                    execution {
                        id = attach-javadocs
                        goals {
                            goal = jar
                        }
                    }
                }
                configuration {
                    // Fail build if Javadoc errors are found
                    failOnError = true
                    // Treat warnings as errors
                    additionalJOptions {
                        additionalJOption = -Xdoclint:all
                    }
                }
            }
            // Sign artifacts
            plugin {
                groupId    = org.apache.maven.plugins
                artifactId = maven-gpg-plugin
                version    = 3.2.4
                executions {
                    execution {
                        id    = sign-artifacts
                        phase = verify
                        goals {
                            goal = sign
                        }
                    }
                }
            }
            // Upload to Sonatype
            plugin {
                groupId    = org.sonatype.central
                artifactId = central-publishing-maven-plugin
                version    = 0.9.0
                extensions = true
                configuration {
                    publishingServerId = central
                }
            }
        }
    }
    dependencies {
        dependency {
            groupId    = org.eclipse.lsp4j
            artifactId = org.eclipse.lsp4j
            version    = 0.22.0
        }
        dependency {
            groupId    = ch.qos.logback
            artifactId = logback-classic
            version    = 1.2.3
        }
        dependency {
            groupId    = org.w3c
            artifactId = dom
            version    = 2.3.0-jaxb-1.0.6
        }
        // https://mvnrepository.com/artifact/javax.xml.parsers/jaxp-api
        dependency {
            groupId    = javax.xml.parsers
            artifactId = jaxp-api
            version    = 1.4.5
        }
        dependency {
            groupId    = javax.xml.bind
            artifactId = jaxb-api
            version    = 2.4.0-b180830.0359
        }
        dependency {
            groupId    = com.sun.xml.bind
            artifactId = jaxb-core
            version    = 4.0.6
        }
        dependency {
            groupId    = com.sun.xml.bind
            artifactId = jaxb-impl
            version    = 4.0.6
        }
        dependency {
            groupId    = junit
            artifactId = junit
            version    = 4.13.2
            scope      = test
        }
    }
    reporting {
        plugins {
            plugin {
                groupId    = org.apache.maven.plugins
                artifactId = maven-javadoc-plugin
                version    = 3.12.0
                configuration
            }
        }
    }
}