Do not rely on the subtle difference between an empty string or null to document optional and mandatory values. This is confusing. The defaults here should reflect the plugin's defaults which are "not set" and in that case empty string and null make no difference.

Use preconditions to enforce mandatory values or change the design so that the feature could not be misused. E.g. you can change the `artifact(Closure closure)` to `artifact(String gav, String targetFileName)` where gav is a `groupId:artifactId:version:classifier@extension` string as used in Gradle for example.

Isn't extension optional as well?