-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Nicolas Delsaux <[email protected]> Co-authored-by: Nicolas Delsaux <[email protected]>
- Loading branch information
1 parent
28a3a03
commit 8b48fc2
Showing
91 changed files
with
1,605 additions
and
1,214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,10 +38,10 @@ jobs: | |
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "🤖 Aadarchi releaser bot" | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: maven | ||
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
.../main/java/org/ndx/aadarchi/maven/cdi/faker/properties/FilterMavenPropertiesInValues.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.ndx.aadarchi.maven.cdi.faker.properties; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
import org.ndx.aadarchi.cdi.deltaspike.ConfigFilter; | ||
|
||
import jakarta.inject.Inject; | ||
|
||
public class FilterMavenPropertiesInValues implements ConfigFilter { | ||
|
||
@Inject ExposeMavenPropertiesAsConfigProperties configSource; | ||
|
||
@Override | ||
public String filterValue(String key, String value) { | ||
String updatedValue = value; | ||
for(ExposeMavenPropertiesAsConfigProperties.Keys k : ExposeMavenPropertiesAsConfigProperties.Keys.values()) { | ||
String initial = String.format("${%s}", k.getPropertyKey()); | ||
String replaced = k.getComputedValue(); | ||
updatedValue = updatedValue.replace(initial, replaced); | ||
} | ||
return updatedValue; | ||
} | ||
|
||
@Override | ||
public String filterValueForLog(String key, String value) { | ||
String updatedValue = value; | ||
for(ExposeMavenPropertiesAsConfigProperties.Keys k : ExposeMavenPropertiesAsConfigProperties.Keys.values()) { | ||
String initial = String.format("${%s}", k.getPropertyKey()); | ||
String replaced = k.getComputedValue(); | ||
if(k.getPropertyKey().contains("password")) { | ||
replaced = StringUtils.repeat('*', replaced.length()); | ||
} | ||
updatedValue = updatedValue.replace(initial, replaced); | ||
} | ||
return updatedValue; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.