BoostedYAML
  • Overview
  • Getting Started
    • Implementation
    • Usage
    • Content manipulation
  • Routing
    • Routes
  • Settings
    • GeneralSettings
    • LoaderSettings
    • DumperSettings
    • UpdaterSettings
  • Serialization
    • Implementation
  • Updater
    • Updater
    • Document versioning system
      • Advanced topics
Powered by GitBook
On this page
  • Artifacts
  • Add using Maven (recommended)
  • Dependency
  • Shading
  • Download and add into project's libraries
  1. Getting Started

Implementation

(1min read) This page describes steps how to implement BoostedYAML into your own project.

Artifacts

BoostedYAML is a standalone library available under boosted-yaml ID.

Coming from Spigot (Bukkit) API and using custom object serialization?

If you are using custom object serialization provided by these APIs (your classes implement ConfigurationSerializable / you are serializing locations, items...), make sure to add:

  • boosted-yaml-spigot: includes a custom BoostedYAML serializer compatible with the Spigot (Bukkit) API serialization system.

This artifact is provided for the ease of migration to BoostedYAML. If you aren't using this serialization system, but developing with these APIs, it is recommended to build with the standard boosted-yaml artifact.

Add using Maven (recommended)

Dependency

Add dependency for the artifact:

<dependency>
  <groupId>dev.dejvokep</groupId>
  <artifactId>boosted-yaml</artifactId>
  <version>1.3.5</version>
</dependency>
<!-- Optionally, add also BoostedYAML for Spigot extension (see above) -->
<dependency>
  <groupId>dev.dejvokep</groupId>
  <artifactId>boosted-yaml-spigot</artifactId>
  <version>1.5</version>
</dependency>

No repository specification is required.

Shading

Add this shading section to your build configuration:

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-shade-plugin</artifactId>
      <version>3.2.4</version>
      <configuration>
        <relocations>
          <relocation>
            <pattern>dev.dejvokep.boostedyaml.*</pattern>
            <!-- Replace this -->
            <shadedPattern>me.plugin.libs</shadedPattern>
          </relocation>
        </relocations>
      </configuration>
      <executions>
        <execution>
          <phase>package</phase>
          <goals>
            <goal>shade</goal>
          </goals>
          <configuration>
            <artifactSet>
              <includes>
                <include>dev.dejvokep:boosted-yaml</include>
                <!-- If also implementing the boosted-yaml-spigot, add this: -->
                <include>dev.dejvokep:boosted-yaml-spigot</include>
              </includes>
            </artifactSet>
          </configuration>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

This configuration will shade (= "copy") the whole BoostedYAML library into a package inside your project defined by <shadedPattern> to avoid any runtime classpath conflicts. Do not forget to change it to your corresponding package.

Download and add into project's libraries

You can then add it into your project's libraries. This can be done in IntelliJ IDEA in menu File > Project Structure > Libraries.

PreviousOverviewNextUsage

Last updated 1 year ago

BoostedYAML releases are hosted on .

If you cannot use Maven / Gradle due to some reason, you can still download the .JAR archives needed from the (click "Browse" for the latest version):

,

Maven Central Repository
Maven Central Repository
boosted-yaml
boosted-yaml-spigot