最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Maven for static web projects - Stack Overflow

programmeradmin0浏览0评论

I want to use Maven capabilities for my static web projects containing images, javascript and/or css files.

I don't wanna consider anything about Java, jar packaging, ...

Basically, I need:

  • "minify" resources: i.e.: some yui pressor plugin
  • package my project (.tar.gz, ...)

Looking it up, I'd just found some tags samples. But, nothing about the whole project.

For assembly tar.gz, I believe that Assembly plugin may be useful. To minify and press JS and CSS, I declare some press/minify plugin.

How should I declare packaging tag in this case? The closer I thought was: <packaging>war</packaging>.

There's other way to declare it?

Does it make sense?

I want to use Maven capabilities for my static web projects containing images, javascript and/or css files.

I don't wanna consider anything about Java, jar packaging, ...

Basically, I need:

  • "minify" resources: i.e.: some yui pressor plugin
  • package my project (.tar.gz, ...)

Looking it up, I'd just found some tags samples. But, nothing about the whole project.

For assembly tar.gz, I believe that Assembly plugin may be useful. To minify and press JS and CSS, I declare some press/minify plugin.

How should I declare packaging tag in this case? The closer I thought was: <packaging>war</packaging>.

There's other way to declare it?

Does it make sense?

Share Improve this question edited Apr 3, 2013 at 20:21 Andre Pastore asked Nov 1, 2011 at 13:26 Andre PastoreAndre Pastore 2,9074 gold badges35 silver badges44 bronze badges 2
  • 1 Here, there is an good example for assembly usage in this case: blog.eisele/2009/07/… – Andre Pastore Commented Nov 1, 2011 at 13:37
  • Recently, we changed our deployment architecture to Gradle. It improve some issues like flexibility, packaging, SCM tagging and delivery. It easy extensible, some Ant/Make/Maven foundations and modern. It is fully supported by Jenkins and can be run in any environment. We remend it! – Andre Pastore Commented Apr 3, 2013 at 20:25
Add a ment  | 

1 Answer 1

Reset to default 7

If your assembly descriptor does all the data processing (creating folders, copying files, etc.), then you can also declare the project to be a pom project. This will result in maven skipping the default life-cycle phases like pile, test, etc.

发布评论

评论列表(0)

  1. 暂无评论