How to setup - Zeanon/StorageManager GitHub Wiki
-
Place this in your Plugins-Section(you have to manually install the jar as a local dependency:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> <version>3.0.0-M1</version> <executions> <execution> <id>install-storagemanagercore</id> <phase>clean</phase> <configuration> <groupId>de.zeanon</groupId> <artifactId>storagemanagercore</artifactId> <version>1.1.85</version> <file>src/main/resources/dependencies/StorageManagerCore.jar</file> <packaging>jar</packaging> <generatePom>true</generatePom> </configuration> <goals> <goal>install-file</goal> </goals> </execution> </executions> </plugin>
<file> marks the relative path to the compiled jar of the module in this case.
You have to do this for all modules you want to use. The core is mandatory, the others are optional depending on your needs.
-
Place this in your dependency-section:
The version has to match the version you defined above<!-- StorageManager by Zeanon--> <dependency> <groupId>de.zeanon</groupId> <artifactId>storagemanager</artifactId> <version>1.1.85</version> <scope>compile</scope> </dependency>
You have to do this for all modules
-
Important! Use a shade plugin to make sure that the library is shaded into your final .jar file when your plugin is compiled. The relocation is optional but heavily recommended.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.2.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> <configuration> <relocations> <relocation> <pattern>de.zeanon</pattern> <shadedPattern>yourpackage.yourname.storagemanager</shadedPattern> </relocation> </relocations> <createDependencyReducedPom>false</createDependencyReducedPom> </configuration> </plugin>
Make sure to shade overy module to the same path, so <shadedPattern> should be yourpackage.yourname.storagemanager for all used modules (or something else if you used another path)