grunt-maven-tasks icon indicating copy to clipboard operation
grunt-maven-tasks copied to clipboard

Artifact isn't built from the released version

Open apryce opened this issue 9 years ago • 0 comments

The artifact used is based off the starting commit, not the released commit. For instance if you are releasing 1.1.0 and have a file that uses the "replace" grunt plugin to copy in the version, it will copy the '1.1.0-SNAPSHOT' from the package.json. The build is run before the version is bumped.

The following (line 124 of maven_tasks.js at time of writing) shows the relevant part of the code.

 grunt.task.run(
      'maven:version:' + options.version,
      'mvn:package',
      'maven:deploy-file',
      'maven:version:' + options.nextVersion + ':deleteTag'
    );

What I think needs to happen is an option, say buildTask, for a grunt task to be run after the first maven:version, but before the mvn:package. Then I could set buildTask to 'build' (which is currently run before the grunt-maven-tasks maven:release task) and have the build actually be against the correct version.

apryce avatar Jan 27 '16 20:01 apryce