Slick Forums

Discuss the Slick 2D Library
It is currently Thu Aug 22, 2019 7:26 am

All times are UTC




Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: [IDEA] Maven 2
PostPosted: Sun Mar 04, 2012 9:00 pm 
Offline
Regular

Joined: Sun Oct 30, 2011 4:47 pm
Posts: 184
Location: Mittweida, Saxony, Germany
Hey,

I want to put the maven framework to discussion as base building and dependency API.

Why?
The structure of the different Slick projects is currently very... individual. No constant clear structure. A bad thing.
Currently the dependency libraries are part of the repository. A fact that is BAD. Its increases the size of the repository and forces you to update those files by hand again and again. Even worse is the fact that some libraries are multiple times added to the repository.
Slick is already published as a maven artifact.

What does Maven provide here?
A clear structured source and resource environment for runtime, compile and test cases.
Automated running of test cases.
Automated generation of maven artifact files (including files for javadoc and source distribution)
Library dependency handling (including native dependencies, so developing within 64bit Java will work without any problems)

How much work is that?
After all not much. It will be needed to remove the ANT buildscripts, all third-party libraries and native files from the repository. Then the source and resource files need to be moved around to fit the maven file structure that looks like this:
Code:
my-app
|-- pom.xml
`-- src
    |-- main
    |   |-- java
    |   |   `-- com
    |   |       `-- mycompany
    |   |           `-- app
    |   |               `-- App.java
    |   `-- resources
    |       `-- META-INF
    |           |-- application.properties
    `-- test
        |-- java
        |   `-- com
        |       `-- mycompany
        |           `-- app
        |               `-- AppTest.java
        `-- resources
            `-- test.properties


A good example I know of is the Nifty-GUI. There you can also see nicely how to handle (native) dependencies and multiple projects very nicely.

In case this idea gains is approved, I'll volunteer to put this idea into action.

Nitram

_________________
http://illarion.org


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Sun Mar 04, 2012 10:09 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
I'm for Maven infrastructure for Slick, If I remember correctly somewhere on forum someone have tried this before, I'm right?
Anyway, my suggestion is use Maven 3, out from some time,works fine (I'm talking from a real work experience) :D

_________________
Blog | Last game Drone Swarm


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Mon Mar 05, 2012 9:19 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
You are right but please consider that we are not on a large company where we need to use Maven. I work in a small company and we had maven which was sooooo bulky and hard to use that we switched back. We are just 10 people or so. There is really no need to have that useless "managing"-stuff. To much overhead.

The current Structure is just fine. Does anyone really have a problem with it?
(And why are you forced to pull the libraries again? You only need to do that if someone changes them o.o)

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Mon Mar 05, 2012 9:44 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
different experiences, maven help developer when switching projects with a default workflow (clean, install, test, package, etc..).
Maven could help slick in particular on package side:
- runtime dependencies,
- build exe
- distribuite for linux (32/64), mac os x
- package for applet,
- build one runnable jar

Something newbie always ask on forum :D

and could help also on modularity for slick: more simple test and try slick core or slick tests or slick utils

IMHO, my 2 cents!

_________________
Blog | Last game Drone Swarm


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Tue Mar 06, 2012 10:10 pm 
Offline
Regular

Joined: Sun Oct 30, 2011 4:47 pm
Posts: 184
Location: Mittweida, Saxony, Germany
Okay.

One yes
One no
And the rest does not care and hope the thread dies soon?

:wink:

Nitram

_________________
http://illarion.org


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Tue Mar 06, 2012 10:39 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
I've never used Maven and have no idea what it's for. What will this mean for developers? What will this mean for end-user? Will there still be a "Download full distributable" button? What about linking to LWJGL/TinyLine/IBXM/JOrbis? How will the user go about acquiring all the libraries and linking everything?

The reason I was initially chose Slick (some time ago, whenever Kev started it) was because it looked simple and was easy to get up and running without needing to know anything about source control, Eclipse plugins, or what have you. Since our target audience is generally beginner game developers coming from a Java2D background, whatever changes we make to Slick and its design have to be suitable for this type of audience.


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Tue Mar 06, 2012 11:28 pm 
Offline
Regular

Joined: Sun Oct 30, 2011 4:47 pm
Posts: 184
Location: Mittweida, Saxony, Germany
Oooookay.

Maven is basically a building and dependency management.

Instead of the build.xml you write a pom.xml that describes the layout of the application. So the name, the version, the authors, some weblinks and all the dependencies. When packaging a application using Maven, it downloads all the required dependencies from maven repositories (the largest one is the maven2-repository). The maven integration into IDEs works very good with Eclipse and IntelliJ IDEA, no idea about Netbeans. The IDEs creates the project files based on the default maven layout and automatically downloads and links the required libraries (along with the source and the javadoc). So you don't have to take care for anything there.

For game developers nothing changes. As its now you got your slick-x.jar you can link in your application or in case your application uses maven as well you can use the maven artifacts as well.

As summery:
What this thread proposes is the change the Slick development to base on maven. This effects ONLY the development of Slick itself not the development of games using Slick. This part just stays the same.

Nitram

_________________
http://illarion.org


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Tue Mar 06, 2012 11:30 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
Sure, I'm in favour then.


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Wed Mar 07, 2012 8:07 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
But please consider the amount of extra work we need to do. For us it's not that hard to hit the build.xml to make a jar right? Why inventing the wheel a new when we already have everything working?
Imho we should concentrate on making the library better and not compicating the process of making it work for us...

But well if everybody want's to add it, I can't to anything against :D Damn Democracy!

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Wed Mar 07, 2012 9:28 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
if maven could save time for slick developer (in particular for transitive dependencies), is okay.
time to get a poll for it?

another idea is have two branch of slick: one old style and one maven?
Maven branch could have more only pom.xml, and same source code of old style branch? Maybe automatically sincronized?

_________________
Blog | Last game Drone Swarm


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Wed Mar 07, 2012 10:27 am 
Offline
Regular

Joined: Sun Oct 30, 2011 4:47 pm
Posts: 184
Location: Mittweida, Saxony, Germany
Synchronizing branches never ends well :D

The main problem that kills the idea of having the current layout and a maven layout standing side by side is the requirement to change the location of the source/resource/test-files in order for maven to work properly.

Surely we can create the maven layout in a seperated branch in order to give everyone a chance to take a look at it. In the end how ever we have to descide for one method. Dragging along both won't end well.

Nitram

_________________
http://illarion.org


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Wed Mar 07, 2012 10:35 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
You want to complete shange the packaging? Maven can't work with any given form? Now I'm even more against it xD

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Wed Mar 07, 2012 11:28 am 
Offline
Regular

Joined: Sun Oct 30, 2011 4:47 pm
Posts: 184
Location: Mittweida, Saxony, Germany
To something like this:
Code:
[root]
|-- pom.xml
|-- Slick
|   |-- pom.xml
|   `-- src
|       |-- main
|       |   `-- java
|       |       `-- org
|       |           `-- newdawn
|       |               `-- slick
|       |                   |-- Game.java
|       |                   |-- ...
|       |                   `-- ...
|       `-- test
|           |-- java
|           |   `-- org
|           |       `-- newdawn
|           |           `-- slick
|           |               |-- AlphaMapTest.java
|           |               |-- ...
|           |               `-- ...
|           `-- resources
|               |-- alphamap.png
|               |-- ...
|               `-- ...
|-- Slick-Tools
|   |-- ...
|   `-- ...
|-- Slick-Examples
|   |-- ...
|   `-- ...
|-- Slick-AE
|   |-- ...
|   `-- ...
...


This does not change the resulting Jar files. Only the structure of the development environment is altered.

As developer you can look at the pom.xml files as "project" files like the ".project" file Eclipse creates. The difference is that the maven projects can be load by the known Java IDEs and that they resolve the dependencies automatically.

Nitram

_________________
http://illarion.org


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Wed Mar 07, 2012 8:50 pm 
Offline
Game Developer

Joined: Sun Nov 12, 2006 11:18 pm
Posts: 890
Location: Germany
I don't think it's a good idea at the moment.

Reasons:
1. Slick only has one dependency (LWJGL and it's related jars), Slick-AE maybe libGDX and LWJGL.
2. All we need for the build process is in the build.xml and working fine.
3. Devs are still not comfortable with Mercurial/bitbucket and Maven requires a directory tree revamping.
4. We have to make sure that all dependent libs are in some remote Maven repository or in the master remote Maven-2 repository. Is that the case?
5. Every developer machine gets bloated with a local Maven repository.
6. Every IDE also supports build.xml files.

Honestly I don't see the benefits.

_________________
Right Angle Games | Marte Engine
Back to the past | Star Cleaner | SpiderTrap


Top
 Profile  
 
 Post subject: Re: [IDEA] Maven 2
PostPosted: Wed Mar 07, 2012 9:33 pm 
Offline
Regular

Joined: Sun Oct 30, 2011 4:47 pm
Posts: 184
Location: Mittweida, Saxony, Germany
Okay regarding the libraries:

Slick
  • ibxm (not present in any public maven repo, what is this anyway?)
  • jinput (present in maven central)
  • jnlp (present in freehep repository)
  • jogg (present in maven central)
  • jorbis (present in maven central)
  • lwjgl (present in maven central)
  • tinelinepp (also not around, and what is this? ^^ Some sort of lineparser?)

Slick-AE
  • Slick
  • libgdx (not present in any public maven repo)
  • android (not present in maven central, what is this anyway? Is this really the Android SDK?! Thats like... placing the rt.jar of Java into the repo...)

About the bloating of maven:
Yes but thats not worse then placing all the libraries in the mercurial repository.

About the build.xml:
Yes that is supported by all IDEs. For building. Not as base project for the development. Currently there are only the prepared eclipse project files. I for one use IntelliJ IDEA. No project files for me there. Maven would solve this problem.

And in regards of Mercurial:
Noone is comfortable with that. Its just strange :P And I had to install this weird stuff on my computer. Maybe someone should write a little crash course on how to use it properly? Not just for the main developers, also for everyone willing to contribute something.

Nitram

_________________
http://illarion.org


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group