 |
This page describes how to build the core JXTA projects using the Maven build system from Apache.
The projects covered in this page includes JXTA platform, shell, CMS, and MyJXTA. It was developed using Maven 1.1, Beta 2, and release 2.3.5 of the JXTA projects. Until the build files are included in CVS, you can download a copy from http://www.oaktop.com/go/jxta/jxta-maven-2.zip.
Note that this page assumes you already have Maven installed. Please consult the Maven installation guide to install Maven on your system before continuing.
The following steps detail how to build the various projects of JXTA. They are listed in the order of dependency. For example, you would need to have built platform, shell, and CMS before you can build MyJXTA. If you don't want to build them yourself, you need to manually install the JARs inside Maven's local repository.
Building Platform (Java)
- Get a copy of the Platform source code from either CVS or http://download.jxta.org/.
- Make sure that you have the most recent Maven build files (project.xml, project.properties, and maven.xml). You may need to download the patch from the link above.
- Most dependencies have already been standardized to use the repository from ibiblio.org. However, SwiML is not available on ibiblio.org. You will need to put a copy of it under ${user.home}/.maven/repository/swixml/jars/. (Note also that swiml.jar is not included in either CVS or the source archive, and you probably need to get it from jxta-lib*.jar at http://download.jxta.org/).
- Once you put the JARs in place, type "maven java:compile" inside the directory where project.xml is located. If this is the first time you run it, Maven will now connect to ibiblio.org to download all the dependent JARs. After that, it will compile all the source files.
- Now, type "maven jar:install". This will package up the platform classes into a JAR and install it inside your local repository. Be patient, as the build process will invoke unit tests, so it may take a while.
- Once that's completed, you now have the JXTA platform installed as a Maven JAR inside your local repository.
- You can also type "maven site" to generate the site. After the build is completed, you will find it project site under /target/docs.
Tip: If you get tired of waiting for the unit tests, you can pass a "-Dmaven.test.skip=true" on the command line to skip the tests.
Note: The update file set contains a build.xml, which is a replacement Ant file that shares some properties with the Maven build. If you do not plan to use Maven and Ant togather for a long time, you can safely not copy that file over.
Building Shell
- Get a copy of the Shell source code from either CVS or http://download.jxta.org/.
- Make sure that you have the most recent Maven build files (project.xml, project.properties, and maven.xml). You may need to download the patch from the link above.
- Also make sure that you have already built JXTA platform from above. If you don't want to build it, then put a copy of jxta-2.3.5.jar inside ${user.home}/.maven/repository/jxta/jars/ (or whatever the corresponding version is).
- Type "maven jar:install". This will build a JAR out of all the shell classes and install it inside your local repository.
- You can also try a number of different targets, such as "maven java:compile", "maven javadoc", or "maven site".
Building CMS
- Get a copy of the CMS source code from either CVS or http://download.jxta.org/.
- Make sure that you have the most recent Maven build files (project.xml, project.properties, and maven.xml). You may need to download the patch from the link above.
- Also make sure that you have already built JXTA shell from above. If you don't want to build it, then put a copy of jxta-shell-2.3.5.jar inside ${user.home}/.maven/repository/jxta/jars/ (or whatever the corresponding version is).
- Type "maven jar:install". This will build a JAR out of all the CMS classes and install it inside your local repository.
- You can also try a number of different targets, such as "maven java:compile", "maven javadoc", or "maven site".
Building MyJXTA
- Get a copy of the MyJXTA source code from either CVS or http://download.jxta.org/.
- Make sure that you have the most recent Maven build files (project.xml, project.properties, and maven.xml). You may need to download the patch from the link above.
- Also make sure that you have already built JXTA shell and JXTA CMS from above. If you don't want to build them, then put a copies of jxta-shell-2.3.5.jar and jxta-cms-2.3.5.jar inside ${user.home}/.maven/repository/jxta/jars/ (or whatever the corresponding version is).
- A large number of MyJXTA dependencies are not available in ibiblio.org. Because of this, you need to copy all the JARs under /lib of the source code base to ${user.home}/.maven/repository/myjxta-lib/jars/.
- In addition, you need to download JMF (Java Media Framework) from http://java.sun.com/products/java-media/jmf/2.1.1/download.html and put a copy of jmf.jar inside ${user.home}/.maven/repository/myjxta-lib/jars/ as well.
- Type "maven jar:install". This will build a JAR out of all the MyJXTA classes and install it inside your local repository.
- You can also try a number of different targets, such as "maven java:compile", "maven javadoc", or "maven site".
The mavenization of the JXTA projects is an on-going task. This page will be updated from time to time on the status. Eventually, the goal is for the Maven build file to be able to compile, test, generate site, sign, and package as web start. Most dependencies should also be standardized from ibiblio.org or another central repository, so that there will be no need for manual copying of JARs. Please send your question to the JXTA dev mailing list if you have any problem using the build files.
-- PeterChan?- 10 Oct 2005
|