Reputation: 170
I'm doing a project with neo4j. I need to modify some lines of code because I want it to work differently than usual.
So it's necessary for me to build it with this command:
mvn clean install -DfullBuild
I'm new to Maven. I don't understand some things:
Why do Maven download some files while building? I just want to compile my code, is there any reason to download anything?
Is there any way to avoid compiling/running tests? Some of them fail when changing code and the build fails. And documentation? How can I avoid generating it?
Why does it take sooo long to build? Every time I change a line it takes me like 30 minutes to build it again. I just want to compile some modules instead of all of them.
I've seen that some modules has their own pom.xml file. Does it mean that I can build them separately to save time?
Thanks for any help given!
Upvotes: 3
Views: 114
Reputation: 39905
1) it's downloading all the dependencies (which are a lot). If you have snapshot dependencies they will be redownloaded on a daily basis.
2) add -DskipTests=true
to your command line arguments
3) most of the build time is spent running the tests. Neo4j has a strict focus on quality hence a lot of tests. Also building the browser requires couple of steps to compress/package javascript, css and other stuff.
4) yes. If you change something in submodule xyz, just call mvn install -DskipTests=true
from within that module.
Upvotes: 2