Howto force artifacts with empty version number with -D or -P arguments?

I try to generate .war files without version numbers. Can one use a command line arguments to force empty version number? something like: gradle -Dorg.gradle.project.version=null build gradle -Pproject.version=null build

Are you just trying to change the filename of the war?

If so, you could configure the war plugin

apply plugin: 'war'
war {
   archiveName = "${project.name}.war"
}

Well the idea is can if can we override the build.gradle settings via arguments (when building via Jenkins)?

war {
   if (System.properties.containsKey("archiveName")) {
      archiveName = System.getProperty("archiveName")
   }
}

gradle -ParchiveName=foo.war build

What is working with gradle 1.12:

if ( project.hasProperty("foo") && ("bar"==project.getProperty("foo")) ) {
        }
gradle -Pfoo=bar build