>So you have created that nice P2 update size, using Tycho’s packaging option of eclipse-update-site. You even have it working to create an aggregated site. However, you miss the ability to have a Local Archived version for people to download, or better a P2 Zipped update site. We could call Ant/Antcontrib to generate this but that is so not Maven. The Maven way to do it…use the Assembly plugin.
The Assembly plugin allows you to specify what should be zipped and at what phase. To start with, add the following to your parent pom.xml under pluginManagement.
<plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> <descriptor>org.starstandard.releng/assembly.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>create-project-bundle</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin>
In your update site projects pom.xml file add the following to the build section:
<build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <finalName>site</finalName> </configuration> </plugin> </plugins> </build>
When you run the maven build with the install/package goals, the update site that is generated by your build will be archived into three formats. ZIP, TAR.GZ, and TAR.BZ2 formats. You can now download the P2 zipped file and use it as a local update site. One note on using this format, it puts all the files under a root site directory, so you can’t use this directly as a P2 archived zip file, but you can unzip it and use it as a Local Update site. If anybody knows how to exclude the extra root directory that is being created I would appreciate a note in the comments of this entry.
If you don’t want to control what files get added to the zip, and just want everything in the SITE directory, you can uncomment the includeSiteDirectory option in the assembly.xml file, and this will include the Site directory itself. However when it is added it is added as site/site/ in the archived files. There may be a way to control this using outputFileMapping but I haven’t tried yet.