Skip to content

Commit

Permalink
Update maven-integration.md (#177)
Browse files Browse the repository at this point in the history
* Update maven-integration.md

The article contains various outdated information, alongside not displaying when the article was updated last.
Additionally, the archetype doesn't work anymore, and Maven seems to work pretty well with libgdx according to my own findings. I'll have to return when I've tested platform compatibility and update the rest.

* Version 2

Removed "last updated" as syggested by Berstanio, and instead went with making it clear what information was updated, and what wasn't.
Re-introduced the warning as suggested by crykn, but adding the exact known issues Maven runs into.
Decided to keep the exact Maven-specific dependency information as a courtesy, as as far as I'm aware, since everyone else uses Gradle, this is not described or showcased anywhere.
  • Loading branch information
GustavBW committed Mar 20, 2024
1 parent 4aa9616 commit 74d13c6
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions wiki/articles/maven-integration.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,41 @@
---
title: Maven integration
---
Instead of using Gradle to setup your libGDX project, you can also use Maven. However, **this is _not_ recommended!** When issues arise, getting support will most certainly prove very difficult!

The article below may be outdated. Use it at your own risk!
Setting up your project with Maven is possible, but crossplatform support is heavily limited, and only desktop is known to work. It has not been further tested or used by the libGDX community, and there is no official support if any issues should arise.
{: .notice--warning}

## Introduction

libGDX is currently published to the SonaType snapshot repository. This will continue to happen until the Maven integration is complete. The repository only contains the latest snapshot release for now. Eventually we will publish release builds to SonaType as well.
## Introduction

Add the following to your settings.xml or your project's pom.xml:
The current automated LibGDX setup tool sets up a Gradle project, so to set up a Maven one for Desktop only, simply add the following dependencies to your project's pom.xml:

```xml
<repositories>
<repository>
<id>gdx-nightlies</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
```

If you use the archetype you do not need to add the repository to your Maven settings.

Setting up libGDX with Maven is non trivial as it
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx</artifactId>
<version>1.12.1</version>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-backend-lwjgl3</artifactId>
<version>1.12.1</version>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-platform</artifactId>
<version>1.12.1</version>
<classifier>natives-desktop</classifier>
</dependency>
```

And you got all you need to start up an Lwjgl3Application providing your own implementation of an ApplicationAdapter.

Alternatively, an older method described below may provide some crossplatform capability, but you may have better luck changing your build system to Gradle at that point.

## Using The Archetype

Setting up libGDX in general is non-trivial as it

* contains native libraries
* deploys to GWT
Expand Down

0 comments on commit 74d13c6

Please sign in to comment.