1{ stdenv, pkgs, mavenbuild, fetchMaven }:
2
3with pkgs.javaPackages;
4
5let
6 poms = import (../poms.nix) { inherit fetchMaven; };
7 collections = import (../collections.nix) { inherit pkgs; };
8in rec {
9 junitGen = { mavenDeps, sha512, version }: mavenbuild rec {
10 inherit mavenDeps sha512 version;
11
12 name = "junit-${version}";
13 src = pkgs.fetchFromGitHub {
14 inherit sha512;
15 owner = "junit-team";
16 repo = "junit4";
17 rev = "r${version}";
18 };
19 m2Path = "/junit/junit/${version}";
20
21 meta = {
22 homepage = http://junit.org/junit4/;
23 description = "Simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks";
24 license = stdenv.lib.licenses.epl10;
25 platforms = stdenv.lib.platforms.all;
26 maintainers = with stdenv.lib.maintainers;
27 [ nequissimus ];
28 };
29 };
30
31 junit_3_8_1 = map (obj: fetchMaven {
32 version = "3.8.1";
33 artifactId = "junit";
34 groupId = "junit";
35 sha512 = obj.sha512;
36 type = obj.type;
37 }) [
38 { type = "pom"; sha512 = "2b368057s8i61il387fqvznn70r9ndm815r681fn9i5afs1qgkw7i1d6vsn3pv2bbif1kmhb7qzcc574m3xcwc8a2mqw44b4bbxsfyl"; }
39 { type = "jar"; sha512 = "25yk0lzwk46r867nhrw4hg7cvz28wb8ln9nw1dqrb6zarifl54p4h1mcz90vmih405bsk96g0qb6hn1h4df0fas3f5kma9vxfjryvwf"; }
40 ];
41
42 junit_3_8_2 = map (obj: fetchMaven {
43 version = "3.8.2";
44 artifactId = "junit";
45 groupId = "junit";
46 sha512 = obj.sha512;
47 type = obj.type;
48 }) [
49 { type = "pom"; sha512 = "01npyfwl1f44l44x92cvqqcp58sckcjraf78dav6zgag3x6ispd9gz594nhpqckmjw0hlrkbqfxnzdcq1mlsj9rw6zyq4wk5ch8rl5j"; }
50 { type = "jar"; sha512 = "2jcih102666lcm7b23rgs5cd59ww49m78c8mja52mrcm25630zw28rjqkj5lsws18k5jf75div9wkd1sxcvwvq5cvvphgyg7550i8r9"; }
51 ];
52
53 junit_4_12 = junitGen {
54 mavenDeps = (with mavenPlugins; [ animalSniffer_1_11 mavenEnforcer_1_3_1 mavenReplacer_1_5_3 mavenSurefire_2_17 ])
55 ++ collections.mavenLibs_2_0_1
56 ++ [ aetherUtil_0_9_0_M2 ant_1_8_2 antLauncher_1_8_2 bsh_2_0_b4 commonsCli_1_2 commonsIo_2_1 commonsLang_2_3 commonsLang_2_6 hamcrestCore_1_3 mavenArtifact_2_0_8 mavenArtifact_3_0_3 mavenCommonArtifactFilters_1_2 mavenCommonArtifactFilters_1_4 mavenDependencyTree_2_1 mavenDoxiaSinkApi_1_0_alpha6 mavenDoxiaSinkApi_1_0_alpha10 mavenEnforcerApi_1_3_1 mavenEnforcerRules_1_3_1 mavenModel_3_0_3 mavenPluginApi_3_0_3 mavenPluginAnnotations_3_2 mavenPluginTestingHarness_1_1 mavenProject_2_0_8 mavenReportingApi_2_2_1 mavenSurefireApi_2_17 mavenSurefireBooter_2_17 mavenSurefireCommon_2_17 mavenToolchain_2_2_1 mojoAnimalSniffer_1_11 mojoJavaBootClasspathDetector_1_11 ow2AsmAll_4_0 plexusArchiver_1_0_alpha7 plexusClassworlds_2_4 plexusI18n_1_0_beta6 plexusUtils_1_0_5 plexusUtils_1_1 plexusUtils_1_4_9 plexusUtils_1_5_6 plexusUtils_2_0_6 sisuGuice_2_9_4 sisuInjectBean_2_1_1 sisuInjectPlexus_2_1_1 xercesImpl_2_8_0 xmlApis_1_3_03 ]
57 ++ (with poms; [ aether_0_9_0_M2 animalSnifferParent_1_11 antParent_1_8_2 apache_1 apache_7 asmParent_4_0 beanshell_2_0_b4 codehausParent_4 commonsParent_11 commonsParent_17 doxia_1_0_alpha6 doxia_1_0_alpha10 enforcer_1_3_1 hamcrestParent_1_3 maven_2_0_1 maven_2_0_8 maven_3_0_3 mavenParent_6 mavenParent_15 mavenPluginTools_3_2 mavenReporting_2_0_1 mavenReporting_2_2_1 mavenSharedComponents_7 mavenSharedComponents_11 mojoParent_32 ow2_1_3 plexus_1_0_12 plexusComponents_1_1_4 plexusComponents_1_1_6 sisuInjectGuiceBean_2_1_1 sisuInject_2_1_1 sisuInjectGuicePlexus_2_1_1 sisuParent_2_1_1 sonatypeForgeParent_7 sonatypeParent_7 surefire_2_17 ]);
58 sha512 = "0bbldnf37jl855s1pdx2a518ivfifv75189vsbpylnj8530vnf8z6b2dglkcbcjgr22lp1s4m1nnplz5dmka9sr7vj055p88k27kqw9";
59 version = "4.12";
60 };
61}