check-leak
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>io.github.check-leak</groupId> <artifactId>check-leak</artifactId> <version>0.11</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>io.github.check-leak</groupId> <artifactId>check-leak-parent</artifactId> <version>0.11</version> </parent> <artifactId>check-leak</artifactId> <properties> </properties> <profiles> <profile> <id>Mac</id> <activation> <os> <family>Mac</family> </os> </activation> <properties> <native-surefire-argline> -agentpath:${project.basedir}/src/main/resources/platforms-lib/darwin-${os.arch}/libcheckleak.dylib --add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED </native-surefire-argline> </properties> </profile> <profile> <id>Linux</id> <activation> <os> <family>Linux</family> </os> </activation> <properties> <native-surefire-argline> -agentpath:${project.basedir}/src/main/resources/platforms-lib/linux-amd64/libcheckleak.so --add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED </native-surefire-argline> </properties> </profile> <profile> <id>Windows</id> <activation> <os> <family>Windows</family> </os> </activation> <properties> <native-surefire-argline> -agentpath:${project.basedir}/src/main/resources/platforms-lib/windows/checkleak.dll --add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED </native-surefire-argline> </properties> </profile> </profiles> <dependencies> <!-- notice for future maintainers: We are trying to keep the core dependency free (no logging, nothing). If we have to add any dependencies here though, we will need to shade the jar as a fat jar, as the core could be used as an javaagent, requiring all the dependencies in the jar for the premain call. So, think twice before adding a dependency: If you have to do it's fine, but it will require maven-shade for a fat jar. --> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <scope>test</scope> </dependency> </dependencies> <build> <resources> <resource> <directory>${project.basedir}/src/main/resources/</directory> <includes> <include>**/*</include> </includes> </resource> <resource> <directory>${project.basedir}/src/main/filtered-resources</directory> <filtering>true</filtering> <includes> <include>**/*</include> </includes> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.2.1</version> <configuration> <archive> <manifestEntries> <Main-Class>io.github.checkleak.core.RemoteCheckLeak</Main-Class> <Premain-Class>io.github.checkleak.core.Agent</Premain-Class> <Add-Exports>jdk.attach/sun.tools.attach</Add-Exports> </manifestEntries> </archive> </configuration> </plugin> </plugins> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <executions> <execution> <id>default-compile</id> <!-- Running compilation at generate-sources stage instead, to also generate the .h file ahead of running the cmake build at process-sources phase, in the profiles above --> <phase>generate-sources</phase> <goals> <goal>compile</goal> </goals> <configuration> <compilerArgs> <arg>--add-exports</arg> <arg>jdk.attach/sun.tools.attach=ALL-UNNAMED</arg> <arg>-h</arg> <arg>${project.basedir}/src/main/c</arg> </compilerArgs> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${version.surefire}</version> <configuration> <forkMode>once</forkMode> <testFailureIgnore>false</testFailureIgnore> <runOrder>alphabetical</runOrder> <redirectTestOutputToFile>false</redirectTestOutputToFile> <argLine>${native-surefire-argline}</argLine> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> <version>2.4</version> <configuration> <createChecksum>true</createChecksum> </configuration> </plugin> </plugins> </pluginManagement> </build> </project>