[6785] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
| 2 | <!-- |
---|
| 3 | /**************************************************************** |
---|
| 4 | * Licensed to the Apache Software Foundation (ASF) under one * |
---|
| 5 | * or more contributor license agreements. See the NOTICE file * |
---|
| 6 | * distributed with this work for additional information * |
---|
| 7 | * regarding copyright ownership. The ASF licenses this file * |
---|
| 8 | * to you under the Apache License, Version 2.0 (the * |
---|
| 9 | * "License"); you may not use this file except in compliance * |
---|
| 10 | * with the License. You may obtain a copy of the License at * |
---|
| 11 | * * |
---|
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 * |
---|
| 13 | * * |
---|
| 14 | * Unless required by applicable law or agreed to in writing, * |
---|
| 15 | * software distributed under the License is distributed on an * |
---|
| 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * |
---|
| 17 | * KIND, either express or implied. See the License for the * |
---|
| 18 | * specific language governing permissions and limitations * |
---|
| 19 | * under the License. * |
---|
| 20 | ****************************************************************/ |
---|
| 21 | |
---|
| 22 | --> |
---|
| 23 | <document> |
---|
| 24 | <properties> |
---|
| 25 | <title>Building mime4j</title> |
---|
| 26 | </properties> |
---|
| 27 | <body> |
---|
| 28 | <section name="Building mime4j"> |
---|
| 29 | <subsection name="Using a Stable Release"> |
---|
| 30 | <p> Go to the <a href="http://james.apache.org/download.cgi">download |
---|
| 31 | pages</a> and download the most recent |
---|
| 32 | release in your preferred format, either |
---|
| 33 | <code>james-mime4j-x.y-src.tar.gz</code> or <code>james-mime4j-x.y-src.zip</code>. |
---|
| 34 | Extracting the archived sources will create the directory |
---|
| 35 | <code>james-mime4j-x.y/</code>.</p> |
---|
| 36 | </subsection> |
---|
| 37 | <subsection name="Checking Out From Subversion"> |
---|
| 38 | <p> |
---|
| 39 | Issue the following commands in a shell: |
---|
| 40 | <blockquote> |
---|
| 41 | <code>svn checkout http://svn.apache.org/repos/asf/james/mime4j/trunk james-mime4j</code><br/> |
---|
| 42 | </blockquote> |
---|
| 43 | </p> |
---|
| 44 | </subsection> |
---|
| 45 | <subsection name="Download and Install Maven"> |
---|
| 46 | <p> You will need to download and install <a |
---|
| 47 | href="http://maven.apache.org/">Maven</a> before building |
---|
| 48 | the sources. The build has been tested with version 2.0 of |
---|
| 49 | Maven so use this or a later version if possible. </p> |
---|
| 50 | <p> One of the main differences between Maven and plain ant is |
---|
| 51 | that Maven manages external dependencies for your projects |
---|
| 52 | and (at least in theory) you should no longer have to store |
---|
| 53 | third-party jar files in your source code tree. It maintains a local |
---|
| 54 | repository of versioned libraries and shares them between |
---|
| 55 | your Maven projects. If it can't find the necessary files |
---|
| 56 | there it will attempt to download them from the main Maven |
---|
| 57 | repository at www.ibiblio.org/maven. So to use the Maven |
---|
| 58 | build, you need to have a network connection available for |
---|
| 59 | the inital download of the project dependencies. </p> |
---|
| 60 | </subsection> |
---|
| 61 | <subsection name="Building the mime4j Jar"> |
---|
| 62 | <p> Once Maven has been installed, building the project should |
---|
| 63 | be as simple as typing <blockquote> |
---|
| 64 | <code>cd james-mime4j-x.y/ (cd james-mime4j/ if sources come from |
---|
| 65 | Subversion)<br/>mvn package</code> |
---|
| 66 | </blockquote> from the command line. Maven will |
---|
| 67 | automatically run all test cases for you and create the |
---|
| 68 | jar file in the <code>target</code> directory. |
---|
| 69 | </p> |
---|
| 70 | <p> |
---|
| 71 | To install the jar into your local Maven repository run <blockquote> |
---|
| 72 | <code>mvn install</code></blockquote> |
---|
| 73 | </p> |
---|
| 74 | <p> |
---|
| 75 | To generate an Eclipse project from the sources run <blockquote> |
---|
| 76 | <code>mvn eclipse:eclipse</code></blockquote> |
---|
| 77 | </p> |
---|
| 78 | <p> |
---|
| 79 | <strong>NOTE!</strong> Mime4j uses <a href="https://javacc.dev.java.net/">JavaCC</a> to generate parsers for |
---|
| 80 | header fields. If you're using an old version of maven eclipse pluing |
---|
| 81 | <code>mvn eclipse:eclipse</code> could have problems |
---|
| 82 | generating proper source folders for the JavaCC generated code. |
---|
| 83 | After running <code>mvn eclipse:eclipse</code> you must manually |
---|
| 84 | add <code>target/generated-sources/javacc</code> and |
---|
| 85 | <code>target/generated-sources/jjtree</code> as source folders |
---|
| 86 | under <em>Project -> Properties</em> in Eclipse. |
---|
| 87 | </p> |
---|
| 88 | <p> |
---|
| 89 | For more information on using |
---|
| 90 | Maven, have a look at the <a |
---|
| 91 | href="http://maven.apache.org/">Maven web site</a>. </p> |
---|
| 92 | </subsection> |
---|
| 93 | </section> |
---|
| 94 | </body> |
---|
| 95 | </document> |
---|