I am trying to change the name and the version setting when running the publish command? Here is my workflow.
I have written a custom input task. It is called with a three arguments name, buildNumber and exportLocation. We work with game and name is the name of a specific game. buildNumber is the changelist id of the game build in Perforce. exportLocation is a file path that contains a bunch of XML files that the Perforce build has output. My task parses the XML files, creates an in-memory object tree and serializes the tree into resourceManaged. In other words it will generate a bunch of resources.
My ultimate goal is to bundle those resources inside a jar-file that uses name and buildNumber in it's name and publish the artifact to our internal repository.