Skip to content

Commit 6b5e158

Browse files
authored
Merge pull request #429 from ryantse/fix-property-cache
Fix property caching when using injectAllReactorProjects.
2 parents 66f0198 + 96d393a commit 6b5e158

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/main/java/pl/project13/maven/git/GitCommitIdMojo.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,7 @@ private void handlePluginFailure(Exception e) throws GitCommitIdExecutionExcepti
532532

533533
private void appendPropertiesToReactorProjects() {
534534
for (MavenProject mavenProject : reactorProjects) {
535-
536-
// TODO check message
537-
log.info("{}] project {}", mavenProject.getName(), mavenProject.getName());
535+
log.info("Adding properties to project: {}", mavenProject.getName());
538536

539537
publishPropertiesInto(mavenProject.getProperties());
540538
mavenProject.setContextValue(CONTEXT_KEY, properties);

src/main/java/pl/project13/maven/git/GitDataProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ protected SimpleDateFormat getSimpleDateFormatWithTimeZone() {
248248
protected void maybePut(@Nonnull Properties properties, String key, SupplierEx<String> value)
249249
throws GitCommitIdExecutionException {
250250
String keyWithPrefix = prefixDot + key;
251-
if (properties.contains(keyWithPrefix)) {
251+
if (properties.containsKey(keyWithPrefix)) {
252252
String propertyValue = properties.getProperty(keyWithPrefix);
253253
log.info("Using cached {} with value {}", keyWithPrefix, propertyValue);
254254
} else if (PropertiesFilterer.isIncluded(keyWithPrefix, includeOnlyProperties, excludeProperties)) {

src/main/java/pl/project13/maven/git/build/BuildServerDataProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected void put(@Nonnull Properties properties, @Nonnull String key, String v
166166

167167
protected void maybePut(@Nonnull Properties properties, @Nonnull String key, Supplier<String> supplier) {
168168
String keyWithPrefix = prefixDot + key;
169-
if (properties.contains(keyWithPrefix)) {
169+
if (properties.containsKey(keyWithPrefix)) {
170170
String propertyValue = properties.getProperty(keyWithPrefix);
171171
log.info("Using cached {} with value {}", keyWithPrefix, propertyValue);
172172
} else if (PropertiesFilterer.isIncluded(keyWithPrefix, includeOnlyProperties, excludeProperties)) {

0 commit comments

Comments
 (0)