mavenix icon indicating copy to clipboard operation
mavenix copied to clipboard

mvnix-update attempts to build my project. Is this expected?

Open solomon-b opened this issue 4 years ago • 2 comments

I thought mvnix-update was just supposed to generate the mavenix.lock file. It runs mvn package with different options then I have set in my default.nix which causes it to fail.

solomon-b avatar Jun 05 '20 18:06 solomon-b

Yes, the approach that mavenix takes to generating a lock file is to run mvn install (the log output incorrectly says package) and looks at the resulting repo mvn creates.

How are you setting your options? Can you give an example?

icetan avatar Jun 08 '20 14:06 icetan

ah thank you for the information. I'm attempting to build a massive 20 year old java 8 monolith. The full build takes hours so for an intial attempt I want to skip some steps and only build a subset of the whole project.

In default.nix I'm using overrideAttrs to override the build phase and set the flags:

let buildPhase = ''
  runHook preBuild
  $mvn --version
  $mvn -V -T 1C -Dmaven.test.skip=true -DskipTests=true -Dcleanup.skip=true -Ddelta.skip=true -Dtablespaces.skip=true -Dgulp.task=min -Dqunit.mThreads=8  -pl insights/ringo -am package;
  runHook postBuild
  '';
in ...

Can I use those same flags in mvnix-update here: https://github.com/nix-community/mavenix/blob/master/mvnix-update#L113 ?

solomon-b avatar Jun 08 '20 20:06 solomon-b