33

I'm using maven-minify-plugin. It can produce only one output file. I need to produce two minified js files. One from one set of files, the other from another set of files.

Can I somehow trick Maven into running two different configurations for the same plugin?

Thanks for help, Yuri.

Yuri Geinish
  • 16,744
  • 6
  • 38
  • 40

1 Answers1

37

Turned out to be pretty easy. Use different executions, like explained here: http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_executions_Tag

Yuri Geinish
  • 16,744
  • 6
  • 38
  • 40
  • 4
    What if another plugin execution needs to be ran between the executions of the a plugin? Is this possible to define the same plugin multiple times in a pom file? – Ioannis Sermetziadis Dec 23 '16 at 09:03
  • @Yannis No built-in general way, [it depends on what exactly you want to do](http://stackoverflow.com/a/40868827/1743880). – Tunaki Feb 11 '17 at 11:38