source: general/prog/junit.xml@ b7e1917

10.0 10.1 11.0 11.1 11.2 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind lazarus perl-modules plabs/python-mods qt5new trunk upgradedb xry111/intltool xry111/soup3 xry111/test-20220226
Last change on this file since b7e1917 was b7e1917, checked in by Pierre Labastie <pieere@…>, 5 years ago

Fix junit for building with java 9, and tag it

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19870 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 6.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY junit-download-http "https://launchpad.net/debian/+archive/primary/+files/junit4_&junit-version;.orig.tar.gz">
8 <!ENTITY junit-download-ftp " ">
9 <!ENTITY junit-md5sum "b4d163832583dcec8bedb5427c795cc4">
10 <!ENTITY junit-size "1.7 MB">
11 <!ENTITY junit-buildsize "34 MB">
12 <!ENTITY junit-time "0.1 SBU">
13]>
14
15<sect1 id="junit" xreflabel="JUnit-&junit-version;">
16 <?dbhtml filename="junit.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>JUnit-&junit-version;</title>
24
25 <indexterm zone="junit">
26 <primary sortas="a-JUnit">JUnit</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to JUnit</title>
31
32 <para>
33 The <application>JUnit</application> package contains a simple, open
34 source framework to write and run repeatable tests. It is an instance of
35 the xUnit architecture for unit testing frameworks. JUnit features include
36 assertions for testing expected results, test fixtures for sharing common
37 test data, and test runners for running tests.
38 </para>
39
40 &lfs82_checked;
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>Download (HTTP): <ulink url="&junit-download-http;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download (FTP): <ulink url="&junit-download-ftp;"/></para>
49 </listitem>
50 <listitem>
51 <para>Download MD5 sum: &junit-md5sum;</para>
52 </listitem>
53 <listitem>
54 <para>Download size: &junit-size;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated disk space required: &junit-buildsize;</para>
58 </listitem>
59 <listitem>
60 <para>Estimated build time: &junit-time;</para>
61 </listitem>
62 </itemizedlist>
63
64 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
65 <itemizedlist spacing="compact">
66 <listitem>
67 <para>
68 Required file: <ulink
69 url="http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/&hamcrest-version;/hamcrest-core-&hamcrest-version;.jar"/>
70 </para>
71 </listitem>
72 <listitem>
73 <para>
74 Required file: <ulink
75 url="http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/&hamcrest-version;/hamcrest-core-&hamcrest-version;-sources.jar"/>
76 </para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">JUnit Dependencies</bridgehead>
81
82 <bridgehead renderas="sect4">Required</bridgehead>
83 <para role="required">
84 <xref linkend="apache-ant"/> and
85 <xref linkend="unzip"/>
86 </para>
87
88 <para condition="html" role="usernotes">User Notes:
89 <ulink url="&blfs-wiki;/junit"/></para>
90
91 </sect2>
92
93 <sect2 role="installation">
94 <title>Installation of JUnit</title>
95
96 <para>
97 The <command>javadoc</command> command coming with OpenJDK 8 has become
98 much stricter than before regarding the conformance of the Javadoc
99 comments in source code to HTML. The <application>Junit</application>
100 documentation does not meet that standard, so the conformance checks
101 have to be disabled. This can be done with the following command:
102 </para>
103
104<screen><userinput>sed -i '\@/docs/@a&lt;arg value="-Xdoclint:none"/&gt;' build.xml</userinput></screen>
105
106 <para>
107 With <application>Java 9</application>, the minimum accepted code version
108 is 1.6. However, the build system passes <option>-source 1.5</option>,
109 while the junit code can perfectly be compiled for a Java 8 JVM. Change
110 that by issuing the following command:
111 </para>
112
113<screen><userinput>sed -i 's/1\.5/1.8/' build.xml</userinput></screen>
114
115 <para>
116 Now place the required hamcrest jar files where needed and build the
117 package:
118 </para>
119
120<screen><userinput>cp -v ../hamcrest-core-&hamcrest-version;{,-sources}.jar lib/ &amp;&amp;
121ant populate-dist</userinput></screen>
122
123 <para>
124 Test the package by issuing <command>ant dist</command>. One test fails
125 for unknown reason.
126 </para>
127
128 <para>
129 Install the files in the final location as the
130 <systemitem class="username">root</systemitem> user:
131 </para>
132
133<screen role="root"><userinput>install -v -m755 -d /usr/share/{doc,java}/junit-&junit-version; &amp;&amp;
134chown -R root:root . &amp;&amp;
135
136cp -v -R junit*/javadoc/* /usr/share/doc/junit-&junit-version; &amp;&amp;
137cp -v junit*/junit*.jar /usr/share/java/junit-&junit-version;</userinput></screen>
138
139 <para>
140 If you have followed the instructions in <xref linkend="ojdk-conf"/>,
141 there is nothing more to do: the <envar>CLASSPATH</envar> variable
142 would be automatically updated.
143 </para>
144
145 </sect2>
146
147 <sect2 role="content">
148 <title>Contents</title>
149
150 <segmentedlist>
151 <segtitle>Installed Programs</segtitle>
152 <segtitle>Installed Libraries</segtitle>
153 <segtitle>Installed Directories</segtitle>
154
155 <seglistitem>
156 <seg>None</seg>
157 <seg>hamcrest-core and junit jar files</seg>
158 <seg>/usr/share/doc/junit-&junit-version; and
159 /usr/share/java/junit-&junit-version;</seg>
160 </seglistitem>
161 </segmentedlist>
162
163 <variablelist>
164 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
165 <?dbfo list-presentation="list"?>
166 <?dbhtml list-presentation="table"?>
167
168 <varlistentry id="junit.jar">
169 <term><filename class='libraryfile'>junit jar files</filename></term>
170 <listitem>
171 <para>contains java classes to support the xUnit framework testing
172 architecture.</para>
173 <indexterm zone="junit junit.jar">
174 <primary sortas="c-junit.jar">junit-&junit-version;.jar</primary>
175 </indexterm>
176 </listitem>
177 </varlistentry>
178
179 </variablelist>
180
181 </sect2>
182
183</sect1>
Note: See TracBrowser for help on using the repository browser.