You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/06/25 13:52:21 UTC
[commons-build-plugin] 04/06: Fix running on Java 11 and up.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-build-plugin.git
commit 7433bea90ad971beac4eecb6c1ecdce0b099dd9c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jun 25 09:49:58 2023 -0400
Fix running on Java 11 and up.
---
RELEASE-NOTES.txt | 177 ++++++++++--------------------
pom.xml | 10 ++
src/changes/changes.xml | 21 +++-
src/changes/release-notes.vm | 105 ++++++++++++++++++
src/main/scripts/generate-xdocs.build.xml | 2 +-
5 files changed, 193 insertions(+), 122 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 32630b4..2d719a9 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,119 +1,58 @@
- Apache Commons Build Plugin
- Release Notes
-
-
-INTRODUCTION:
-
-The Apache Commons Build Plugin is a Maven Plugin which can be used by Apache Commons components.
-
-See:
- https://commons.apache.org/commons-build-plugin/
-
-VERSION 1.12 - 2020-10-17
--------------------------
-
-Changes since the last release:
-1. COMMONSSITE-137 - commons-build:all ignores commons.release.hash settings (fix; sebb)
-2. commons-build:mail-page - add links to lists.apache.org (update;sebb)
-3. Enable GitHub build (update; ggregory)
-4. spotbugs-maven-plugin 4.0.0 -> 4.1.3 (update; Dependabot)
-5. actions/checkout v2.3.1 -> v2.3.3 (update; Dependabot)
-6. versions-maven-plugin 2.7 -> 2.8.1 (update; Dependabot)
-7. actions/setup-java v1.4.0 -> v1.4.2 (update; Dependabot)
-
-VERSION 1.11 - 2019-08-30
--------------------------
-
-Changes since the last release:
-1. versions-maven-plugin 2.5 -> 2.7. (update; ggregory)
-2. maven-plugin-plugin 3.5.2 -> 3.6.0. (update; ggregory)
-3. maven-plugin-tools-ant 3.5.2 -> 3.6.0. (update; ggregory)
-4. commons.release-plugin.version 1.5 -> 1.6. (update; ggregory)
-5. Replace http://mail-archives.apache.org with https://mail-archives.apache.org. (update; ggregory)
-
-
-VERSION 1.10 - 2019-02-26
--------------------------
-
-Changes since the last release:
-1. Use SHA512 signatures as the default in the download page. (update; ggregory)
-2. Use SHA256 signatures as the default in the download page. (update; sebb)
-
-VERSION 1.9 - 2018-06-16
-------------------------
-
-Changes since the last release:
-1. Fix in src/main/resources/commons-xdoc-templates/readme-md-template.md for components that have a major version number in their artifact IDs.
-2. Add a goal for creating all items for pre-release.
-3. Fix README.md generation typo: 'JavaDoc' -> 'Javadoc'.
-4. Change the Maven goal prefix from "commons" to "commons-build".
-5. Add a goal for generating the NOTICE.txt file.
-6. Update platform requirement from Java 7 to Java 8.
-
-VERSION 1.8 - 2018-04-02
-------------------------
-
-Changes since the last release:
-1. Fix EOL-style so generated files have correct setting
-2. Change download page from MD5 to SHA1
-3. Include Javadoc badge in README.md file.
-
-VERSION 1.7 - 2016-11-18
-------------------------
-
-Changes since the last release:
-1. Include badges in the README.md file. Issue: COMMONSSITE-90.
-2. Build plugin does not pass the JIRA_ID property when generating README.md. Issue: COMMONSSITE-91.
-
-VERSION 1.6 - 2016-04-24
-------------------------
-
-Changes since the last release
-1. Added new download-page subdir property: set this (e.g. to '1.2' or 'lang-1.2' etc) to override the default of binaries/source
-
-VERSION 1.5 - 2015-11-28
-------------------------
-
-Changes since the last release:
-1. Added new goals: contributing-md and readme-md - to build Markdown formatted intro files for GitHub.
-2. Download Page - Better describes KEYS file (and uses https links)
-3. Use Apache Commons rather than just Commons
-
-VERSION 1.4 - 2012-03-06
-------------------------
-
-Changes since the last release:
-1. Fix announce mod_mbox link
-2. Mailing List Page - Make it clear that you have to be subscribed to post.
-3. COMMONSSITE-66 - Add support for a "commons.release.3" set of properties to offer a 3rd download option.
-
-VERSION 1.3 - 2010-04-15
-------------------------
-
-Changes since the last release:
-1. Add facility to generate custom mailing list page
-2. Add new ${commons.release.name} property for the download page generation
-
-
-VERSION 1.2 - 2010-02-23
-------------------------
-
-Changes since the last release:
-1. Improve the L&F of the download page
-2. Add facility to add a second version to the download page
-3. Upgrade to commons-parent version 12
-
-VERSION 1.1 - 2008-07-16
-------------------------
-
-Changes since the last release:
-1. Upgrade to commons-parent version 10
-2. Add assembly descriptors
-3. Minor documentation corrections
-4. COMMONSSITE-36 - plugin won't build because of missing OSGi manifest file.
-5. COMMONSSITE-35 - Upgrade to Ant 1.7.1 (fixes two problems/bugs when generating
- Jira/download pages).
-
-VERSION 1.0 - 2008-02-24
-------------------------
-Initial Release
+ Apache Commons Build Plugin Maven Mojo 1.13-SNAPSHOT RELEASE NOTES
+
+Apache Maven Mojo for Apache Commons Build tasks.
+
+For example:
+mvn commons-build:download-page [-Dcommons.release.version=1.2.3]
+
+To use a SNAPSHOT version (for testing etc)
+mvn org.apache.commons:commons-build-plugin:1.12-SNAPSHOT:download-page [-Dcommons.release.version=1.2.3]
+
+Feature release
+
+Changes in this version include:
+
+New features:
+o Add property commons.dist.subdir. Thanks to Gary Gregory.
+o Add github/codeql-action. Thanks to Gary Gregory.
+
+Fixed Bugs:
+o Fix running on Java 11 and up. Use GraalVM instead of Java 8 Nashorn for JavaScript, which was deprecated in Java 11 and removed in Java 15.
+ Unfortunately, you will see this output on the console at the end of a successful build:
+
+ Exception in thread "Thread-2" java.lang.NoClassDefFoundError: org/graalvm/collections/EconomicMapImpl$3
+ at org.graalvm.collections.EconomicMapImpl.iterator(EconomicMapImpl.java:846)
+ at com.oracle.truffle.polyglot.PolyglotEngineImpl.collectAliveContexts(PolyglotEngineImpl.java:1261)
+ at com.oracle.truffle.polyglot.PolyglotEngineImpl.ensureClosed(PolyglotEngineImpl.java:1158)
+ at com.oracle.truffle.polyglot.PolyglotEngineImpl$PolyglotShutDownHook.run(PolyglotEngineImpl.java:1407)
+ at java.lang.Thread.run(Thread.java:750)
+ Caused by: java.lang.ClassNotFoundException: org.graalvm.collections.EconomicMapImpl$3
+ at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
+ at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
+ at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
+ at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
+ ... 5 more Thanks to Gary Gregory.
+o Fix minor typos #79. Thanks to Marc Wrobel.
+
+Changes:
+o Bump Ant integration from org.apache.maven:maven-script-ant to org.apache.maven.plugin-tools:maven-script-ant 3.9.0. Thanks to Gary Gregory.
+o Bump actions/cache from 2 to 3.0.11, #25, #37, #51, #65, #88, #91, #94. Thanks to Dependabot, Gary Gregory.
+o Bump actions/checkout from 2.3.3 to 3.1.0 #9, #14, #21, #48, #70, #92. Thanks to Dependabot, Gary Gregory.
+o Bump actions/setup-java from 2 to 3.6.0 #97. Thanks to Gary Gregory, Dependabot.
+o Bump actions/upload-artifact from 3.1.0 to 3.1.1. Thanks to Dependabot.
+o Bump github/codeql-action from 2.1.30 to 2.1.35 #103, #107. Thanks to Dependabot.
+o Bump maven-antrun-plugin from 1.8 to 3.1.0, #18, #71. Thanks to Dependabot.
+o Bump spotbugs-maven-plugin from 4.1.3 to 4.7.3.0 #56, #58, #66, #73, #75, #77, #82, #93, #106. Thanks to Gary Gregory, Dependabot.
+o Bump spotbugs from 4.1.3 to 4.7.3, #24, #26, #57, #63, #72, #80, #98. Thanks to Gary Gregory, Dependabot.
+o Bump maven-plugin-plugin from 3.6.0 to 3.9.0, #33, #52, #61, #104, #127, #138, #154. Thanks to Gary Gregory.
+o Bump maven-plugin-tools-ant from 3.6.0 to 3.9.0, #32, #53, #59, #126, #139, #152. Thanks to Gary Gregory.
+o Bump versions-maven-plugin from 2.9.0 to 2.15.0 #64, #74, #81, #101. #115, #119. #136. Thanks to Dependabot.
+o Bump commons-parent from 52 to 58 #67, #86, #110, #120, #153. Thanks to Dependabot, Gary Gregory.
+
+
+For complete information on Apache Commons Build Plugin Maven Mojo, including instructions on how to submit bug reports,
+patches, or suggestions for improvement, see the Apache Commons Build Plugin Maven Mojo website:
+
+https://commons.apache.org/proper/commons-build-plugin/
+
+Download page: https://commons.apache.org/proper/commons-build-plugin/download_codec.cgi
diff --git a/pom.xml b/pom.xml
index aa4ed14..736c1c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,6 +82,16 @@
</developers>
<dependencies>
+ <dependency>
+ <groupId>org.graalvm.js</groupId>
+ <artifactId>js</artifactId>
+ <version>${graalvm.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.graalvm.js</groupId>
+ <artifactId>js-scriptengine</artifactId>
+ <version>${graalvm.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script-ant</artifactId>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d0ec8f6..e7b9095 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -29,14 +29,31 @@
<body>
<release version="1.13" date="20YY-MM-DD" description="Feature release">
<!-- FIX -->
+ <action dev="ggregory" type="fix" due-to="Gary Gregory">
+ Fix running on Java 11 and up. Use GraalVM instead of Java 8 Nashorn for JavaScript, which was deprecated in Java 11 and removed in Java 15.
+ Unfortunately, you will see this output on the console at the end of a successful build:<![CDATA[
+
+ Exception in thread "Thread-2" java.lang.NoClassDefFoundError: org/graalvm/collections/EconomicMapImpl$3
+ at org.graalvm.collections.EconomicMapImpl.iterator(EconomicMapImpl.java:846)
+ at com.oracle.truffle.polyglot.PolyglotEngineImpl.collectAliveContexts(PolyglotEngineImpl.java:1261)
+ at com.oracle.truffle.polyglot.PolyglotEngineImpl.ensureClosed(PolyglotEngineImpl.java:1158)
+ at com.oracle.truffle.polyglot.PolyglotEngineImpl$PolyglotShutDownHook.run(PolyglotEngineImpl.java:1407)
+ at java.lang.Thread.run(Thread.java:750)
+ Caused by: java.lang.ClassNotFoundException: org.graalvm.collections.EconomicMapImpl$3
+ at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
+ at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
+ at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
+ at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
+ ... 5 more]]>
+ </action>
<action dev="ggregory" type="fix" due-to="Marc Wrobel">
Fix minor typos #79.
</action>
<!-- ADD -->
- <action dev="ggregory" type="add" due-to="Dependabot">
+ <action dev="ggregory" type="add" due-to="Gary Gregory">
Add property commons.dist.subdir.
</action>
- <action dev="ggregory" type="add" due-to="Dependabot">
+ <action dev="ggregory" type="add" due-to="Gary Gregory">
Add github/codeql-action.
</action>
<!-- UPDATE -->
diff --git a/src/changes/release-notes.vm b/src/changes/release-notes.vm
new file mode 100644
index 0000000..caa0c19
--- /dev/null
+++ b/src/changes/release-notes.vm
@@ -0,0 +1,105 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you 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.
+ ${project.name} ${version} RELEASE NOTES
+
+$introduction.replaceAll("(?<!\015)\012", "
+").replaceAll("(?m)^ +","")
+
+## N.B. the available variables are described here:
+## http://maven.apache.org/plugins/maven-changes-plugin/examples/using-a-custom-announcement-template.html
+## Hack to improve layout: replace all pairs of spaces with a single new-line
+$release.description.replaceAll(" ", "
+")
+
+## set up indent sizes. Only change indent1
+#set($props=${project.properties})
+#set($jiralen=$props.get("commons.jira.id").length())
+## indent1 = codec-nnnn:
+#set($blanklen=$jiralen+6)## +6 for "-nnnn:"
+## must be at least as long as the longest JIRA id
+#set($blanks=" ")
+#set($indent1=$blanks.substring(0,$blanklen))
+## indent2 allows for issue wrapper
+#set($indent2="$indent1 ")
+##
+#macro ( processaction )
+## Use replaceAll to fix up LF-only line ends on Windows.
+#set($action=$actionItem.getAction().replaceAll("\n","
+"))
+## Fix up indentation for multi-line action descriptions
+#set($action=$action.replaceAll("(?m)^ +",$indent2))
+#if ($actionItem.getIssue())
+#set($issue="$actionItem.getIssue():")
+## Pad shorter issue numbers
+#if ($issue.length() < $indent1.length())#set ($issue="$issue ")#end
+#if ($issue.length() < $indent1.length())#set ($issue="$issue ")#end
+#if ($issue.length() < $indent1.length())#set ($issue="$issue ")#end
+#else
+#set($issue=$indent1)
+#end
+#if ($actionItem.getDueTo())
+#set($dueto=" Thanks to $actionItem.getDueTo().")
+#else
+#set($dueto="")
+#end
+o $issue ${action}$dueto
+#set($action="")
+#set($issue="")
+#set($dueto="")
+#end
+##
+#if ($release.getActions().size() == 0)
+No changes defined in this version.
+#else
+Changes in this version include:
+
+#if ($release.getActions('add').size() !=0)
+New features:
+#foreach($actionItem in $release.getActions('add'))
+#processaction()
+#end
+#end
+
+#if ($release.getActions('fix').size() !=0)
+Fixed Bugs:
+#foreach($actionItem in $release.getActions('fix'))
+#processaction()
+#end
+#end
+
+#if ($release.getActions('update').size() !=0)
+Changes:
+#foreach($actionItem in $release.getActions('update'))
+#processaction()
+#end
+#end
+
+#if ($release.getActions('remove').size() !=0)
+Removed:
+#foreach($actionItem in $release.getActions('remove'))
+#processaction()
+#end
+#end
+## End of main loop
+#end
+
+For complete information on ${project.name}, including instructions on how to submit bug reports,
+patches, or suggestions for improvement, see the ${project.name} website:
+
+${project.url}
+
+Download page: ${project.url}download_codec.cgi
diff --git a/src/main/scripts/generate-xdocs.build.xml b/src/main/scripts/generate-xdocs.build.xml
index e420e85..fd9c4a8 100644
--- a/src/main/scripts/generate-xdocs.build.xml
+++ b/src/main/scripts/generate-xdocs.build.xml
@@ -500,7 +500,7 @@
<script manager="javax" language="javascript">
<![CDATA[
- project.setProperty("commons.currentYear", new Date().getFullYear());
+ project.setProperty("commons.currentYear", parseInt(new Date().getFullYear()));
]]>
</script>