mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
maven_hello: Add 1.1, add ability to choose skipping tests
This commit is contained in:
parent
5d54cfd7a4
commit
0e10bfa246
@ -1,5 +1,5 @@
|
||||
{ stdenv, maven, pkgs }:
|
||||
{ mavenDeps, src, name, meta, m2Path, ... }:
|
||||
{ mavenDeps, src, name, meta, m2Path, skipTests ? true, ... }:
|
||||
|
||||
with builtins;
|
||||
with stdenv.lib;
|
||||
@ -26,7 +26,7 @@ in stdenv.mkDerivation rec {
|
||||
echo "<settings><mirrors>\
|
||||
<mirror><id>tmpm2</id><url>file://$out/m2</url><mirrorOf>*</mirrorOf></mirror></mirrors>\
|
||||
<localRepository>$out/m2</localRepository></settings>" >> $out/m2/settings.xml
|
||||
${maven}/bin/mvn clean package -Dmaven.test.skip=true -Danimal.sniffer.skip=true -gs $out/m2/settings.xml
|
||||
${maven}/bin/mvn clean package -Dmaven.test.skip=${if skipTests then "true" else "false"} -Danimal.sniffer.skip=true -gs $out/m2/settings.xml
|
||||
cp -v ./target/*.jar $out/target/
|
||||
'';
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
with pkgs.javaPackages;
|
||||
|
||||
rec {
|
||||
mavenHelloRec = { mavenDeps, sha512, version }: mavenbuild rec {
|
||||
inherit mavenDeps sha512 version;
|
||||
mavenHelloRec = { mavenDeps, sha512, version, skipTests }: mavenbuild rec {
|
||||
inherit mavenDeps sha512 version skipTests;
|
||||
|
||||
name = "maven-hello-${version}";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
@ -30,4 +30,11 @@ rec {
|
||||
sha512 = "3kv5z1i02wfb0l5x3phbsk3qb3wky05sqn4v3y4cx56slqfp9z8j76vnh8v45ydgskwl2vs9xjx6ai8991mzb5ikvl3vdgmrj1j17p2";
|
||||
version = "1.0";
|
||||
};
|
||||
|
||||
mavenHello_1_1 = mavenHelloRec {
|
||||
mavenDeps = [ junit_4_12 ];
|
||||
sha512 = "3dhgl5z3nzqskjjcggrjyz37r20b0m5vhfzbx382qyqcy4d2jdhkl7v1ajhcg8vkz0qdzq85k09w5is81hybv8sd09h3hgb3rrigdaq";
|
||||
version = "1.1";
|
||||
skipTests = false;
|
||||
};
|
||||
}
|
||||
|
@ -104,7 +104,8 @@ in {
|
||||
mavenFiltering_1_1;
|
||||
|
||||
inherit (callPackage ../development/java-modules/maven-hello { inherit mavenbuild; })
|
||||
mavenHello_1_0;
|
||||
mavenHello_1_0
|
||||
mavenHello_1_1;
|
||||
|
||||
inherit (callPackage ../development/java-modules/maven/model.nix { inherit fetchMaven; })
|
||||
mavenModel_2_0_6
|
||||
|
Loading…
Reference in New Issue
Block a user