blob: eac77fa13a23b5fbc4a831a1d5601c0554f65af9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<script type="text/javascript">var xookiConfig = {level: 0};</script>
<script type="text/javascript" src="xooki/xooki.js"></script>
</head>
<body>
<textarea id="xooki-source">
<h1>Building from source</h1>
To build Ivy from source it's really easy.
<h2>Requirements</h2>
All you need is
<ul>
<li>an <a href="http://subversion.tigris.org/">svn</a> client</li>
<em>to check out Ivy sources from apache svn, not required if you build from sources packaged in a release</em>
<li><a href="http://ant.apache.org/">Apache Ant</a> 1.6.0 or greater</li>
<em>We recommend either ant 1.6.5 or 1.7.0</em>
<li><a href="http://junit.org">junit</a> 3.8.2 jar in your ant lib</li>
<em> this is not required if you use ant 1.7</em>
<li>a <a href="http://java.sun.com/">jdk</a> 1.5 or greater</li>
<em>Build instructions have been successfully tested with sun jdk 1.5.0 and 1.6.0</em>
</ul>
<h2>Procedure</h2>
<h3>Get the source</h3>
You can either get the sources from a [[download release]], or get them directly from svn. For instance, to get the trunk version:
<code>
svn co https://svn.apache.org/repos/asf/ant/ivy/core/trunk ivy
</code>
<h3>Build</h3>
Go to the directory where you get the Ivy sources (you should see a file named build.xml) and run:
<code>
ant
</code>
<h3>Check the result</h3>
The ant build will compile the core classes of Ivy and use them to resolve the dependencies (used for some optional features). Then it will compile and run tests with coverage metrics.
If everything goes well, you should see the message
<code>
BUILD SUCCESSFUL
</code>
Then you can check the test results in the build/doc/reports/test directory, the jars are in build/artifacts, and the test coverage report in build/doc/reports/coverage
<h1>Coding conventions</h1>
The Ivy code base is supposed to follow the standard java conventions:
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
This is a work in progress though (see IVY-511), but patches helping migration to these conventions are welcome.
<h1>Developing with eclipse</h1>
Even though you can develop Ivy with your IDE of choice, we support eclipse development by providing ad hoc metadata.
We currently provide two options:
<h2>Eclipse alone</h2>
To develop with a simple eclipse install all you need is eclipse 3.1 or greater, with no particular plugin.
First call the following ant target in your Ivy workspace:
<code>
ant eclipse-default
</code>
This will resolve the dependencies of Ivy and produce a .classpath using the resolved jars for the build path.
Then you can use the "Import->Existing project into workspace" eclipse feature to import the Ivy project in your workspace.
<h2>Eclipse + IvyDE</h2>
You can also leverage the latest IvyDE version to be able to easily resolve the ivy dependencies from Eclipse.
To do so all you need is call the following ant target in your Ivy workspace:
<code>
ant eclipse-ivyde
</code>
or if you don't have ant installed you can simply copy the file .classpath.ivyde and rename it to .classpath
Then you can import the project using "Import->Existing project into workspace" as long as you already have latest IvyDE installed.
To install latest IvyDE version compatible with the latest Ivy used to resolve Ivy dependencies, you will need to use a snapshot build, not endorsed by the ASF, available here:
http://people.apache.org/~xavier/ivyde/snapshot/
Download the file and unzip its content in your eclipse installation directory.
<h2>recommended plugins</h2>
The Ivy project comes with settings for the <a href="http://eclipse-cs.sourceforge.net/">checkstyle plugin</a> we recommend to use to avoid introducing new disgression to the checkstyle rules we use.
If you use this plugin, you will many errors in Ivy. As we said, following strict checkstyle rules is a work in progress and we used to have pretty different code conventions (like using _ as prefix for private attributes), so we still have things to fix. We usually use the filter in the problems view to filter out checkstyle errors from this view, which helps to know what the real compilation problem are.
Besides this plugin we also recommend to use a subversion plugin, <a href="http://www.eclipse.org/subversive/">subversive</a> or <a href="http://subclipse.tigris.org">subclipse</a> being the two options currently available in the open source landscape.
</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>