MCMaricopaAZ

20200702_POM_KCRPlugin

Jul 2nd, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.42 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.scott</groupId>
  36. <artifactId>keycraterewards</artifactId>
  37. <name>KeyCrateRewards</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. <!-- The full path to your plugin's main class, so that Spigot can find and load it -->
  52. <main.class>me.scott.keycraterewards.KeyCrateRewardsPlugin</main.class>
  53. <!-- The Foundation version - change to latest version from https://github.com/kangarko/Foundation/releases -->
  54. <foundation.version>5.4.3</foundation.version>
  55. <!-- The Java version your plugin uses, see bstats.org for what most servers have and use that -->
  56. <java.version>1.8</java.version>
  57. <!-- How letters in your code should be saved on your disk, leave to UTF-8 to support all languages -->
  58. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  59. </properties>
  60.  
  61. <!--
  62. Configure where should Maven look for other libraries and plugins we
  63. want to use in our plugin. Those libraries and plugins can you then
  64. reference below in the dependencies section.
  65.  
  66. Each repository has two parts - the id and url. The id does not
  67. really matter, however the URL must contain a valid Maven repository
  68. where the dependency is "installed" (that's why we call the goal "install"
  69. because we want to install our plugin on our PC as well so that we can
  70. use it in our other plugins together without linking it as a dependency)
  71.  
  72. By default we use the Spigot repository for Spigot and the central Maven
  73. repo for many other plugins.
  74. -->
  75. <repositories>
  76. <repository>
  77. <id>spigotmc-repo</id>
  78. <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
  79. </repository>
  80. <repository>
  81. <id>jitpack.io</id>
  82. <url>https://jitpack.io</url>
  83. </repository>
  84. <repository>
  85. <id>sonatype</id>
  86. <url>https://oss.sonatype.org/content/groups/public/</url>
  87. </repository>
  88. <repository>
  89. <id>mineacademy-repo</id>
  90. <url>https://repo.mineacademy.org/repository/maven-public/</url>
  91. </repository>
  92. <repository>
  93. <id>bintray-repo</id>
  94. <url>https://dl.bintray.com/ichbinjoe/public/</url>
  95. </repository>
  96. </repositories>
  97.  
  98. <!--
  99. Configure what other libraries or plugins are we going to use in this plugin.
  100.  
  101. As a starting point, we are importing the Spigot API and Foundation.
  102. -->
  103. <dependencies>
  104.  
  105. <!--
  106. Import the Spigot API since it's necessary for our plugin
  107.  
  108. Make sure you change the version to the latest version you want to use for your plugin.
  109. -->
  110. <dependency>
  111. <groupId>org.spigotmc</groupId>
  112. <artifactId>spigot-api</artifactId>
  113. <version>1.16.1-R0.1-SNAPSHOT</version> <!-- Change this to the latest version to stay up to date -->
  114. <scope>provided</scope>
  115. </dependency>
  116. <!--
  117. The scope above indicates if this library should be packaged together with our plugin
  118. when we want to publish it.
  119. Set it to "compile" if you want all classes from this library to be copied
  120. to your plugin's jar, otherwise set this to "provided".
  121. -->
  122.  
  123. <!--
  124. Import the Foundation library to kickstart our plugin development
  125. -->
  126. <!-- <dependency>-->
  127. <!-- <groupId>com.github.kangarko</groupId>-->
  128. <!-- <artifactId>Foundation</artifactId>-->
  129. <!-- <version>${foundation.version}</version>-->
  130. <!-- &lt;!&ndash; Include Foundation and its dependencies. There are exceptions, see shade plugin below &ndash;&gt;-->
  131. <!-- <scope>compile</scope>-->
  132. <!-- </dependency>-->
  133. <dependency>
  134. <groupId>org.mineacademy.libraries</groupId>
  135. <artifactId>foundation</artifactId>
  136. <version>5.4.3</version>
  137. <scope>compile</scope>
  138. </dependency>
  139.  
  140. <dependency>
  141. <groupId>org.projectlombok</groupId>
  142. <artifactId>lombok</artifactId>
  143. <version>1.18.4</version>
  144. <scope>provided</scope>
  145. </dependency>
  146.  
  147. <dependency>
  148. <groupId>com.vexsoftware</groupId>
  149. <artifactId>nuvotifier-universal</artifactId>
  150. <version>2.6.0</version>
  151. <scope>provided</scope>
  152. </dependency>
  153.  
  154. <dependency>
  155. <groupId>com.github.MilkBowl</groupId>
  156. <artifactId>VaultAPI</artifactId>
  157. <version>1.7</version>
  158. <scope>provided</scope>
  159. </dependency>
  160.  
  161. <!-- &lt;!&ndash; https://mvnrepository.com/artifact/com.sun.istack/istack-commons-runtime &ndash;&gt;-->
  162. <!-- <dependency>-->
  163. <!-- <groupId>com.sun.istack</groupId>-->
  164. <!-- <artifactId>istack-commons-runtime</artifactId>-->
  165. <!-- <version>3.0.11</version>-->
  166. <!-- </dependency>-->
  167.  
  168.  
  169. </dependencies>
  170.  
  171. <!--
  172. Configure what happens when we are building this project (Maven compiles our code into bytecode
  173. for us automatically).
  174. -->
  175. <build>
  176.  
  177. <!--
  178. When we are building your plugins, what plugins should we use during this process?
  179.  
  180. The plugins here extend the functionality of Maven, just like your plugin enhances Minecraft
  181. These are not Minecraft plugins, but only Maven plugins!
  182. -->
  183. <plugins>
  184.  
  185. <!--
  186. The first and the most essential plugin is the compiler, that translates your
  187. human readable code into bytecode.
  188. -->
  189. <plugin>
  190. <groupId>org.apache.maven.plugins</groupId>
  191. <artifactId>maven-compiler-plugin</artifactId>
  192. <!--
  193. You want to check and update the latest version periodically from
  194. https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin
  195. -->
  196. <version>3.8.1</version>
  197. <configuration>
  198. <source>${java.version}</source>
  199. <target>${java.version}</target>
  200. </configuration>
  201. </plugin>
  202.  
  203. <!--
  204. The second plugin is the shade plugin, packaging every library with
  205. the "compile" scope (see dependencies)
  206. -->
  207. <plugin>
  208. <groupId>org.apache.maven.plugins</groupId>
  209. <artifactId>maven-shade-plugin</artifactId>
  210. <!--
  211. You want to check and update the latest version periodically from
  212. https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-shade-plugin
  213. -->
  214. <version>3.2.4</version>
  215. <executions>
  216. <execution>
  217. <phase>package</phase>
  218. <goals>
  219. <goal>shade</goal>
  220. </goals>
  221. <!--
  222. By default we configure the Foundation to include itself and all classes when
  223. we set the scope to compile (see above).
  224.  
  225. There are many libraries from Foundation we will not need to use, and here
  226. can you specify which ones to exclude. Please leave the default ones as they are.
  227. -->
  228. <configuration>
  229. <createDependencyReducedPom>false</createDependencyReducedPom>
  230. <finalName>${project.name}-${project.version}</finalName>
  231. <artifactSet>
  232. <includes>
  233. <include>org.mineacademy:Game*</include>
  234. <!-- <include>com.github.kangarko:Foundation*</include>-->
  235. <include>org.mineacademy.libraries:foundation*</include>
  236. <!-- <include>org.mineacademy.libraries</include>-->
  237. </includes>
  238. <excludes>
  239. <exclude>org.mineacademy:GameAPI*</exclude>
  240. </excludes>
  241. </artifactSet>
  242. <relocations>
  243. <relocation>
  244. <pattern>org.mineacademy</pattern>
  245. <shadedPattern>${project.groupId}.${project.artifactId}.lib</shadedPattern>
  246. <excludes>
  247. <exclude>org.mineacademy.${project.artifactId}.*</exclude>
  248. <exclude>org.mineacademy.gameapi.*</exclude>
  249. <exclude>org.mineacademy.boss.*</exclude>
  250. <exclude>org.mineacademy.worldeditbridge.*</exclude>
  251. </excludes>
  252. </relocation>
  253. </relocations>
  254. </configuration>
  255. </execution>
  256. </executions>
  257. </plugin>
  258.  
  259. <!--
  260. This plugin will use ProGuard obfuscator to prevent others
  261. from understanding your compiled program.
  262. -->
  263. <plugin>
  264. <groupId>com.github.wvengen</groupId>
  265. <artifactId>proguard-maven-plugin</artifactId>
  266. <!--
  267. Make sure to check for new versions from
  268. https://mvnrepository.com/artifact/com.github.wvengen/proguard-maven-plugin
  269. -->
  270. <version>2.2.0</version>
  271. <dependencies>
  272. <dependency>
  273. <groupId>net.sf.proguard</groupId>
  274. <artifactId>proguard-base</artifactId>
  275. <!--
  276. Make sure to check for new versions from
  277. https://mvnrepository.com/artifact/net.sf.proguard/proguard-base
  278. -->
  279. <version>6.2.2</version>
  280. </dependency>
  281. </dependencies>
  282. <executions>
  283. <execution>
  284. <phase>package</phase>
  285. <goals>
  286. <goal>proguard</goal>
  287. </goals>
  288. </execution>
  289. </executions>
  290. <configuration>
  291. <libs>
  292. <lib>${java.home}/lib/rt.jar</lib>
  293. <lib>${java.home}/lib/jce.jar</lib>
  294. </libs>
  295. </configuration>
  296. </plugin>
  297. </plugins>
  298.  
  299. <!--
  300. During the build, we are going to scan all files in src/main/resources
  301. folder such as plugin.yml and your settings files and replace all variables
  302. such as ${main.class} with their proper values.
  303.  
  304. You can use native variables such as ${project.X} or the ones you defined above
  305. in the properties section.
  306. -->
  307. <resources>
  308. <resource>
  309. <directory>src/main/resources</directory>
  310. <filtering>true</filtering>
  311. </resource>
  312. </resources>
  313. </build>
  314.  
  315. </project>
Advertisement
Add Comment
Please, Sign In to add comment