cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
432 stars 60 forks source link

The WAR filename contains `null` if version information is missing #456

Closed McPringle closed 6 years ago

McPringle commented 6 years ago

Example buildfile:

val foobar = project {
    name = "foobar"
    group = "test.foobar"
    artifactId = name

    dependencies {
        compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.50")
    }

    assemble {
        war {}
    }
}

Name of the file which was created: foobar-null.war

If a version number is optional, it should only be added to the filename if it was specified. I would never expect null in a filename. If the version number is required, then the build should fail with a useful error message.

In my opinion, the version number should be optional and not be part of the artifact filename if it was not specified. I would like to learn more about Kobalt and try to solve this problem. Let's see what you will say to my PR… ;-)

cbeust commented 6 years ago

Will happily accept a PR to fix this :)

McPringle commented 6 years ago

Works with Kobalt 1.0.91!