move remaining files for instrumentation article
This commit is contained in:
parent
b929071fd9
commit
a4a03c4790
@ -259,110 +259,7 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
<!-- java instrumentation profiles to build jars -->
|
|
||||||
<profile>
|
|
||||||
<id>buildAgentLoader</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<classifier>agentLoader</classifier>
|
|
||||||
<classesDirectory>target/classes</classesDirectory>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<addClasspath>true</addClasspath>
|
|
||||||
</manifest>
|
|
||||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
||||||
</archive>
|
|
||||||
|
|
||||||
<includes>
|
|
||||||
<include>com/baeldung/instrumentation/application/AgentLoader.class</include>
|
|
||||||
<include>com/baeldung/instrumentation/application/Launcher.class</include>
|
|
||||||
</includes>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>buildApplication</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<classifier>application</classifier>
|
|
||||||
<classesDirectory>target/classes</classesDirectory>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<addClasspath>true</addClasspath>
|
|
||||||
</manifest>
|
|
||||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
||||||
</archive>
|
|
||||||
|
|
||||||
<includes>
|
|
||||||
<include>com/baeldung/instrumentation/application/MyAtm.class</include>
|
|
||||||
<include>com/baeldung/instrumentation/application/MyAtmApplication.class</include>
|
|
||||||
<include>com/baeldung/instrumentation/application/Launcher.class</include>
|
|
||||||
</includes>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>buildAgent</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<classifier>agent</classifier>
|
|
||||||
<classesDirectory>target/classes</classesDirectory>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<addClasspath>true</addClasspath>
|
|
||||||
</manifest>
|
|
||||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
||||||
</archive>
|
|
||||||
|
|
||||||
<includes>
|
|
||||||
<include>com/baeldung/instrumentation/agent/AtmTransformer.class</include>
|
|
||||||
<include>com/baeldung/instrumentation/agent/MyInstrumentationAgent.class</include>
|
|
||||||
</includes>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -57,6 +57,11 @@
|
|||||||
<artifactId>jol-core</artifactId>
|
<artifactId>jol-core</artifactId>
|
||||||
<version>${jol-core.version}</version>
|
<version>${jol-core.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency> <!-- needed to bridge to slf4j for projects that use the log4j APIs directly -->
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>log4j-over-slf4j</artifactId>
|
||||||
|
<version>${org.slf4j.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@ -66,5 +71,114 @@
|
|||||||
<asm.version>8.0.1</asm.version>
|
<asm.version>8.0.1</asm.version>
|
||||||
<bcel.version>6.5.0</bcel.version>
|
<bcel.version>6.5.0</bcel.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
<profiles>
|
||||||
|
<!-- java instrumentation profiles to build jars -->
|
||||||
|
<profile>
|
||||||
|
<id>buildAgentLoader</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<classifier>agentLoader</classifier>
|
||||||
|
<classesDirectory>target/classes</classesDirectory>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
<mainClass>com.baeldung.instrumentation.application.Launcher</mainClass>
|
||||||
|
</manifest>
|
||||||
|
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||||
|
</archive>
|
||||||
|
|
||||||
|
<includes>
|
||||||
|
<include>com/baeldung/instrumentation/application/AgentLoader.class</include>
|
||||||
|
<include>com/baeldung/instrumentation/application/Launcher.class</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>buildApplication</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<classifier>application</classifier>
|
||||||
|
<classesDirectory>target/classes</classesDirectory>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
<mainClass>com.baeldung.instrumentation.application.Launcher</mainClass>
|
||||||
|
</manifest>
|
||||||
|
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||||
|
</archive>
|
||||||
|
|
||||||
|
<includes>
|
||||||
|
<include>com/baeldung/instrumentation/application/MyAtm.class</include>
|
||||||
|
<include>com/baeldung/instrumentation/application/MyAtmApplication.class</include>
|
||||||
|
<include>com/baeldung/instrumentation/application/Launcher.class</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>buildAgent</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<classifier>agent</classifier>
|
||||||
|
<classesDirectory>target/classes</classesDirectory>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
<mainClass>com.baeldung.instrumentation.application.Launcher</mainClass>
|
||||||
|
</manifest>
|
||||||
|
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||||
|
</archive>
|
||||||
|
|
||||||
|
<includes>
|
||||||
|
<include>com/baeldung/instrumentation/agent/AtmTransformer.class</include>
|
||||||
|
<include>com/baeldung/instrumentation/agent/MyInstrumentationAgent.class</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -0,0 +1,5 @@
|
|||||||
|
Agent-Class: com.baeldung.instrumentation.agent.MyInstrumentationAgent
|
||||||
|
Can-Redefine-Classes: true
|
||||||
|
Can-Retransform-Classes: true
|
||||||
|
Premain-Class: com.baeldung.instrumentation.agent.MyInstrumentationAgent
|
||||||
|
Main-Class: com.baeldung.instrumentation.application.Launcher
|
Loading…
x
Reference in New Issue
Block a user