1 <?xml version="1.0" encoding="ISO-8859-1"?>
4 * Copyright 2004 the mime4j project
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 <title>Building mime4j</title>
24 <section name="Building mime4j">
25 <subsection name="Using a Stable Release">
27 href="http://sourceforge.net/project/showfiles.php?group_id=108895">
28 Sourceforge download pages</a> and download the most
29 recent release in your preferred format, either
30 <code>mime4j-x.y-src.tar.gz</code> or
31 <code>mime4j-x.y-src.zip</code>. Extracting the archived
32 sources will create the directory <code>mime4j-x.y/</code>
35 <subsection name="Checking Out From Subversion">
37 Issue the following commands in a shell:
39 <code>svn co 'https://svn.apache.org/repos/asf/james/mime4j/trunk/' mime4j</code><br/>
43 <subsection name="Download and Install Maven">
44 <p> You will need to download and install <a
45 href="http://maven.apache.org/">Maven</a> before building
46 the sources. The build has been tested with version 1.0 of
47 Maven so use this or a later version if possible. </p>
48 <p> One of the main differences between Maven and plain ant is
49 that Maven manages external dependencies for your projects
50 and (at least in theory) you should no longer have to store
51 third-party jar files in your source code tree. It maintains a local
52 repository of versioned libraries and shares them between
53 your Maven projects. If it can't find the necessary files
54 there it will attempt to download them from the main Maven
55 repository at www.ibiblio.org/maven. So to use the Maven
56 build, you need to have a network connection available for
57 the inital download of the project dependencies. </p>
59 <subsection name="Building the mime4j Jar">
60 <p> Once Maven has been installed, building the project should
61 be as simple as typing <blockquote>
62 <code>cd mime4j-x.y/ (cd mime4j/ if sources come from
63 Subversion)<br/>maven jar</code>
64 </blockquote> from the command line. Maven will
65 automatically run all test cases for you. If you want to
66 disable the tests you should replace the last command above
68 <code>maven -Dmaven.test.skip=true jar</code>
69 </blockquote> Maven will create the
70 <code>mime4j-x.y.jar</code> jar file in the
71 <code>target</code> directory. For more information on using
72 Maven, have a look at the <a
73 href="http://maven.apache.org/">Maven web site</a>. </p>