[
https://issues.apache.org/jira/browse/ARROW-16825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17554078#comment-17554078
]
Nils Breunese edited comment on ARROW-16825 at 6/14/22 8:49 PM:
----------------------------------------------------------------
In my experience library {{.jar}} files indeed generally do not contain a
resources called {{git.properties}}, but any {{.jar}} can contain any resource
with any name in general. It's just that an application framework like Spring
Boot may look for a resource called {{git.properties}} to find things like the
commit ID and branch name the artifact was built from, assuming it will find
the information for the application, but if libraries also include a resource
with this name, then the framework might find the information for that library
instead of the application.
For my own use case I've worked around this by generating the Git properties
for my application under a different resource name and pointing Spring Boot at
this alternative resource name, but omitting {{git.properties}} from Arrow
library JARs could avoid the necessity for this for other users.
I don't know if there is a specific reason why the Arrow library JARs currently
do include this resource. I guess I would in principle also think that it's
nice to able to find Git metadata for an artifact in that resource.
was (Author: breun):
In my experience library {{.jar}} files indeed generally do not contain a
resources called {{git.properties}}, but any {{.jar}} can contain any resource
with any name in general. It's just that an application framework like Spring
Boot may look for a resource called {{git.properties}} to find things like the
commit ID and branch name the artifact was built from, assuming it will find
the information for the application, but if libraries also include a resource
with this name, then the framework might find the information for that library
instead of the application.
For my own use case I've worked around this by generating the Git properties
for my application use a different resource name and pointing Spring Boot at
this alternative resource name, but omitting {{git.properties}} from Arrow
library JARs could avoid the necessity for this for other users.
I don't know if there is a specific reason why the Arrow library JARs currently
do include this resource. I guess I would in principle also think that it's
nice to able to find Git metadata for an artifact in that resource.
> Inclusion of a git.properties resource in Arrow JARs causes confusion in
> Spring Boot applications
> -------------------------------------------------------------------------------------------------
>
> Key: ARROW-16825
> URL: https://issues.apache.org/jira/browse/ARROW-16825
> Project: Apache Arrow
> Issue Type: Bug
> Components: Java
> Affects Versions: 8.0.0
> Reporter: Nils Breunese
> Priority: Minor
>
> By default Spring Boot reads {{classpath:git.properties}} to get information
> about the Git repository of an application. However, Arrow JARs also include
> a resource called {{git.properties}}, and this can cause Spring Boot to read
> the information from one of the Arrow libraries instead of from the
> application. [This was reported to Spring Boot as an
> issue|https://github.com/spring-projects/spring-boot/issues/18137], but the
> Spring Boot developers say that they cannot automatically distinguish the
> application Git properties from {{git.properties}} resources from
> dependencies.
> Would you consider omitting {{git.properties}} from Arrow JARs in future
> releases or will Spring Boot users that (directly or indirectly) use Arrow
> need to work around this by letting {{git-commit-id-plugin}} generate the
> application Git properties in an alternative location and configuring Spring
> Boot to read the information from that alternative location
> ({{spring.info.git.location}})? Of course other libraries could also cause
> this issue, but Arrow is the first and only library that I've encountered so
> far that publishes JARs with a {{git.properties}} resource in them.
> It seems that the fact that Arrow JARs include {{git.properties}} resources
> also caused ARROW-6361.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)