Bug 482458 [SysML 1.4][releng][updatesite] configure index for update
site
-need to remove all elements relative to JBoss
-need to link to the right p2stats url
Change-Id: I50965bf8f927708b10bf6f73a8b55f670ca63950
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=482458
Signed-off-by: Francois Le Fevre - CEA <francois.le-fevre@cea.fr>
diff --git a/releng/org.eclipse.papyrus.sysml14.p2/pom.xml b/releng/org.eclipse.papyrus.sysml14.p2/pom.xml
index b4ec07b..1245c31 100644
--- a/releng/org.eclipse.papyrus.sysml14.p2/pom.xml
+++ b/releng/org.eclipse.papyrus.sysml14.p2/pom.xml
@@ -16,45 +16,49 @@
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
- <profiles>
- <profile>
- <id>MARS.target</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <!-- https://github.com/jbosstools/jbosstools-maven-plugins/wiki -->
- <groupId>org.jboss.tools.tycho-plugins</groupId>
- <artifactId>repository-utils</artifactId>
- <version>0.23.2</version>
- <executions>
- <execution>
- <id>generate-facade</id>
- <phase>package</phase>
- <goals>
- <goal>generate-repository-facade</goal>
- </goals>
- <configuration>
- <associateSites>
- <site>http://download.eclipse.org/releases/mars</site>
- </associateSites>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-packaging-plugin</artifactId>
- <version>${tycho-version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <!-- https://github.com/jbosstools/jbosstools-maven-plugins/wiki -->
+ <groupId>org.jboss.tools.tycho-plugins</groupId>
+ <artifactId>repository-utils</artifactId>
+ <version>0.23.2</version>
+ <executions>
+ <execution>
+ <id>generate-facade</id>
+ <phase>package</phase>
+ <goals>
+ <goal>generate-repository-facade</goal>
+ </goals>
+ <configuration>
+ <symbols>
+ <update.site.name>SysML 1.4</update.site.name>
+ <update.site.description>Use this URL in Eclipse to install SysML 1.4</update.site.description>
+ <update.site.version>${project.version}</update.site.version>
+ <project.website>https://hudson.eclipse.org/papyrus/view/Sysml/job/papyrus-sysml-website/ws/site-staging/index.html</project.website>
+ <project.issues>${project.issueManagement.url}</project.issues>
+ <eclipse.target>${eclipse.targetrelease}</eclipse.target>
+ <update.site.nightly>https://hudson.eclipse.org/papyrus/view/Sysml/job/papyrus-sysml-nightly-build/ws/releng/org.eclipse.papyrus.sysml14.p2/target/repository/</update.site.nightly>
+ </symbols>
+ <associateSites>
+ <site>https://hudson.eclipse.org/papyrus/view/Sysml/job/papyrus-sysml-website/ws/site-staging/index.html</site>
+ </associateSites>
+ <siteTemplateFolder>siteTemplate</siteTemplateFolder>
+ <p2StatsUrl>http://download.eclipse.org/stats</p2StatsUrl>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-packaging-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
<name>org.eclipse.papyrus.sysml14.p2</name>
<description>This plugin defines the update site of SysML 1.4 plugins and feature.</description>
</project>
\ No newline at end of file
diff --git a/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/index.html b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/index.html
new file mode 100644
index 0000000..9674e71
--- /dev/null
+++ b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/index.html
@@ -0,0 +1,113 @@
+<html>
+<head>
+<title>${update.site.name} Update Site: ${update.site.version}</title>
+<link rel="stylesheet" type="text/css" href="web/site.css">
+</head>
+<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
+<center>
+<table cellspacing="0" cellpadding="0" class="table">
+ <tr>
+ <td colspan="3" class="td_header"> </td>
+ </tr>
+ <tr>
+ <td>      </td>
+ <td>      </td>
+ <td>      </td>
+ </tr>
+ <tr>
+ <td>      </td>
+ <td>
+ <h2 class="title">${update.site.name} Update Site</h2>
+ <table width="100%">
+ <tr class="header">
+ <td class="sub-header" width="100%"><span>Latest Build: ${update.site.version}</span></td>
+ </tr>
+
+ <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <p class="bodyText">This is the <b>${update.site.description}</b>
+ Update Site for ${update.site.name}.
+ <blockquote style="border: 1px dashed #1778be; padding: 2px">
+ <ol>
+ <li>To install
+ from this site, start up Eclipse ${eclipse.target}, then do:
+ <ul>
+ <code><strong>Help > Install New Software... ></strong></code>
+ </ul>
+ </li>
+ <li>Copy this site's URL into Eclipse, and hit Enter.</li>
+ <li>When the site loads, select the features to install,
+ or click the <code><strong>Select All</strong></code> button.</li>
+ <li>To properly resolve all dependencies, check
+ <ul><code><strong>[x] Contact all update sites during install to find required software</strong></code></ul>
+
+ <li>Click <code><strong>Next</strong></code>, agree to the license
+ terms, and install.</li>
+
+ <p class="bodyText">
+ You can also download SysML 1.4 as individual zips for
+ offline installation. See <a class="link"
+ href="https://hudson.eclipse.org/papyrus/view/Sysml/job/papyrus-sysml-nightly-build/ws/releng/org.eclipse.papyrus.sysml14.p2/target/repository/*zip*/repository.zip">SysML 1.4 product
+ Downloads</a>.<br />
+ </p>
+ </ol>
+ </blockquote>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>      </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ ${site.contents}
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <table width="100%">
+ <tr class="header">
+ <td class="sub-header" width="100%"><span> More informations</span></td>
+ </tr>
+ <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <h4>Documentation</h4>
+ <p class="bodyText">You can check here the web site <a href="${project.website}">documentation</a>.</p>
+ <br />
+
+ </td>
+ </tr>
+
+ <tr class="dark-row" style="height: 30px">
+ <td class="bodyText">
+ <h4>Report issues</h4>
+
+ <p>We'd greatly
+ appreciate the assistance in testing and <a
+ href="${project.issues}">reporting of
+ issues in our issue tracker</a>.</p><br/>
+
+ </td>
+ </tr>
+
+ <tr class="light-row" style="height: 30px">
+ <td class="bodyText">
+ <h4>Nightly Builds</h4>
+
+ <p>The <a
+ href="${update.site.nightly}">bleeding
+ edge</a> contains the latest and greatest new features, but nothing is
+ stable or guaranteed - yet. If you're using a Milestone and need a
+ fix, you can update to the latest Nightly, or wait for the next
+ Milestone.</p><br/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</center>
+</html>
diff --git a/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/web/img/sysml-banner.png b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/web/img/sysml-banner.png
new file mode 100644
index 0000000..2797993
--- /dev/null
+++ b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/web/img/sysml-banner.png
Binary files differ
diff --git a/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/web/site.css b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/web/site.css
new file mode 100644
index 0000000..84a9a44
--- /dev/null
+++ b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/web/site.css
@@ -0,0 +1,82 @@
+<
+STYLE type ="text/css">td.spacer {
+ padding-bottom: 10px;
+ padding-top: 10px;
+}
+
+.title {
+ font-family: sans-serif;
+ color: #1778be;
+}
+
+.table {
+ margin-top: 0px;
+ margin-left: 0px;
+ width: 920px;
+}
+
+.bodyText {
+ font-family: sans-serif;
+ font-size: 9pt;
+ color: #000000;
+ width: 100%
+}
+
+.sub-header {
+ background: url('http://download.eclipse.org/eclipse.org-common/themes/solstice/public/images/template/breadcrumbs-large-bg.jpg') center #1b1732;
+ background-size: 100%;
+ color: #fff;
+ text-align: center;
+}
+
+.log-text {
+ font-family: sans-serif;
+ font-style: normal;
+ font-weight: lighter;
+ font-size: 8pt;
+ color: black;
+}
+
+.big-header {
+ font-family: sans-serif;
+ font-style: normal;
+ font-weight: bold;
+ font-size: 9pt;
+ color: white;
+ border-top: 10px solid white;
+}
+
+.light-row {
+ background: #FFFFFF
+}
+
+.dark-row {
+ background: #EEEEEE
+}
+
+.header {
+ background: #445562
+}
+
+#indent {
+ word-wrap: break-word;
+ width: 300px;
+ text-indent: 10px;
+}
+
+.link {
+ color: #187dc6;
+}
+
+.td_header {
+ background: url("img/sysml-banner.png") 0 no-repeat;
+ height: 100px;
+}
+
+.column-header {
+ font-size:small;
+}
+
+</
+STYLE
+>
\ No newline at end of file
diff --git a/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/xslt/site.properties.xsl b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/xslt/site.properties.xsl
new file mode 100644
index 0000000..127c98d
--- /dev/null
+++ b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/xslt/site.properties.xsl
@@ -0,0 +1,20 @@
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan"
+ xmlns:saxon="http://saxon.sf.net/" xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="saxon">
+ <xsl:output method="text" indent="yes" />
+ <xsl:template match="/site">
+ <xsl:for-each select="category-def">
+ <xsl:sort select="@name" />
+ <xsl:variable name="catg"><xsl:value-of select="@name"/></xsl:variable>
+#
+<xsl:value-of select="$catg" />.category.features = \
+<xsl:for-each select="//feature">
+ <xsl:sort select="@id" />
+ <xsl:if test="count(./category[contains(@name,$catg)])>0"><xsl:value-of select="@id" />,
+</xsl:if>
+ </xsl:for-each>
+ </xsl:for-each>
+#
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/xslt/site.xsl b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/xslt/site.xsl
new file mode 100644
index 0000000..235f683
--- /dev/null
+++ b/releng/org.eclipse.papyrus.sysml14.p2/siteTemplate/xslt/site.xsl
@@ -0,0 +1,128 @@
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan"
+ xmlns:saxon="http://saxon.sf.net/" xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="saxon">
+ <xsl:output method="html" indent="yes" />
+ <xsl:template match="/site">
+ <table cellspacing="2" cellpadding="0" border="0">
+ <xsl:if test="count(feature[contains(@id,'papyrus')])>0">
+ <tr style="background-color:#DDDDDD">
+ <th class="column-header">Feature</th>
+ <th class="column-header">Version</th>
+ <th class="column-header">Feature Categor(ies)</th>
+ </tr>
+ <!-- papyrus features -->
+ <xsl:for-each select="feature[contains(@id,'papyrus')]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if>
+ <!-- xsl:if test="count(feature[not(contains(@id,'papyrus'))])>0">
+ <tr style="background-color:#DDDDDD">
+ <th class="column-header">Feature</th>
+ <th class="column-header">Version</th>
+ <th class="column-header">Feature Categor(ies)</th>
+ </tr>
+ <xsl:for-each select="feature[not(contains(@id,'papyrus'))]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:if-->
+
+ <tr style="background-color:#DDDDDD">
+ <th class="column-header">Feature</th>
+ <th class="column-header">Version</th>
+ <th class="column-header">Feature Categor(ies)</th>
+ </tr>
+ <tr style="background-color:#EEEEEE">
+ <td class="rowLine" colspan="1">
+ <a href="artifacts.jar" style="font-size:x-small">artifacts.jar</a>
+ ::
+ <a href="content.jar" style="font-size:x-small">content.jar</a>
+ </td>
+ <td class="rowLine" colspan="1">
+ ::
+ <a href="plugins/" style="font-size:x-small">plugins</a>
+ <xsl:if test="count(feature)>0">
+ ::
+ <a href="features/" style="font-size:x-small">features</a>
+ </xsl:if>
+ </td>
+ <td class="rowLine" colspan="1">
+ <xsl:if test="count(feature[contains(@id,'papyrus')])>0">
+ <a href="category.xml" style="font-size:x-small">category.xml</a>
+ ::
+ <a href="buildinfo.json" style="font-size:x-small">buildinfo.json</a>
+ ::
+ <a href="site.properties" style="font-size:x-small">site.properties</a>
+ </xsl:if>
+ </td>
+ </tr>
+ </table>
+ <br />
+ </xsl:template>
+</xsl:stylesheet>