You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2023/03/16 16:05:44 UTC
[causeway] 01/03: CAUSEWAY-3382: a further iteration
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 38e2439c580c3c699f7762599744f866b7d3150c
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Mar 16 14:35:24 2023 +0000
CAUSEWAY-3382: a further iteration
---
scripts/ci/rename-all-published-sources.jsh | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/scripts/ci/rename-all-published-sources.jsh b/scripts/ci/rename-all-published-sources.jsh
index fd0942807f..4a0dc4c9e7 100644
--- a/scripts/ci/rename-all-published-sources.jsh
+++ b/scripts/ci/rename-all-published-sources.jsh
@@ -115,7 +115,11 @@ class RenameProject {
static final List<String> UNCONDITIONAL_INCLUSIONS = List.of(
"/META-INF/services/");
- public RenameProject(final File root, final String oldName, final String newName) {
+ public static RenameProject renameBackToLegacy(final File root) {
+ return new RenameProject(root, "causeway", "isis");
+ }
+
+ private RenameProject(final File root, final String oldName, final String newName) {
this.root = root;
this.fromLower = oldName.toLowerCase();
this.toLower = newName.toLowerCase();
@@ -215,31 +219,33 @@ class RenameProject {
// update schema declarations in .layout.xml files.
// terrible hack - we are assuming the target is 'isis'
+ // (also, the first arg has to handle the case that we've already converted replaced 'causeway' -> 'isis' throughout...)
.replace(
- "https://causeway.apache.org/applib/layout/menubars/bootstrap3 https://causeway.apache.org/applib/layout/menubars/bootstrap3/menubars.xsd",
+ "https://isis.apache.org/applib/layout/menubars/bootstrap3 https://isis.apache.org/applib/layout/menubars/bootstrap3/menubars.xsd",
"http://isis.apache.org/applib/layout/menubars/bootstrap3 https://causeway.apache.org/applib/layout-v1/menubars/bootstrap3/menubars.xsd")
.replace(
- "https://causeway.apache.org/applib/layout/component https://causeway.apache.org/applib/layout/component/component.xsd",
+ "https://isis.apache.org/applib/layout/component https://isis.apache.org/applib/layout/component/component.xsd",
"http://isis.apache.org/applib/layout/component https://causeway.apache.org/applib/layout-v1/component/component.xsd")
.replace(
- "https://causeway.apache.org/applib/layout/grid/bootstrap3 https://causeway.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd",
+ "https://isis.apache.org/applib/layout/grid/bootstrap3 https://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd",
"http://isis.apache.org/applib/layout/grid/bootstrap3 https://causeway.apache.org/applib/layout-v1/grid/bootstrap3/bootstrap3.xsd")
.replace(
- "https://causeway.apache.org/applib/layout/links https://causeway.apache.org/applib/layout/links/links.xsd",
+ "https://isis.apache.org/applib/layout/links https://isis.apache.org/applib/layout/links/links.xsd",
"http://isis.apache.org/applib/layout/links https://causeway.apache.org/applib/layout-v1/links/links.xsd")
// update namespace declarations in all files (.layout.xml and also constants in .java classes)
+ // (again, the first arg has to handle the case that we've already converted replaced 'causeway' -> 'isis' throughout...)
.replace(
- "\"https://causeway.apache.org/applib/layout/menubars/bootstrap3\"",
+ "\"https://isis.apache.org/applib/layout/menubars/bootstrap3\"",
"\"http://isis.apache.org/applib/layout/menubars/bootstrap3\"")
.replace(
- "\"https://causeway.apache.org/applib/layout/component\"",
+ "\"https://isis.apache.org/applib/layout/component\"",
"\"http://isis.apache.org/applib/layout/component\"")
.replace(
- "\"https://causeway.apache.org/applib/layout/grid/bootstrap3\"",
+ "\"https://isis.apache.org/applib/layout/grid/bootstrap3\"",
"\"http://isis.apache.org/applib/layout/grid/bootstrap3\"")
.replace(
- "\"https://causeway.apache.org/applib/layout/links",
+ "\"https://isis.apache.org/applib/layout/links",
"\"http://isis.apache.org/applib/layout/links")
;
@@ -354,7 +360,7 @@ if(rootPath.isBlank()
var root = new File(rootPath);
-var renamer = new RenameProject(root, "causeway", "isis");
+var renamer = RenameProject.renameBackToLegacy(root);
System.out.printf("processing root %s%n", root.getAbsolutePath());
renamer.renameAllFiles();