|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 4 | + <modelVersion>4.0.0</modelVersion> |
| 5 | + |
| 6 | + <groupId>io.github.dunwu.javatool</groupId> |
| 7 | + <artifactId>javatool-zipkin-spring</artifactId> |
| 8 | + <version>1.0.0</version> |
| 9 | + <packaging>war</packaging> |
| 10 | + <name>${project.artifactId}</name> |
| 11 | + <description>Java distributed tracing implementation compatible with Zipkin backend services.</description> |
| 12 | + |
| 13 | + <properties> |
| 14 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 15 | + <maven.compiler.source>1.7</maven.compiler.source> |
| 16 | + <maven.compiler.target>1.7</maven.compiler.target> |
| 17 | + |
| 18 | + <spring.version>4.3.26.RELEASE</spring.version> |
| 19 | + <log4j.version>2.13.0</log4j.version> |
| 20 | + <brave.version>5.10.1</brave.version> |
| 21 | + </properties> |
| 22 | + |
| 23 | + <dependencyManagement> |
| 24 | + <dependencies> |
| 25 | + <dependency> |
| 26 | + <groupId>io.zipkin.brave</groupId> |
| 27 | + <artifactId>brave-bom</artifactId> |
| 28 | + <version>${brave.version}</version> |
| 29 | + <type>pom</type> |
| 30 | + <scope>import</scope> |
| 31 | + </dependency> |
| 32 | + </dependencies> |
| 33 | + </dependencyManagement> |
| 34 | + |
| 35 | + <dependencies> |
| 36 | + <dependency> |
| 37 | + <groupId>javax.servlet</groupId> |
| 38 | + <artifactId>javax.servlet-api</artifactId> |
| 39 | + <version>3.1.0</version> |
| 40 | + <scope>provided</scope> |
| 41 | + </dependency> |
| 42 | + <dependency> |
| 43 | + <groupId>org.springframework</groupId> |
| 44 | + <artifactId>spring-webmvc</artifactId> |
| 45 | + <version>${spring.version}</version> |
| 46 | + </dependency> |
| 47 | + <dependency> |
| 48 | + <groupId>org.springframework</groupId> |
| 49 | + <artifactId>spring-web</artifactId> |
| 50 | + <version>${spring.version}</version> |
| 51 | + </dependency> |
| 52 | + <dependency> |
| 53 | + <groupId>org.apache.httpcomponents</groupId> |
| 54 | + <artifactId>httpclient</artifactId> |
| 55 | + <version>4.5.11</version> |
| 56 | + </dependency> |
| 57 | + |
| 58 | + <!-- Adds the MVC class and method names to server spans --> |
| 59 | + <dependency> |
| 60 | + <groupId>io.zipkin.brave</groupId> |
| 61 | + <artifactId>brave-instrumentation-spring-webmvc</artifactId> |
| 62 | + </dependency> |
| 63 | + <!-- Instruments the underlying HttpClient requests that call the backend --> |
| 64 | + <dependency> |
| 65 | + <groupId>io.zipkin.brave</groupId> |
| 66 | + <artifactId>brave-instrumentation-httpclient</artifactId> |
| 67 | + </dependency> |
| 68 | + |
| 69 | + <!-- Integrates so you can use log patterns like %X{traceId}/%X{spanId} --> |
| 70 | + <dependency> |
| 71 | + <groupId>org.apache.logging.log4j</groupId> |
| 72 | + <artifactId>log4j-core</artifactId> |
| 73 | + <version>${log4j.version}</version> |
| 74 | + </dependency> |
| 75 | + <dependency> |
| 76 | + <groupId>org.apache.logging.log4j</groupId> |
| 77 | + <artifactId>log4j-jul</artifactId> |
| 78 | + <version>${log4j.version}</version> |
| 79 | + </dependency> |
| 80 | + <dependency> |
| 81 | + <groupId>org.apache.logging.log4j</groupId> |
| 82 | + <artifactId>log4j-jcl</artifactId> |
| 83 | + <version>${log4j.version}</version> |
| 84 | + </dependency> |
| 85 | + <dependency> |
| 86 | + <groupId>org.apache.logging.log4j</groupId> |
| 87 | + <artifactId>log4j-slf4j-impl</artifactId> |
| 88 | + <version>${log4j.version}</version> |
| 89 | + </dependency> |
| 90 | + <dependency> |
| 91 | + <groupId>io.zipkin.brave</groupId> |
| 92 | + <artifactId>brave-context-log4j2</artifactId> |
| 93 | + </dependency> |
| 94 | + |
| 95 | + <!-- The below are needed to report traces to http://localhost:9411/api/v2/spans --> |
| 96 | + <dependency> |
| 97 | + <groupId>io.zipkin.brave</groupId> |
| 98 | + <artifactId>brave-spring-beans</artifactId> |
| 99 | + </dependency> |
| 100 | + <dependency> |
| 101 | + <groupId>io.zipkin.brave</groupId> |
| 102 | + <artifactId>brave</artifactId> |
| 103 | + </dependency> |
| 104 | + <dependency> |
| 105 | + <groupId>io.zipkin.reporter2</groupId> |
| 106 | + <artifactId>zipkin-sender-okhttp3</artifactId> |
| 107 | + </dependency> |
| 108 | + </dependencies> |
| 109 | + |
| 110 | + <build> |
| 111 | + <plugins> |
| 112 | + <plugin> |
| 113 | + <artifactId>maven-compiler-plugin</artifactId> |
| 114 | + <version>3.8.1</version> |
| 115 | + </plugin> |
| 116 | + |
| 117 | + <plugin> |
| 118 | + <artifactId>maven-enforcer-plugin</artifactId> |
| 119 | + <version>3.0.0-M3</version> |
| 120 | + <executions> |
| 121 | + <execution> |
| 122 | + <id>enforce-java</id> |
| 123 | + <goals> |
| 124 | + <goal>enforce</goal> |
| 125 | + </goals> |
| 126 | + <configuration> |
| 127 | + <rules> |
| 128 | + <requireJavaVersion> |
| 129 | + <!-- prevent a compile bug accessing CrossOrigin --> |
| 130 | + <version>[1.7.0_80,)</version> |
| 131 | + </requireJavaVersion> |
| 132 | + </rules> |
| 133 | + </configuration> |
| 134 | + </execution> |
| 135 | + </executions> |
| 136 | + </plugin> |
| 137 | + |
| 138 | + <plugin> |
| 139 | + <artifactId>maven-war-plugin</artifactId> |
| 140 | + <version>3.2.3</version> |
| 141 | + <configuration> |
| 142 | + <failOnMissingWebXml>false</failOnMissingWebXml> |
| 143 | + <packagingExcludes>WEB-INF/lib/servlet-api-*.jar</packagingExcludes> |
| 144 | + </configuration> |
| 145 | + </plugin> |
| 146 | + </plugins> |
| 147 | + <pluginManagement> |
| 148 | + <plugins> |
| 149 | + <plugin> |
| 150 | + <groupId>org.eclipse.jetty</groupId> |
| 151 | + <artifactId>jetty-maven-plugin</artifactId> |
| 152 | + <version>9.4.26.v20200117</version> |
| 153 | + </plugin> |
| 154 | + </plugins> |
| 155 | + </pluginManagement> |
| 156 | + </build> |
| 157 | + |
| 158 | + <profiles> |
| 159 | + <profile> |
| 160 | + <id>frontend</id> |
| 161 | + <build> |
| 162 | + <plugins> |
| 163 | + <plugin> |
| 164 | + <groupId>org.eclipse.jetty</groupId> |
| 165 | + <artifactId>jetty-maven-plugin</artifactId> |
| 166 | + <configuration> |
| 167 | + <httpConnector> |
| 168 | + <port>8081</port> |
| 169 | + </httpConnector> |
| 170 | + <systemProperties> |
| 171 | + <systemProperty> |
| 172 | + <name>zipkin.service</name> |
| 173 | + <value>frontend</value> |
| 174 | + </systemProperty> |
| 175 | + </systemProperties> |
| 176 | + </configuration> |
| 177 | + </plugin> |
| 178 | + </plugins> |
| 179 | + </build> |
| 180 | + </profile> |
| 181 | + <profile> |
| 182 | + <id>backend</id> |
| 183 | + <build> |
| 184 | + <plugins> |
| 185 | + <plugin> |
| 186 | + <groupId>org.eclipse.jetty</groupId> |
| 187 | + <artifactId>jetty-maven-plugin</artifactId> |
| 188 | + <configuration> |
| 189 | + <httpConnector> |
| 190 | + <port>9000</port> |
| 191 | + </httpConnector> |
| 192 | + <systemProperties> |
| 193 | + <systemProperty> |
| 194 | + <name>zipkin.service</name> |
| 195 | + <value>backend</value> |
| 196 | + </systemProperty> |
| 197 | + </systemProperties> |
| 198 | + </configuration> |
| 199 | + </plugin> |
| 200 | + </plugins> |
| 201 | + </build> |
| 202 | + </profile> |
| 203 | + </profiles> |
| 204 | + |
| 205 | +</project> |
0 commit comments