You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ku...@apache.org on 2024/10/09 05:28:51 UTC
(struts) 10/10: CONFSRVDEV-34293 Fix Struts 6.6 build
This is an automated email from the ASF dual-hosted git repository.
kusal pushed a commit to branch issue-85/CONFSRVDEV-34293-struts-build
in repository https://gitbox.apache.org/repos/asf/struts.git
commit 37eb6d1016bc41ee45f11892637ee65042584b22
Author: Kusal Kithul-Godage <gi...@kusal.io>
AuthorDate: Wed Oct 9 16:28:18 2024 +1100
CONFSRVDEV-34293 Fix Struts 6.6 build
---
README.md | 31 ----------------------
.../config/providers/EnvsValueSubstitutorTest.java | 8 +++---
...lConfigurationProviderEnvsSubstitutionTest.java | 2 +-
3 files changed, 5 insertions(+), 36 deletions(-)
diff --git a/README.md b/README.md
index d4ad3907a..39e4e6b36 100644
--- a/README.md
+++ b/README.md
@@ -17,37 +17,6 @@
# This branch is an Atlassian fork of Apache Struts
-# This fork/6.4 branch no longer contains Atlassian modifications and is effectively a pre-release version of Struts 6.5.
-
-## Updating this branch fork with upstream master
-
-1. Clone this repo and checkout this branch
-2. Add upstream repo as a remote: `git remote add apache https://github.com/apache/struts.git`
-3. Fetch the upstream repo: `git fetch --all`
-4. Merge upstream master into this branch, eg. `git merge apache/master`
-
-## Updating this branch fork for a new patch release
-
-1. Clone this repo and checkout this branch
-2. Add upstream repo as a remote: `git remote add apache https://github.com/apache/struts.git`
-3. Fetch the upstream tags: `git fetch --tags apache`
-4. Merge latest patch version tag into this branch, eg. `git merge STRUTS_6_4_1`
-
-## Creating a new branch fork for a new major/minor release
-
-1. Clone this repo and checkout this branch
-2. Add upstream repo as a remote: `git remote add apache https://github.com/apache/struts.git`
-3. Fetch the upstream tags: `git fetch --tags apache`
-4. Checkout a new branch from the desired tag, eg. `git checkout -b fork/6.5 STRUTS_6_5_0`
-5. Merge previous forked branch into new branch, eg. `git merge origin/fork/6.4`
-
-## Releasing a new version
-
-1. Ensure correct snapshot version, eg. `mvn versions:set -DnewVersion=6.4.0-atlassian-1-SNAPSHOT`
-2. Ensure that the `scm` and `distributionManagement` sections in `pom.xml` are consistent with previous releases
-3. Grant yourself Artifactory write permission: `atlas packages permission grant`
-4. Commence release: `mvn -B release:clean release:prepare release:perform`
-
The Apache Struts web framework
-------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/config/providers/EnvsValueSubstitutorTest.java b/core/src/test/java/com/opensymphony/xwork2/config/providers/EnvsValueSubstitutorTest.java
index a360c63ea..712a3be85 100644
--- a/core/src/test/java/com/opensymphony/xwork2/config/providers/EnvsValueSubstitutorTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/config/providers/EnvsValueSubstitutorTest.java
@@ -18,12 +18,12 @@
*/
package com.opensymphony.xwork2.config.providers;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
import org.apache.commons.lang3.SystemUtils;
import org.apache.struts2.StrutsInternalTestCase;
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+
public class EnvsValueSubstitutorTest extends StrutsInternalTestCase {
private ValueSubstitutor substitutor;
@@ -37,7 +37,7 @@ public class EnvsValueSubstitutorTest extends StrutsInternalTestCase {
public void testEnvSimpleValue() {
if (SystemUtils.IS_OS_WINDOWS) {
assertThat(substitutor.substitute("${env.USERNAME}"), is(System.getenv("USERNAME")));
- } else {
+ } else if (System.getenv("USER") != null) {
assertThat(substitutor.substitute("${env.USER}"), is(System.getenv("USER")));
}
}
diff --git a/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderEnvsSubstitutionTest.java b/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderEnvsSubstitutionTest.java
index 7fb20f0de..7903e7166 100644
--- a/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderEnvsSubstitutionTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderEnvsSubstitutionTest.java
@@ -41,7 +41,7 @@ public class XmlConfigurationProviderEnvsSubstitutionTest extends ConfigurationT
if (SystemUtils.IS_OS_WINDOWS) {
user = container.getInstance(String.class, "username");
assertEquals(System.getenv("USERNAME"), user);
- } else {
+ } else if (System.getenv("USER") != null) {
user = container.getInstance(String.class, "user");
assertEquals(System.getenv("USER"), user);
}