Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts

Monday, January 19, 2009

Using p2 Composite Repositories

In the Eclipse Ganymede release the p2 repository format (for the default repository types) on the file-system was always growing. This was a problem for our Release Engineering team because we would keep doing builds, and the repositories would grow and grow in size. And what if a build was determined to be bad and it needed to be deleted? All of the artifacts (features, bundles, etc) for all of the builds were merged together and the index file for the repository was huge... it was nearly impossible to do the right thing.

Late in 2008 we released support for "composite repositories". This enables people to create a single repository index file which refers to children which can exist in different locations. This way the user only needs to know a single URI for the location of the repository, but they really have access to multiple repositories.

For example the current layout (for a co-located artifact and metadata repository) is:
   /repo
   /repo/artifacts.xml
   /repo/content.xml
   /repo/features/
   /repo/plugins/

With composite repositories it will be possible to have a layout such as:
   /repo/compositeArtifacts.xml
   /repo/compositeContent.xml
   /repo/I20090113-0800/
   /repo/I20090113-0800/artifacts.xml
   /repo/I20090113-0800/content.xml
   /repo/I20090113-0800/features/
   /repo/I20090113-0800/plugins/
   /repo/3.5M5/
   /repo/3.5M5/artifacts.xml
   /repo/3.5M5/content.xml
   /repo/3.5M5/features/
   /repo/3.5M5/plugins/

As you can see with the new layout, it will be much easier for release engineers to clean up old builds and remove bogus files.

Note that in the above example the child repositories do not have to be physically located as children on the file-system... they can be anywhere. Also note that we plan to provide support for non-local child repositories soon.

Recently we have been working on the creation of Ant tasks to make this support more accessible for release engineers and for easier integration into their build process. As of this week, all of the pieces will be released to make this happen.

More information can be found on the p2 wiki page.