Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,7 @@ under the License.
</archive>
<bottom>
<![CDATA[
Copyright &#169; {inceptionYear}&#8211;{currentYear} The Apache Software Foundation.
All rights reserved. (Commit Time: ${git.commit.time}, Commit: ${git.commit.id.abbrev})
Copyright &#169; {inceptionYear}&#8211;{currentYear} The Apache Software Foundation. All rights reserved. (Commit Time: ${git.commit.time}, Commit: ${git.commit.id.abbrev})
]]>
</bottom>
</configuration>
Expand Down Expand Up @@ -576,11 +575,13 @@ under the License.
<configuration>
<!-- Maven commands are sometimes run on the release artifact directly, which is not a Git repository -->
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<commitIdGenerationMode>full</commitIdGenerationMode>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.basedir}/git.properties</generateGitPropertiesFilename>
<includeOnlyProperties>
<includeOnlyProperty>^git\.branch$</includeOnlyProperty>
<includeOnlyProperty>^git\.commit\.id$</includeOnlyProperty>
<includeOnlyProperty>^git\.commit\.id\.full$</includeOnlyProperty>
<includeOnlyProperty>^git\.commit\.id\.abbrev$</includeOnlyProperty>
<includeOnlyProperty>^git\.commit\.time$</includeOnlyProperty>
<includeOnlyProperty>^git\.build\.user\.email$</includeOnlyProperty>
</includeOnlyProperties>
Expand Down
3 changes: 3 additions & 0 deletions tools/mvn_clean_install_or_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
[ "$BRANCH" = "HEAD" ] && BRANCH=$(git name-rev --name-only HEAD 2>/dev/null)

COMMIT=$(git rev-parse HEAD 2>/dev/null || echo "unknown")
ABBREV=$(git rev-parse --short=7 HEAD 2>/dev/null || echo "unknown")
TIME=$(git log -1 --format=%cI 2>/dev/null || echo "unknown")
EMAIL=$(git config user.email 2>/dev/null)
[ -z "$EMAIL" ] && EMAIL="unknown"
else
BRANCH="source-release-no-git"
COMMIT="unknown"
ABBREV="unknown"
TIME="unknown"
EMAIL="unknown"
fi
Expand All @@ -39,6 +41,7 @@ exec mvn clean "$GOAL" \
"${EXTRA_ARGS[@]}" \
-Dgit.branch="${BRANCH:-source-release-no-git}" \
-Dgit.commit.id.full="${COMMIT:-unknown}" \
-Dgit.commit.id.abbrev="${ABBREV:-unknown}" \
-Dgit.commit.time="${TIME:-unknown}" \
-Dgit.build.user.email="${EMAIL:-unknown}" \
"$@"
Loading