|
147 | 147 | <artifactId>icu4j</artifactId> |
148 | 148 | <version>${icu4j.version}</version> |
149 | 149 | </dependency> |
| 150 | + <!-- Mime Type Resolution Libraries --> |
| 151 | + <dependency> |
| 152 | + <groupId>org.apache.tika</groupId> |
| 153 | + <artifactId>tika-core</artifactId> |
| 154 | + <version>${tika.version}</version> |
| 155 | + </dependency> |
| 156 | + <dependency> |
| 157 | + <groupId>net.sf.jmimemagic</groupId> |
| 158 | + <artifactId>jmimemagic</artifactId> |
| 159 | + <version>${jmime-magic.version}</version> |
| 160 | + </dependency> |
150 | 161 | <dependency> |
151 | 162 | <groupId>org.apache.commons</groupId> |
152 | 163 | <artifactId>commons-dbcp2</artifactId> |
|
162 | 173 | <artifactId>c3p0</artifactId> |
163 | 174 | <version>${c3p0.version}</version> |
164 | 175 | </dependency> |
| 176 | + <!-- instrumentation --> |
| 177 | + <dependency> |
| 178 | + <groupId>org.javassist</groupId> |
| 179 | + <artifactId>javassist</artifactId> |
| 180 | + <version>${javaassist.version}</version> |
| 181 | + </dependency> |
| 182 | + <dependency> |
| 183 | + <groupId>com.sun</groupId> |
| 184 | + <artifactId>tools</artifactId> |
| 185 | + <version>1.8.0</version> |
| 186 | + <scope>system</scope> |
| 187 | + <systemPath>${java.home}/../lib/tools.jar</systemPath> |
| 188 | + </dependency> |
165 | 189 | </dependencies> |
166 | 190 |
|
167 | 191 | <build> |
|
389 | 413 | </plugins> |
390 | 414 | </build> |
391 | 415 | </profile> |
| 416 | + |
| 417 | + <!-- java instrumentation profiles to build jars --> |
| 418 | + <profile> |
| 419 | + <id>buildAgentLoader</id> |
| 420 | + <build> |
| 421 | + <plugins> |
| 422 | + <plugin> |
| 423 | + <groupId>org.apache.maven.plugins</groupId> |
| 424 | + <artifactId>maven-jar-plugin</artifactId> |
| 425 | + <executions> |
| 426 | + <execution> |
| 427 | + <phase>package</phase> |
| 428 | + <goals> |
| 429 | + <goal>jar</goal> |
| 430 | + </goals> |
| 431 | + <configuration> |
| 432 | + <classifier>agentLoader</classifier> |
| 433 | + <classesDirectory>target/classes</classesDirectory> |
| 434 | + <archive> |
| 435 | + <manifest> |
| 436 | + <addClasspath>true</addClasspath> |
| 437 | + </manifest> |
| 438 | + <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> |
| 439 | + </archive> |
| 440 | + |
| 441 | + <includes> |
| 442 | + <include>com/baeldung/instrumentation/application/AgentLoader.class</include> |
| 443 | + <include>com/baeldung/instrumentation/application/Launcher.class</include> |
| 444 | + </includes> |
| 445 | + </configuration> |
| 446 | + </execution> |
| 447 | + </executions> |
| 448 | + </plugin> |
| 449 | + </plugins> |
| 450 | + </build> |
| 451 | + </profile> |
| 452 | + <profile> |
| 453 | + <id>buildApplication</id> |
| 454 | + <build> |
| 455 | + <plugins> |
| 456 | + <plugin> |
| 457 | + <groupId>org.apache.maven.plugins</groupId> |
| 458 | + <artifactId>maven-jar-plugin</artifactId> |
| 459 | + <executions> |
| 460 | + <execution> |
| 461 | + <phase>package</phase> |
| 462 | + <goals> |
| 463 | + <goal>jar</goal> |
| 464 | + </goals> |
| 465 | + <configuration> |
| 466 | + <classifier>application</classifier> |
| 467 | + <classesDirectory>target/classes</classesDirectory> |
| 468 | + <archive> |
| 469 | + <manifest> |
| 470 | + <addClasspath>true</addClasspath> |
| 471 | + </manifest> |
| 472 | + <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> |
| 473 | + </archive> |
| 474 | + |
| 475 | + <includes> |
| 476 | + <include>com/baeldung/instrumentation/application/MyAtm.class</include> |
| 477 | + <include>com/baeldung/instrumentation/application/MyAtmApplication.class</include> |
| 478 | + <include>com/baeldung/instrumentation/application/Launcher.class</include> |
| 479 | + </includes> |
| 480 | + </configuration> |
| 481 | + </execution> |
| 482 | + </executions> |
| 483 | + </plugin> |
| 484 | + </plugins> |
| 485 | + </build> |
| 486 | + </profile> |
| 487 | + <profile> |
| 488 | + <id>buildAgent</id> |
| 489 | + <build> |
| 490 | + <plugins> |
| 491 | + <plugin> |
| 492 | + <groupId>org.apache.maven.plugins</groupId> |
| 493 | + <artifactId>maven-jar-plugin</artifactId> |
| 494 | + <executions> |
| 495 | + <execution> |
| 496 | + <phase>package</phase> |
| 497 | + <goals> |
| 498 | + <goal>jar</goal> |
| 499 | + </goals> |
| 500 | + <configuration> |
| 501 | + <classifier>agent</classifier> |
| 502 | + <classesDirectory>target/classes</classesDirectory> |
| 503 | + <archive> |
| 504 | + <manifest> |
| 505 | + <addClasspath>true</addClasspath> |
| 506 | + </manifest> |
| 507 | + <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> |
| 508 | + </archive> |
| 509 | + |
| 510 | + <includes> |
| 511 | + <include>com/baeldung/instrumentation/agent/AtmTransformer.class</include> |
| 512 | + <include>com/baeldung/instrumentation/agent/MyInstrumentationAgent.class</include> |
| 513 | + </includes> |
| 514 | + </configuration> |
| 515 | + </execution> |
| 516 | + </executions> |
| 517 | + </plugin> |
| 518 | + </plugins> |
| 519 | + </build> |
| 520 | + </profile> |
392 | 521 | </profiles> |
393 | 522 |
|
394 | 523 | <properties> |
|
439 | 568 | <spring-boot-maven-plugin.version>2.0.3.RELEASE</spring-boot-maven-plugin.version> |
440 | 569 | <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version> |
441 | 570 | <icu4j.version>61.1</icu4j.version> |
| 571 | + <!-- Mime Type Libraries --> |
| 572 | + <tika.version>1.18</tika.version> |
| 573 | + <jmime-magic.version>0.1.5</jmime-magic.version> |
| 574 | + <!-- instrumentation --> |
| 575 | + <javaassist.version>3.21.0-GA</javaassist.version> |
442 | 576 | </properties> |
443 | 577 |
|
444 | 578 | </project> |
0 commit comments