Richard Eckart de Castilho wrote:
>
> Without having had a look at the build, I would expect at least two things
> to cause:
1) Maven (like ant) is a Java application and it takes a moment to fire up
> the JVM.
> "make" is a native application. 2) The "package" goal always runs the full
> packaging (building of ZIPs and JARs from the compiled sources). So even
> if the compile is up-to-date, doing the packaging takes a moment. If
> further
> plugins, e.g. JavaDoc, have been activated during normal builds, they may
> further slow down the build.
>
Understood for the overhead of running the JVM (multiple times?)
during the build.
But why would Maven "mvn package" always re-create the ZIPs and JARs
when nothing has changed? There might be a good reason, but at first sight
it seems like a waste of time. Shouldn't a build system try to do the least
amount of work and rebuild only the targets for which at least one of their
dependencies has changed, based on a DAG (Directed Acyclic Graph)
of target/dependencies?
Running "mvn compile" when nothing has changed is faster than
"mvn package" but not really fast either. "mvn compile" takes 6.5 sec
on my laptop when nothing has changed (nothing to compile), which is
presumably much more than what the JVM needs to initialize when
launching mvn.
I was also searching for parallel builds in the hope of speeding up
(something like "make -j4" with GNU make). I found this...
http://stackoverflow.com/questions/581465/maven-how-to-do-parallel-builds
... but it does not work.
$ cd languagetool
$ mvn -T 4 compile
...snip...
[INFO] Building languagetool-parent 2.1-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[WARNING] *****************************************************************
[WARNING] * Your build is requesting parallel execution, but project *
[WARNING] * contains the following plugin(s) that are not marked as *
[WARNING] * @threadSafe to support parallel building. *
[WARNING] * While this /may/ work fine, please look for plugin updates *
[WARNING] * and/or request plugins be made thread-safe. *
[WARNING] * If reporting an issue, report it against the plugin in *
[WARNING] * question, not against maven-core *
[WARNING] *****************************************************************
[WARNING] The following plugins are not marked @threadSafe in LanguageTool
Style and Grammar Checker Core:
[WARNING] org.apache.maven.plugins:maven-resources-plugin:2.3
[WARNING] *****************************************************************
[WARNING] *****************************************************************
[WARNING] * Your build is requesting parallel execution, but project *
[WARNING] * contains the following plugin(s) that are not marked as *
[WARNING] * @threadSafe to support parallel building. *
[WARNING] * While this /may/ work fine, please look for plugin updates *
[WARNING] * and/or request plugins be made thread-safe. *
[WARNING] * If reporting an issue, report it against the plugin in *
[WARNING] * question, not against maven-core *
[WARNING] *****************************************************************
[WARNING] The following plugins are not marked @threadSafe in Hunspell
native libs:
[WARNING] org.apache.maven.plugins:maven-resources-plugin:2.3
...snip...
Maybe I've been spoiled with GNU make, where
parallel builds generally work and builds do the least
amount of work possible. Maven builds seem quite slow.
Regards
Dominique
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel