jbake-org / jbake

Java based open source static site/blog generator for developers & designers.
http://jbake.org
MIT License
1.12k stars 326 forks source link

Change DuplicatesStrategy from EXCLUDE to INCLUDE #756

Closed georgecao closed 2 years ago

georgecao commented 2 years ago

I just build JBake from source by run ./gradlew clean build distZip, and run jbake command in the terminal, I got the following:

➜  jbake git:(ds) jbake 
JBake v${jbakeVersion} (${timestamp} ${gitHash}#) [http://jbake.org]

It seems that build process did not expand variables defined in default.properties.

# application version
version=v${jbakeVersion}
# build timestamp
build.timestamp=${timestamp}
# abbreviated git hash
git.hash=${gitHash}

I retried the build by setting duplicatesStrategy = DuplicatesStrategy.FAIL, then it failed.
But use duplicatesStrategy = DuplicatesStrategy.INHERIT, the build process complains

Entry default.properties is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.3.3/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

Then I tried duplicatesStrategy = DuplicatesStrategy.INCLUDE, works like a charm. Although it may not be the root cause...

georgecao commented 2 years ago

@jonbullock

jonbullock commented 2 years ago

Thanks for raising this, I want to understand why this change was required before a decision is made on how to proceed. As value substitution has worked previously which suggests a recent change may have caused this.

georgecao commented 2 years ago

@jonbullock PTAL