[java-identity-provider] branch main updated: IDP-1669 Accessibility on IdP pages
Rod Widdowson
rdw at steadingsoftware.com
Wed Mar 2 11:47:00 UTC 2022
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=86a55365ad156fb41e59b8cc630a5126a16238d3
The following commit(s) were added to refs/heads/main by this push:
new 86a55365a IDP-1669 Accessibility on IdP pages
86a55365a is described below
commit 86a55365ad156fb41e59b8cc630a5126a16238d3
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Mar 2 11:27:22 2022 +0000
IDP-1669 Accessibility on IdP pages
https://shibboleth.atlassian.net/browse/IDP-1669
Always freshen up edit-webapp/css and edit-webapp-images.
Rework the fix to use the same code that we use for
updating other directrories (if there is a file with that
name then dont copy).
Also update the copy from distribution to webapp to
preserve the modified date. This was the date in webapp ends
up being when the distribution was created, not when
the install happened.
---
.../shibboleth/idp/installer/InstallerSupport.java | 1 +
.../java/net/shibboleth/idp/installer/V4Install.java | 19 +++++++++----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/InstallerSupport.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/InstallerSupport.java
index 136442b1d..e1637fc0e 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/InstallerSupport.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/InstallerSupport.java
@@ -85,6 +85,7 @@ public final class InstallerSupport {
result.setTodir(to.toFile());
final FileSet fromSet = new FileSet();
fromSet.setDir(from.toFile());
+ result.setPreserveLastModified(true);
result.addFileset(fromSet);
result.setProject(ANT_PROJECT);
result.setVerbose(log.isDebugEnabled());
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/V4Install.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/V4Install.java
index dbbcfc773..5be1af2f0 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/V4Install.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/V4Install.java
@@ -375,19 +375,21 @@ public class V4Install extends AbstractInitializableComponent {
*/
protected void handleEditWebApp() throws BuildException {
final Path editWebApp = installerProps.getTargetDir().resolve("edit-webapp");
- final Path distEditWebApp = installerProps.getTargetDir().resolve("dist").resolve("webapp");
final Path css = editWebApp.resolve("css");
final Path images = editWebApp.resolve("images");
- final Path suppliedInput = installerProps.getInitialEditWeb();
- final boolean doCopy;
+ final Path distEditWebApp = installerProps.getTargetDir().resolve("dist").resolve("webapp");
+
if (Files.exists(editWebApp)) {
checkWebXml(editWebApp.resolve("WEB-INF").resolve("web.xml"));
- doCopy = true;
- } else if (suppliedInput != null) {
+ InstallerSupport.copyDirIfNotPresent(distEditWebApp.resolve("css"), css);
+ InstallerSupport.copyDirIfNotPresent(distEditWebApp.resolve("images"), images);
+ return;
+ }
+ final Path suppliedInput = installerProps.getInitialEditWeb();
+ if (suppliedInput != null) {
final Copy copy = InstallerSupport.getCopyTask(suppliedInput, editWebApp);
copy.setFailOnError(false);
copy.execute();
- doCopy = false;
} else {
InstallerSupport.createDirectory(editWebApp);
InstallerSupport.createDirectory(css);
@@ -395,15 +397,12 @@ public class V4Install extends AbstractInitializableComponent {
InstallerSupport.createDirectory(editWebApp.resolve("WEB-INF"));
InstallerSupport.createDirectory(editWebApp.resolve("WEB-INF").resolve("lib"));
InstallerSupport.createDirectory(editWebApp.resolve("WEB-INF").resolve("classes"));
- doCopy = true;
- }
- if (doCopy) {
final Copy cssCopy = InstallerSupport.getCopyTask(distEditWebApp.resolve("css"), css);
cssCopy.setFailOnError(false);
cssCopy.execute();
final Copy imagesCopy = InstallerSupport.getCopyTask(distEditWebApp.resolve("images"), images);
imagesCopy.setFailOnError(false);
- imagesCopy.execute();
+ imagesCopy.execute();
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list