|
2 | 2 |
|
3 | 3 | import com.easypost.easyvcr.VCR;
|
4 | 4 |
|
| 5 | +/** |
| 6 | + * Hello weary traveler, welcome to the EasyPost Java client library. |
| 7 | + * <p> |
| 8 | + * This file exists as a template for the Templating Maven Plugin (https://www.mojohaus.org/templating-maven-plugin/) |
| 9 | + * If you notice the VERSION = ${project.version} below, that's an example of a template variable. |
| 10 | + * <p> |
| 11 | + * In Maven (and Gradle), you can set variables inside the pom.xml file |
| 12 | + * (https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#available-variables) |
| 13 | + * <p> |
| 14 | + * The Templating Maven Plugin, at compile time, will extract these variables and add them into the source code. |
| 15 | + * <p> |
| 16 | + * Specifically here, VERSION = ${project.version} will be replaced with, i.e. VERSION = 1.0.0 when compiling the code. |
| 17 | + * <p> |
| 18 | + * The placement of this file is important. |
| 19 | + * The Templating Maven Plugin will look for any template files in this specific `java-templates` directory. |
| 20 | + * As a result, you can not remove this file. |
| 21 | + * (https://www.hascode.com/2013/09/filtering-source-files-using-the-templating-maven-plugin/) |
| 22 | + * <p> |
| 23 | + * Most of the other variables in this file are not template variables. |
| 24 | + * Instead, we simply use this file as a catch-all for all global variables. |
| 25 | + * <p> |
| 26 | + * If you ever run across a section of code where your IDE says it cannot find, i.e. `EasyPost.apiKey`, |
| 27 | + * it's likely because this file has not been compiled yet. |
| 28 | + * Simply run `mvn install` (or `make build-dev`) to compile this code and your IDE will be able to find the variable. |
| 29 | + */ |
| 30 | + |
5 | 31 | public abstract class EasyPost {
|
6 | 32 | public static final String VERSION = "${project.version}";
|
7 |
| - public static String API_BASE = "https://api.easypost.com/v2"; |
8 |
| - public static String BETA_API_BASE = "https://api.easypost.com/beta"; |
| 33 | + public static final String API_BASE = "https://api.easypost.com/v2"; |
| 34 | + public static final String BETA_API_BASE = "https://api.easypost.com/beta"; |
9 | 35 | public static String apiKey;
|
10 |
| - public static String apiVersion; |
11 | 36 | public static int readTimeout;
|
12 | 37 |
|
13 | 38 | /**
|
|
0 commit comments