Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.99 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6.  
  7. <!--
  8. We use Maven to build our plugin and Maven uses pom.xml to configure
  9. itself.
  10.  
  11. This file is the heart and matter of everything that has to do
  12. with how your plugin connects with other libraries and exports itself
  13. when you want to publish it.
  14.  
  15. Please only edit options below, as the above declaration is machine
  16. generated and not intended for user changes.
  17. -->
  18.  
  19. <!-- ############################################################################### -->
  20. <!-- Basic plugin configuration, start here -->
  21. <!-- ############################################################################### -->
  22.  
  23. <!--
  24. The Group ID represents the main package of your plugin
  25.  
  26. The Artifact ID represents the name of your plugin.
  27. Traditionally, it is suggested to keep this name lowercase.
  28. If your plugin uses spaces, please replace them with dashes (-) instead.
  29.  
  30. The Name represents the full name of your plugin
  31.  
  32. The Version is current version of your plugin. You want to update this continuously
  33. -->
  34.  
  35. <groupId>me.wii</groupId>
  36. <artifactId>projectorion</artifactId>
  37. <name>ProjectOrion</name>
  38. <version>1.0.0</version>
  39.  
  40. <!-- ############################################################################### -->
  41.  
  42. <!--
  43. Configure some of the Maven settings. We also define
  44. our new variables here such as the main class or Java version
  45. for our plugin.
  46.  
  47. You can use those variables in your src/resources folder. See
  48. plugin.yml folder there for example usage.
  49. -->
  50. <properties>
  51.  
  52. <!-- The full path to your plugin's main class, so that Spigot can find and load it -->
  53. <main.class>me.wii.projectorion.OrionPlugin</main.class>
  54.  
  55. <!-- The Foundation version - change to latest version from https://github.com/kangarko/Foundation/releases -->
  56. <foundation.version>5.1.4</foundation.version>
  57.  
  58. <!-- The Java version your plugin uses, see bstats.org for what most servers have and use that -->
  59. <java.version>1.8</java.version>
  60.  
  61. <!-- How letters in your code should be saved on your disk, leave to UTF-8 to support all languages -->
  62. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  63. </properties>
  64.  
  65. <!--
  66. Configure where should Maven look for other libraries and plugins we
  67. want to use in our plugin. Those libraries and plugins can you then
  68. reference below in the dependencies section.
  69.  
  70. Each repository has two parts - the id and url. The id does not
  71. really matter, however the URL must contain a valid Maven repository
  72. where the dependency is "installed" (that's why we call the goal "install"
  73. because we want to install our plugin on our PC as well so that we can
  74. use it in our other plugins together without linking it as a dependency)
  75.  
  76. By default we use the Spigot repository for Spigot and the central Maven
  77. repo for many other plugins.
  78. -->
  79. <repositories>
  80. <repository>
  81. <id>spigotmc-repo</id>
  82. <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
  83. </repository>
  84. <repository>
  85. <id>jitpack.io</id>
  86. <url>https://jitpack.io</url>
  87. </repository>
  88. <repository>
  89. <id>sonatype</id>
  90. <url>https://oss.sonatype.org/content/groups/public/</url>
  91. </repository>
  92. </repositories>
  93.  
  94. <!--
  95. Configure what other libraries or plugins are we going to use in this plugin.
  96.  
  97. As a starting point, we are importing the Spigot API and Foundation.
  98. -->
  99. <dependencies>
  100.  
  101. <!--
  102. Import the Spigot API since it's necessary for our plugin
  103.  
  104. Make sure you change the version to the latest version you want to use for your plugin.
  105. -->
  106. <dependency>
  107. <groupId>org.spigotmc</groupId>
  108. <artifactId>spigot-api</artifactId>
  109. <version>1.14.4-R0.1-SNAPSHOT</version>
  110.  
  111. <!--
  112. The scope indicates if this library should be packaged together with our plugin
  113. when we want to publish it.
  114.  
  115. Set this to "compile" if you want all classes from this library to be copied
  116. to your plugin's jar, otherwise set this to "provided".
  117. -->
  118. <scope>provided</scope>
  119. </dependency>
  120.  
  121. <!--
  122. Import the Foundation library to kickstart our plugin development
  123. -->
  124. <dependency>
  125. <groupId>com.github.kangarko</groupId>
  126. <artifactId>Foundation</artifactId>
  127. <version>${foundation.version}</version>
  128. <!-- Include Foundation and its dependencies. There are exceptions, see shade plugin below -->
  129. <scope>compile</scope>
  130. </dependency>
  131. </dependencies>
  132.  
  133. <!--
  134. Configure what happens when we are building this project (Maven compiles our code into bytecode
  135. for us automatically).
  136. -->
  137. <build>
  138.  
  139. <!--
  140. When we are building your plugins, what plugins should we use during this process?
  141.  
  142. The plugins here extend the functionality of Maven, just like your plugin enhances Minecraft
  143. These are not Minecraft plugins, but only Maven plugins!
  144. -->
  145. <plugins>
  146.  
  147. <!--
  148. The first and the most essential plugin is the compiler, that translates your
  149. human readable code into bytecode.
  150. -->
  151. <plugin>
  152. <groupId>org.apache.maven.plugins</groupId>
  153. <artifactId>maven-compiler-plugin</artifactId>
  154. <!--
  155. You want to check and update the latest version periodically from
  156. https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin
  157. -->
  158. <version>3.8.1</version>
  159. <configuration>
  160. <source>${java.version}</source>
  161. <target>${java.version}</target>
  162. </configuration>
  163. </plugin>
  164.  
  165. <!--
  166. The second plugin is the shade plugin, packaging every library with
  167. the "compile" scope (see dependencies)
  168. -->
  169. <plugin>
  170. <groupId>org.apache.maven.plugins</groupId>
  171. <artifactId>maven-shade-plugin</artifactId>
  172. <!--
  173. You want to check and update the latest version periodically from
  174. https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-shade-plugin
  175. -->
  176. <version>3.2.2</version>
  177. <executions>
  178. <execution>
  179. <phase>package</phase>
  180. <goals>
  181. <goal>shade</goal>
  182. </goals>
  183. <!--
  184. By default we configure the Foundation to include itself and all classes when
  185. we set the scope to compile (see above).
  186.  
  187. There are many libraries from Foundation we will not need to use, and here
  188. can you specify which ones to exclude. Please leave the default ones as they are.
  189. -->
  190. <configuration>
  191. <createDependencyReducedPom>false</createDependencyReducedPom>
  192. <finalName>${project.name}-${project.version}</finalName>
  193. <artifactSet>
  194. <includes>
  195. <include>org.mineacademy:Game*</include>
  196. <include>com.github.kangarko:Foundation*</include>
  197. </includes>
  198. <excludes>
  199. <exclude>org.mineacademy:GameAPI*</exclude>
  200. </excludes>
  201. </artifactSet>
  202. <relocations>
  203. <relocation>
  204. <pattern>org.mineacademy</pattern>
  205. <shadedPattern>${project.groupId}.${project.artifactId}.lib</shadedPattern>
  206. <excludes>
  207. <exclude>org.mineacademy.${project.artifactId}.*</exclude>
  208. <exclude>org.mineacademy.gameapi.*</exclude>
  209. <exclude>org.mineacademy.boss.*</exclude>
  210. <exclude>org.mineacademy.worldeditbridge.*</exclude>
  211. </excludes>
  212. </relocation>
  213. </relocations>
  214. </configuration>
  215. </execution>
  216. </executions>
  217. </plugin>
  218. </plugins>
  219.  
  220. <!--
  221. During the build, we are going to scan all files in src/main/resources
  222. folder such as plugin.yml and your settings files and replace all variables
  223. such as ${main.class} with their proper values.
  224.  
  225. You can use native variables such as ${project.X} or the ones you defined above
  226. in the properties section.
  227. -->
  228. <resources>
  229. <resource>
  230. <directory>src/main/resources</directory>
  231. <filtering>true</filtering>
  232. </resource>
  233. </resources>
  234. </build>
  235.  
  236. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement