allegro/grunt-maven-plugin

Supporting Gulp?

Opened this issue · 6 comments

Gulp has quite a few benefits over Grunt, specifically that it's built on a streaming concept which is often faster because you don't have to create intermediate files/steps. Any chance that this may get added?

Core concepts would be the same, so simply adding it should be quite simple. I don't know about some extended support. Never used Gulp (yet), so i'm not so familiar with this tool. Let me think about it, i need to assess how much time would it take to make it right.

Sure thing. I suspect that the grunt-maven npm package would not be reusable, but the grunt-maven.json file would be.

Exactly. I'm not convinced i want to go though writing custom gulp plugin (or maybe it's easier than in grunt?). One step at a time.

I imagine just triggering Gulp through Maven instead of Grunt is probably enough. In terms of the grunt-maven npm module, it has the tasks:

  • mavenPrepare - copies resources from src to target-grunt
  • mavenDist - copies resources from target-grunt -> target-grunt/dist -> target

mavenPrepare is very nice when using a watch task, but I'm under the assumption that the mavenDist task is not all particularly useful. I've superseded its use with the maven assembly plugin instead, as Grunt already builds the deliverables and I just tar/collect only the files I need.

So question; based on my usages of the npm package (which seems somewhat optional), could they not be replaced by something like grunt-sync or with gulp, which supports it out of the box?

Not trying to deter you from dropping support for the tasks, I'm just wondering if they are necessary for the end-to-end workflow. This still assumes you will write out the grunt-maven.json file as it can be read by either build system, and as a reference for copy/watch paths.

The frontend-maven-plugin seems pretty agnostic to the build itself, and instead focuses on providing only the tools for a build. In my opinion though, that tool ultimately does not follow Maven's best practices of providing a working directory for the build which is a copy of the source.

I was just thinking of starting small - allowing to run Gulp. The rest will come if needed :)

I started out as grunt-only plugin, but now i see that pivoting to more agnostic plugin might be nice.

Awesome. Alternatively, I was able to get this running gulp, by setting:

<!-- Using gulp instead -->
<gruntExecutable>gulp</gruntExecutable>

Bit hacky, but it works.