-
Notifications
You must be signed in to change notification settings - Fork 26
Home
mickaelistria edited this page Mar 15, 2013
·
5 revisions
This repository contains some utils Maven plugins that are developed and used in the context of (JBoss Tools)[http://www.jboss.org/tools], They are mostly targetting builds of Eclipse artifacts with (Tycho)[http://eclipse.org/tycho]
- Current version is 0.16.0.CR1 and is compatible with Tycho 0.16
- Current snapshot is 0.16.0-SNAPSHOT and is compatible with Tycho 0.16
Those artifacts are made public on JBoss Nexus repository. In order to use them, add the JBoss Nexus repository either to your pom.xml
or settings.xml
:
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</pluginRepository>
<pluginRepository>
<id>jboss-snapshots-repository</id>
<name>JBoss Snapshots Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
</pluginRepository>
</pluginRepositories>
This Mojo allows to add to p2 repository produced by Tycho some more suger:
- An index.html listing IUs (overridable template)
- p2 stats URL
- Some more additional sites (ie references)
You can use it as follows
<build>
...
<plugins>
<plugin>
<groupId>org.jboss.tools.tycho-plugins</groupId>
<artifactId>repository-utils</artifactId>
<version>0.16.0-SNAPSHOT</version>
<executions>
<execution>
<id>generate-facade</id>
<phase>package</phase>
<goals>
<goal>generate-repository-facade</goal>
</goals>
<configuration>
<!-- Symbols are used while expanding index.html template -->
<symbols>
<update.site.name>My p2 Repo</update.site.name>
<update.site.description>Use this URL in Eclipse to install awesome stuff</update.site.description>
</symbols>
<p2StatsUrl>http://server.org/url/where/to/push/stats</p2StatsUrl>
<associateSites>
<site>http://download.eclipse.org/releases/kepler</site>
</associateSites>
</configuration>
</execution>
</executions>
<plugin>
<plugins>
<build>
To override the HTML template and web resources
- Create a folder siteTemplate somewhere in your project
- Create an index.html file in this folder. This index.html file is a template for the output index.html of the mojo. This index.html can use relative path to reference resources in the siteTemplate folder. For instance, if siteTemplate contains a file in web/style.css, you can reference
web/style.css
from your template file. The expanded template will correctly resolve this reference. - Add the following configuration to the mojo execution:
<siteTemplateFolder>path/to/your/custom/folder</siteTemplateFolder>
- Optional,
<indexName>index.html</indexName>
so you can set another name that index.html to your template (for example index.xhtml)
What is modified in templates:
- String
${site.contents}
gets replaced by a table containing the list of features, versions and categories that fit into - For each symbol
<key>value</key>
defined in the<symbols>
tag of configuration, the string${key}
in HTML template gets replaced by the stringvalue
.