@@ -13,33 +13,22 @@ public class EmbeddedGitInfoBuilder implements GitInfoBuilder {
13
13
14
14
private static final Logger log = LoggerFactory .getLogger (EmbeddedGitInfoBuilder .class );
15
15
16
- // Spring boot fat jars and wars should have the git.properties file in a specific path,
17
- // guaranteeing that it's not coming from a dependency
18
- private static final String SPRING_BOOT_JAR_EMBEDDED_DATADOG_GIT_PROPERTIES_FILE_NAME =
19
- "BOOT-INF/classes/datadog_git.properties" ;
20
- private static final String SPRING_BOOT_JAR_EMBEDDED_GIT_PROPERTIES_FILE_NAME =
21
- "BOOT-INF/classes/git.properties" ;
22
- private static final String WAR_EMBEDDED_DATADOG_GIT_PROPERTIES_FILE_NAME =
23
- "WEB-INF/classes/datadog_git.properties" ;
24
- private static final String WAR_EMBEDDED_GIT_PROPERTIES_FILE_NAME =
25
- "WEB-INF/classes/git.properties" ;
26
- // If we can't find the files above, probably because we're not in a spring context, we can look
27
- // at the root of the classpath.
28
- // Since it could be tainted by dependencies, we're looking for a specific datadog_git.properties
29
- // file.
30
- private static final String EMBEDDED_DATADOOG_GIT_PROPERTIES_FILE_NAME = "datadog_git.properties" ;
31
-
32
16
private final List <String > resourceNames ;
33
17
34
18
public EmbeddedGitInfoBuilder () {
35
19
// Order is important here, from the most reliable sources to the least reliable ones
36
20
this (
37
21
Arrays .asList (
38
- SPRING_BOOT_JAR_EMBEDDED_DATADOG_GIT_PROPERTIES_FILE_NAME ,
39
- SPRING_BOOT_JAR_EMBEDDED_GIT_PROPERTIES_FILE_NAME ,
40
- WAR_EMBEDDED_DATADOG_GIT_PROPERTIES_FILE_NAME ,
41
- WAR_EMBEDDED_GIT_PROPERTIES_FILE_NAME ,
42
- EMBEDDED_DATADOOG_GIT_PROPERTIES_FILE_NAME ));
22
+ // Spring boot fat jars and wars should have the git.properties file in the following
23
+ // specific paths, guaranteeing that it's not coming from a dependency
24
+ "BOOT-INF/classes/datadog_git.properties" ,
25
+ "BOOT-INF/classes/git.properties" ,
26
+ "WEB-INF/classes/datadog_git.properties" ,
27
+ "WEB-INF/classes/git.properties" ,
28
+ // If we can't find the files above, probably because we're not in a spring context, we
29
+ // can look at the root of the classpath. Since it could be tainted by dependencies,
30
+ // we're looking for a specific datadog_git.properties file.
31
+ "datadog_git.properties" ));
43
32
}
44
33
45
34
EmbeddedGitInfoBuilder (List <String > resourceNames ) {
0 commit comments