Skip to content

Installation

Adding the Dependency

Add toolbar-core to your project's build file using your preferred build system:

pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.tofpu.toolbar</groupId>
<artifactId>toolbar-core</artifactId>
<version>VERSION</version>
<scope>compile</scope>
</dependency>
</dependencies>

Relocation (Shading)

To prevent runtime classpath conflicts with other plugins, shade and relocate the library into your own project's package structure (your.org.plugin.libs.toolbar).

pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>com.tofpu.toolbar</pattern>
<shadedPattern>your.org.plugin.libs.toolbar</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>