code: function pluginDeploy(config) {
  
    program
      .version(require('../package.json').version)
      .option('--release', 'should deploy artefact as release')
      .description('Deploys grails plugin to maven repository');
  
    program.on('--help', function () {
      console.log(' for examples:');
      console.log('');
      console.log('   grails-plugin-deploy');
      console.log('   grails-plugin-deploy --release');
      console.log('');
    });
  
    program.parse(process.argv);
  
    var projectPath = process.cwd();
  
    var repositories = retrieveRepositoriesInfo();
  
    var project = require(path.join(projectPath, 'package.json'));
    var buildDir = project.grails.buildDir || 'build';
    var filePath = path.join(path.join(projectPath, buildDir), config.fileName);
    var name = project.name.replace(/@\w+\//, '');
    var artefactId = project.grails.artefactId || name;
    var groupId = project.grails.groupId || config.groupId;
    var version = program.release ? project.version : `${project.version}-SNAPSHOT`;
  
    var targetRepository = program.release ? repositories.releases : repositories.snapshots;
  
    console.log(`deploying grails plugin ${program.release ? 'release' : 'snapshot'} version ${version}`);
  
    var cmdFile = 'mvn';
  
    if (/^win/.test(process.platform)) {
      cmdFile = 'mvn.cmd';
    }
  
    var result = spawnSync(cmdFile,
      ['-B', '-e', 'deploy:deploy-file', `-Dfile=${filePath}`,
        `-Durl=${targetRepository.url}`, `-DrepositoryId=${targetRepository.id}`,
        '-DgroupId=' + groupId, `-DartifactId=${artefactId}`,
        `-Dversion=${version}`, '-Dpackaging=' + config.packaging]
    );
  
    if (result.error) {
      if (result.error.code === 'ENOENT') {
        console.error(`${cmdFile}: command is not found`);
      } else {
        console.error(stdout);
        console.error(stderr);
      }
      process.exit(1);
    } else {
      console.log(result.stdout.toString('utf8'));
    }
  
  }
docs: config = { groupId packaging fileName }