2007-10-30 13:47:33 -04:00
|
|
|
Building HttpComponents Client
|
|
|
|
============================
|
|
|
|
|
|
|
|
(1) Requisites
|
|
|
|
--------------
|
2010-06-14 22:41:49 -04:00
|
|
|
HttpClient utilizes Maven 2 as a distribution management and packaging tool.
|
2010-06-15 04:18:25 -04:00
|
|
|
Version 2.1.0 or above is required, which requires JDK 1.4 or later.
|
|
|
|
However, it is recommended that you use Maven 2.2.1 or later, which
|
|
|
|
require JDK 1.5 or above, as does HttpClient itself.
|
2007-10-30 13:47:33 -04:00
|
|
|
|
2012-11-26 11:49:58 -05:00
|
|
|
Maven 3.0.x and Clover are not compatible and will cause a build error.
|
|
|
|
|
2007-10-30 13:47:33 -04:00
|
|
|
Maven installation and configuration instructions can be found here:
|
|
|
|
|
|
|
|
http://maven.apache.org/run-maven/index.html
|
|
|
|
|
|
|
|
(2) Executing test cases
|
|
|
|
|
|
|
|
Execute the following command in order to compile and test the components
|
|
|
|
|
|
|
|
mvn test
|
|
|
|
|
|
|
|
(3) Building packages
|
|
|
|
|
|
|
|
Execute the following command in order to build the JAR packages
|
|
|
|
|
|
|
|
mvn package
|
|
|
|
|
|
|
|
The resultant packages can be found in the target folders of their respective modules
|
|
|
|
|
2009-07-09 15:31:04 -04:00
|
|
|
httpclient/target/httpclient-<VERSION>.jar
|
|
|
|
httpmime/target/httpmime-<VERSION>.jar
|
|
|
|
httpclient-osgi/target/org.apache.httpcomponents.httpclient_<VERSION>.jar
|
2007-10-30 13:47:33 -04:00
|
|
|
|
|
|
|
where <VERSION> is the release version
|
2009-07-09 15:31:04 -04:00
|
|
|
|
|
|
|
(4) Building documentation
|
|
|
|
|
|
|
|
Execute the following command in order to generate javadoc:
|
|
|
|
|
2009-07-14 15:33:32 -04:00
|
|
|
mvn javadoc:aggregate
|
2009-07-09 15:31:04 -04:00
|
|
|
|
|
|
|
Execute the following command in order to generate the tutorial in html and pdf formats
|
|
|
|
|
|
|
|
mvn docbkx:generate-pdf docbkx:generate-html
|
|
|
|
|
|
|
|
(5) Building distribution assemblies
|
|
|
|
|
|
|
|
Execute the following command in order to build the distribution assemblies
|
|
|
|
|
|
|
|
mvn package assembly:assembly
|
|
|
|
|
|
|
|
(6) Fix EOL in source files
|
|
|
|
|
|
|
|
Fix the archive files so the source files have the correct EOL settings:
|
|
|
|
|
|
|
|
mvn antrun:run
|
|
|
|
|
|
|
|
(7) Building project web site
|
|
|
|
|
|
|
|
Execute the following command in order to generate the project web site:
|
|
|
|
|
2010-03-01 13:04:42 -05:00
|
|
|
mvn site -Dmaven.clover.licenseLocation=<path>/clover.license
|
2009-07-09 15:31:04 -04:00
|
|
|
|
|
|
|
where <path> is a full path to Clover license file
|
|
|
|
|
|
|
|
ASF committers can obtain a copy of Clover license donated to the ASF from the SVN repository
|
|
|
|
at the following location:
|
|
|
|
|
|
|
|
https://svn.apache.org/repos/private/committers/donated-licenses/clover
|
|
|
|
|