From a6fd8bd06368da27bb97528da4a2cd7f864ea6d2 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 14 Sep 2016 21:37:29 +0300 Subject: Remove broken changelog section for release notes and related code Change-Id: I1e35dcbe4f75cb8b21a7c2a78143556522f32363 --- all/pom.xml | 34 ---- .../buildhelpers/FetchReleaseNotesTickets.java | 171 --------------------- all/src/main/templates/release-notes.html | 17 +- 3 files changed, 4 insertions(+), 218 deletions(-) delete mode 100644 all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java diff --git a/all/pom.xml b/all/pom.xml index be6511ff8f..1630241db7 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -12,7 +12,6 @@ jar - ${project.build.directory}/generated-resources/releasenotes/release-notes-tickets.html ${project.build.outputDirectory}/WebContent/ yyyy-MM-dd @@ -135,9 +134,6 @@ - @@ -157,9 +153,6 @@ value="${vaadin.gwt.version}" /> - @@ -254,33 +247,6 @@ - - org.codehaus.mojo - exec-maven-plugin - - - fetch-release-notes-tickets - process-classes - - exec - - - compile - ${java.home}/bin/java - - -Dvaadin.version=${project.version} - -classpath - - - com.vaadin.buildhelpers.FetchReleaseNotesTickets - - - ${relnotes.tickets.file} - - - - - maven-dependency-plugin diff --git a/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java b/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java deleted file mode 100644 index 7865770be8..0000000000 --- a/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2000-2016 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.buildhelpers; - -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.io.IOUtils; - -public class FetchReleaseNotesTickets { - private static final String queryURL = "https://dev.vaadin.com/query?status=pending-release&status=released&@milestone@&resolution=fixed&col=id&col=summary&col=owner&col=type&col=priority&col=component&col=version&col=bfptime&col=fv&format=tab&order=id"; - private static final String ticketTemplate = "" + "@badge@" // - + "#@ticket@" // - + "@description@" // - + ""; // - - public static void main(String[] args) throws IOException { - String versionsProperty = System.getProperty("vaadin.version"); - if (versionsProperty == null || versionsProperty.equals("")) { - usage(); - } - String milestone = ""; - - List versions = new ArrayList<>(); - for (String version : versionsProperty.split(" ")) { - if (version.endsWith(".0") || version.matches(".*\\.rc\\d+")) { - // Find all prerelease versions for final or rc - - // Strip potential rc prefix - version = version.replaceAll("\\.rc\\d+$", ""); - versions.addAll(findPrereleaseVersions(version)); - } else { - versions.add(version); - } - } - - for (String version : versions) { - if (!milestone.equals("")) { - milestone += "&"; - } - milestone += "milestone=Vaadin+" + version; - } - - printMilestone(milestone); - } - - private static List findPrereleaseVersions(String baseVersion) { - List versions = new ArrayList<>(); - - for (int i = 0; i < 50; i++) { - versions.add(baseVersion + ".alpha" + i); - } - for (int i = 0; i < 10; i++) { - versions.add(baseVersion + ".beta" + i); - } - for (int i = 0; i < 10; i++) { - versions.add(baseVersion + ".rc" + i); - } - - return versions; - } - - private static void printMilestone(String milestone) - throws MalformedURLException, IOException { - - URL url = new URL(queryURL.replace("@milestone@", milestone)); - URLConnection connection = url.openConnection(); - InputStream urlStream = connection.getInputStream(); - - List tickets = IOUtils.readLines(urlStream); - - for (String ticket : tickets) { - // Omit BOM - if (!ticket.isEmpty() && ticket.charAt(0) == 65279) { - ticket = ticket.substring(1); - } - String[] fields = ticket.split("\t"); - if ("id".equals(fields[0])) { - // This is the header - continue; - } - String summary = fields[1]; - - summary = modifySummaryString(summary); - - String badge = ""; - if (fields.length >= 8 && !fields[7].equals("")) { - badge = "Priority"; - } else if (fields.length >= 9 - && fields[8].equalsIgnoreCase("true")) { - badge = "Vote"; - } - - System.out.println(ticketTemplate.replace("@ticket@", fields[0]) - .replace("@description@", summary) - .replace("@badge@", badge)); - } - urlStream.close(); - } - - private static String modifySummaryString(String summary) { - - if (summary.startsWith("\"") && summary.endsWith("\"")) { - // If a summary starts with " and ends with " then all quotes in - // the summary are encoded as double quotes - summary = summary.substring(1, summary.length() - 1); - summary = summary.replace("\"\"", "\""); - } - - // this is needed for escaping html - summary = escapeHtml(summary); - - return summary; - } - - /** - * @since 7.4 - * @param string - * the string to be html-escaped - * @return string in html-escape format - */ - private static String escapeHtml(String string) { - - StringBuffer buf = new StringBuffer(string.length() * 2); - - // we check the string character by character and escape only special - // characters - for (int i = 0; i < string.length(); ++i) { - - char ch = string.charAt(i); - String charString = ch + ""; - - if ((charString).matches("[a-zA-Z0-9., ]")) { - // character is letter, digit, dot, comma or whitespace - buf.append(ch); - } else { - int charInt = ch; - buf.append("&"); - buf.append("#"); - buf.append(charInt); - buf.append(";"); - } - } - return buf.toString(); - } - - private static void usage() { - System.err.println( - "Usage: " + FetchReleaseNotesTickets.class.getSimpleName() - + " -Dvaadin.version="); - System.exit(1); - } -} diff --git a/all/src/main/templates/release-notes.html b/all/src/main/templates/release-notes.html index 39bd15d2ca..b7e740f34e 100644 --- a/all/src/main/templates/release-notes.html +++ b/all/src/main/templates/release-notes.html @@ -68,20 +68,11 @@

Change Log for Vaadin @version@

- -

This release includes the following closed issues:

- - - @release-notes-tickets@ - - - -
 
VoteEnhancements Vaadin support users have voted for
PriorityDefects Vaadin support users have prioritized
-
+

- You can also view the list - of all changes . + You can find the full list of all changes in + GitHub.

Enhancements in Vaadin @version-minor@

-- cgit v1.2.3