maven.adoc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. = Maven Artifacts
  2. :revnumber: 2.1
  3. :revdate: 2021/05/05
  4. You can build jME3 projects using Maven-compatible build systems.
  5. Artifacts for recent releases are available from the Maven Central Repository:
  6. * link:https://search.maven.org/search?q=org.jmonkeyengine
  7. The group id for all jME3 libraries is `org.jmonkeyengine`.
  8. The following artifacts are available:
  9. * jme3-android - Android platform support
  10. * jme3-android-native - Native libraries for Android platforms
  11. * jme3-core - Core functionality needed in all jME3 projects
  12. * jme3-desktop - Desktop platform support (Windows, Linux, and macOS)
  13. * jme3-effects - Extra special effects, including water and other post filters
  14. * jme3-examples - Sample/test/tutorial apps
  15. * jme3-ios - iOS platform support
  16. * jme3-jbullet - Physics library using jBullet
  17. * jme3-jogg - Asset loader for https://www.xiph.org/ogg/[the Ogg audio format]
  18. * jme3-lwjgl - Interface to LWJGL v2
  19. * jme3-lwjgl3 - Interface to LWJGL v3
  20. * jme3-networking - Networking library (aka SpiderMonkey)
  21. * jme3-niftygui - NiftyGUI support for jME3
  22. * jme3-plugins - Extra asset loaders for https://www.khronos.org/gltf/[glTF], https://www.ogre3d.org/[Ogre] XML, and jME XML formats
  23. * jme3-terrain - Terrain library (aka TerraMonkey)
  24. * jme3-testdata - Assets used in jme3-examples
  25. * jme3-vr - Support for virtual reality
  26. For a basic desktop application, you need at least:
  27. * jme3-core
  28. * jme3-desktop
  29. * jme3-lwjgl OR jme3-lwjgl3
  30. For a basic Android application, you need at least:
  31. * jme3-core
  32. * jme3-android
  33. * jme3-android-native
  34. == Gradle
  35. [source,groovy]
  36. ----
  37. repositories {
  38. mavenCentral()
  39. }
  40. def jme3 = [v:'3.8.1-stable', g:'org.jmonkeyengine']
  41. dependencies {
  42. implementation "${jme3.g}:jme3-core:${jme3.v}"
  43. runtimeOnly "${jme3.g}:jme3-desktop:${jme3.v}"
  44. runtimeOnly "${jme3.g}:jme3-lwjgl:${jme3.v}"
  45. }
  46. ----
  47. == Maven
  48. [source,xml]
  49. ----
  50. <properties>
  51. <jme3_g>org.jmonkeyengine</jme3_g>
  52.   <jme3_v>3.8.1-stable</jme3_v>
  53. </properties>
  54. <repositories>
  55. <repository>
  56. <id>mvnrepository</id>
  57. <url>https://repo1.maven.org/maven2/</url>
  58. </repository>
  59. </repositories>
  60. <dependencies>
  61. <dependency>
  62. <groupId>${jme3_g}</groupId>
  63. <artifactId>jme3-core</artifactId>
  64. <version>${jme3_v}</version>
  65. </dependency>
  66. <dependency>
  67. <groupId>${jme3_g}</groupId>
  68. <artifactId>jme3-desktop</artifactId>
  69. <version>${jme3_v}</version>
  70. <scope>runtime</scope>
  71. </dependency>
  72. <dependency>
  73. <groupId>${jme3_g}</groupId>
  74. <artifactId>jme3-lwjgl</artifactId>
  75. <version>${jme3_v}</version>
  76. </dependency>
  77. </dependencies>
  78. ----
  79. == Snapshots
  80. Typically, you will want to develop against the latest stable version of the engine. For testing
  81. purposes, snapshot builds are generated and updated every time that changes are commited to the
  82. master branch.
  83. You can add the snapshot repository to your build files, and set the version to the snapshot build:
  84. === Gradle
  85. [source,groovy]
  86. ----
  87. repositories {
  88. mavenCentral()
  89. maven {url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'}
  90. }
  91. /*
  92. * Gradle defaults to cacheing artifacts for 24 hours. This entry makes sure that
  93. * you are always using the absolute latest snapshot, but it does mean that the engine
  94. * gets downloaded on every build.
  95. */
  96. configurations.all {
  97. resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
  98. }
  99. def jme3 = [v:'3.8.1-SNAPSHOT', g:'org.jmonkeyengine']
  100. ----
  101. === Maven
  102. [source,xml]
  103. ----
  104. <properties>
  105. <jme3_g>org.jmonkeyengine</jme3_g>
  106.   <jme3_v>3.7.0-SNAPSHOT</jme3_v>
  107. </properties>
  108. <repositories>
  109. <repository>
  110. <id>mvnrepository</id>
  111. <url>https://repo1.maven.org/maven2/</url>
  112. </repository>
  113. <repository>
  114. <id>snapshots</id>
  115. <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
  116. </repository>
  117. </repositories>
  118. ----