GlassFish Repo IPS Package Build Instructions
Note: at this point, it is highly recommended that you use Solaris or Linux system for your package development and build. Windows and MacOS builds should work but have not been verified...
Prerequisites
Following tools/utilities should be installed and configured on your system before build:
- Subversion client (svn)
- Maven 2.0.9 (mvn)
- JDK 6 - it's bin directory should be in the PATH, and JAVA_HOME should be set to point to JDK 6 installation directory.
You will also need to install Image Packaging System (IPS) toolkit image for your build platform. Downloads are available here:
UC 2.1 Linux x86 toolkit image
UC 2.1 Solaris x86 toolkit image
UC 2.1 Solaris Sparc toolkit image
UC 2.1 Mac OS toolkit image
UC 2.1 Windows toolkit image
See also the toolkit download page
which has all the downloads listed, including 2.2 development builds
Location where you unzipped your toolkit image will be referred to as ips-toolkit-dir. You should update your PATH and LD_LIBRARY_PATH environment variables in following way:
export PATH=ips-toolkit-dir/pkg/bin:ips-toolkit-dir/pkg/python2.4-minimal/bin:$PATH
export LD_LIBRARY_PATH=ips-toolkit-dir/pkg/python2.4-minimal/lib:ips-toolkit-dir/pkg/vendor-packages:$LD_LIBRARY_PATH
Checking out glassfish-repo source code
Run following command to check out glassfish-repo source:
svn checkout https://glassfish-repo.dev.java.net/svn/glassfish-repo/trunk/packager
Create your own package module(s)
First you will need to decide on the number of packages you want to produce, their names and content, versioning, content file layout. Use these resources at this stage:
Once you know the number of packages and their names you can create package modules using these steps:
- For each package create new directory under packager directory. The name of the directory should be the same as the name of IPS package.
- Using packager/sample-package content as template, add pom.xml, build.xml and license file to each package directory. Adjust pom.xml and build.xml content to fit your package content: define maven dependencies which will bring in package content, add required file processing to build.xml, etc. The expected end result is to have your IPS package content staged under packager/package-name/target/stage directory using the same file layout (including file permissions) as the one you want to see in your installed image. License file should contain license text for your content and will be used as click-through license during your package installation. You can refer to existing packager/hibernate package module for rather trivial example of content staging implementation where hibernate package content is available in maven repository as prepackaged zip archive, it is bootstrapped as maven dependency and then extracted by ant maven plugin into the staging area.
- Using packager/sample-package/src/main/resources/pkg_proto.py file as template, create packager/package-name/src/main/resources/pkg_proto.py file and modify it to include your package metadata. Use makepgs reference
to get more information and some more samples of prototype files. When defining license reference please use the license file from your package module directory.
Start your local repository server
Run following command from your ips-toolkit-dir/bin directory:
pkg.depotd -d ips-toolkit-dir/pkg --rebuild
Note: this will start repository server using default port 10000 and the repository url will therefore be http://localhost:10000. If you want, you can specify different port number. Refer to
pkg.depotd man page
Build you package
Run following command from packager/package-name directory:
mvn -Drepo.url=http://localhost:10000 -Dpython=ips-toolkit-dir/pkg/python2.4-minimal/bin/python -P ips
Note: if you used alternative port number for your repository server, make sure that you adjust repo.url value accordingly!
If everything goes well, this command will bootstrap and stage your package content and publish IPS package based on staged content and prototype file metadata specified in your package module. If not, read error messages carefully and use them to correct your package module files.
Verify your package
To check whether your package got published to your local repository server, you can simply access repository URL in your browser and see the list of packages available on the server. If you see your package, you can proceed to the package testing using GlassFish v3 installation and its update client. Use these steps (if you already have GlassFish v3 Prelude installed and updatetool bootstrapped you can skip first two items):
- Download and install GlassFish v3Prelude distribution
- If using zip based distribution, run installdir/bin/updatetool - this should bootstrap UC client packages. Run updatetool again once the bootstrap is done.
- Add your development repository to your installation image:
- In the left pane make sure that you select image corresponding to your installation directory (if you have multiple GF installation on the system, you will have more than one image listed).
- In the menu select File->Image Properties, select "Add" button
- Enter "mydevrepo" or something similar for repository name and http://localhost:10000/ as repository URL. Confirm, exit Image Properties dialog.
- Select "Available Components", look for your new package, select and install.
At this point you can verify that your files are installed in appropriate locations and perform any relevant functional testing.
Commit your package module
Once you are satisfied that your package works as expected, you can contact glassfish-repo project owners to get permission to commit your package module to glassfish-repo SVN repository.
This page (revision-13) was last changed on
25-Mar-09 20:25 PM, -0700
by Alexis Moussine-Pouckhine.
This page was created on
04-Feb-09 12:38 PM, -0800 by Snjezana.
More info...
| Version |
Date |
Author |
Size |
Changes ... |
|
13
|
25-Mar-09 20:25 PM, -0700
|
Alexis Moussine-Pouckhine |
7025 |
to previous
|
|
12
|
04-Feb-09 17:42 PM, -0800
|
Snjezana |
6858 |
to previous
|
to last
|
|
11
|
04-Feb-09 17:37 PM, -0800
|
Snjezana |
6767 |
to previous
|
to last
|
|
10
|
04-Feb-09 17:07 PM, -0800
|
Snjezana |
6769 |
to previous
|
to last
|
|
9
|
04-Feb-09 17:06 PM, -0800
|
Snjezana |
6758 |
to previous
|
to last
|
|
8
|
04-Feb-09 16:32 PM, -0800
|
Snjezana |
6756 |
to previous
|
to last
|
|
7
|
04-Feb-09 15:58 PM, -0800
|
Snjezana |
3895 |
to previous
|
to last
|
|
6
|
04-Feb-09 15:52 PM, -0800
|
Snjezana |
3632 |
to previous
|
to last
|
|
5
|
04-Feb-09 15:39 PM, -0800
|
Snjezana |
2762 |
to previous
|
to last
|
|
4
|
04-Feb-09 14:19 PM, -0800
|
Snjezana |
1718 |
to previous
|
to last
|
|
3
|
04-Feb-09 13:55 PM, -0800
|
Snjezana |
958 |
to previous
|
to last
|
|
2
|
04-Feb-09 13:52 PM, -0800
|
Snjezana |
958 |
to previous
|
to last
|
|
1
|
04-Feb-09 12:38 PM, -0800
|
Snjezana |
431 |
to last
|