- Home
- Download
- Documentation (2.0.0-beta1)
- History
- Trunk
- 2.x
- 2.0.x
- 2.0.0-beta1
- 2.0.0-alpha2
- 2.0.0-alpha-1
- 2.0.x
- 1.x
- 0.x
- Get Involved
- Search
Developer doc
Building from source
To build Ivy from source it's really easy.Requirements
All you need is- an svn client to check out Ivy sources from apache svn, not required if you build from sources packaged in a release
- Apache Ant 1.6.2 or greater We recommend either ant 1.6.5 or 1.7.0
- junit 3.8.2 jar in your ant lib this is not required if you use ant 1.7
- a jdk 1.4 or greater Build instructions have been successfully tested with sun jdk 1.4.2, 1.5.0 and 1.6.0
Procedure
Get the source
You can either get the sources from a release, or get them directly from svn. For instance, to get the trunk version:svn co https://svn.apache.org/repos/asf/incubator/ivy/core/trunk ivy
Build
Go to the directory where you get the Ivy sources (you should see a file named build.xml) and run:ant
Check the result
The ant build will download Ivy if you don't already have a proper version in your home, compile, and run tests with coverage metrics.If everything goes well, you should see the message
BUILD SUCCESSFULThen 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
Coding conventions
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.
Developing with eclipse
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:
Eclipse alone
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:
ant eclipse-defaultThis 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.
Eclipse + IvyDE
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:
ant eclipse-ivydeor 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.
Making a release
Requirements
Requirements for making a release are similar to the requirements for building from source, except that sun jdk 1.6 and ant 1.7 are required.Procedure
1. Check the files which needs to be updated for the release.
On the trunk, check that files which require update for the release are up to date.This includes particularly:
RELEASE_NOTES
CHANGES
README
2. Create a release branch
This will allow to work separately from other developers, in case you need any last modification.svn copy https://svn.apache.org/repos/asf/incubator/ivy/core/trunk \
https://svn.apache.org/repos/asf/incubator/ivy/core/branches/2.0.0-alpha1 \
-m "Creating a release branch for 2.0.0-alpha1."
3. Check out the branch
svn co https://svn.apache.org/repos/asf/incubator/ivy/core/branches/2.0.0-alpha1 ivy-2.0.0-alpha1
4. Double check the files which need to be updated for the release.
Check again that files have proper revision information.It's also time to update the documentation template files which will be used for doc generation to include the version information in the page title.
For instance in
doc/homeTemplate.htmlreplace
doc/template.html
doc/printTemplate.html
<title>${title} | Ivy</title>by
<title>${title} | Ivy 2.0.0-alpha1-incubating</title>
5. Commit your changes
svn ci -m "update templates for 2.0.0-alpha-1 release."
6. Check that you have no pending modifications
svn statusIf your working copy is clean, you can launch the release script. If it isn't, make sure to clean it properly. Sometimes you may need to call ant clean-all if you have started to work with ant builds. If you are confused about your working copy state, delete it and check it out again.
7. Launch the release script
ant -Dbuild.version=2.0.0-alpha1-incubating -Dstatus=milestone -f build-release.xml releaseThe status should be release only for final releases, and milestone for any other intermediate release.
If anything is wrong, fix and go back to step 4.
If the release script is successful, release artifacts will be waiting for you in the build/distrib directory.
8. Verify the release
Check that all zips can be opened correctly, and that running 'ant' after unzipping the source distribution works properly.You can also do a smoke test with the generated ivy.jar , to see if it is able to resolve properly a basic module (for instance you can replace the jar you have in your ~/.ivy/jars directory, clean your cache, and run 'ant clean jar'.
9. Sign and upload the artifacts
You will still need to sign the release artifacts and upload them to a location accessible by other Apache commiters10. Cast a vote to approve the release
Cast a vote to approve the release, first on the ivy-dev mailing list, then if it is approved, on the general@incubator.apache.org mailing list11. Tag the svn repository
Now that the release is approved, it is time to tag the svn reposvn copy https://svn.apache.org/repos/asf/incubator/ivy/core/branches/2.0.0-alpha1 \
https://svn.apache.org/repos/asf/incubator/ivy/core/tags/2.0.0-alpha1 \
-m "Tag release 2.0.0-alpha1."
12. Upload to public repository
If the release is approved, it's now time to make it public by uploading it to the public Apache distrib repository (i.e. /www/people.apache.org/dist/incubator/ivy/[version] on people.a.o).13. Announce
Announce the release on the ivy-dev and ivy-user mailing lists, on the general@i.a.o list, announce@apache.org and on the user@ant.apache.org.Announce also the release on Ivy web site by editing the doc/index.html on the trunk.
You can also announce the release on popular web sites, like freshmeat.net (xavier is the owner of the Ivy project on freshmeat), javalobby.org, theserverside.com, dzone.com, ...