开发者

How to avoid wasting time during compilation during development?

开发者 https://www.devze.com 2022-12-27 19:01 出处:网络
I\'m working with a small team of developers. My job is to convert a Make project (with Intellij Idea 9.0) into a Maven 2 project.

I'm working with a small team of developers. My job is to convert a Make project (with Intellij Idea 9.0) into a Maven 2 project.

The pr开发者_如何学Coblem is : we spend a lot of time during the development. With Make, only one complete build was required and then any change did not consume a lot of time (almost instantaneously). On the other hand, with Maven 2, a little change takes a lot of time to run.

Any solution ? Thanks.


The problem you're facing and its description are not clear (what is your project structure, how you build it, how much time does it take to compile one change, etc) but here are some practices that could help:

  • Use incremental builds (i.e. don't use clean at each build).
  • Use binary dependencies (i.e. multiple modules with dependencies vs of a huge monolithic module).
  • Use advanced reactor options for smart reactor build (to build only the required subset of modules).
  • Use Maven Shell (if you're not aware of this project, CHECK IT OUT).

Personally, I'm not experiencing "lot of time to run" problems with my projects.


On the other hand, with Maven 2, a little change takes a lot of time to run.

I'm not really sure that this has to be true. For a single Maven project, the compile phase doesn't need to recompile all source from scratch, just what has been updated since the last run (assuming you haven't done a clean, etc.).

Without further details though it's hard to offer any advice. Have you converted to Maven and are finding that it seems to be excessively re-building many parts of your projects? If so, please provide more details as Pascal mentions aboves. Or is this just a question driven by fear?


IntelliJ can load the module/project configuration from the pom files. This means that during development, use IntelliJ's build based of the pom files (which is incremental and quick) and only use maven stand alone for continous integration and releases.

0

精彩评论

暂无评论...
验证码 换一张
取 消