Slick Forums
http://slick.ninjacave.com/forum/

[IDEA] Maven 2
http://slick.ninjacave.com/forum/viewtopic.php?f=27&t=4647
Page 2 of 4

Author:  Tobse [ Wed Mar 07, 2012 9:36 pm ]
Post subject:  Re: [IDEA] Maven 2

Maven discussion… hmm… I worked with Maven projects that had hundreds of dependencies. The firm had a local maven repository, so I needn’t download all libs from an online repo. So I know the advantages of Maven. But also with this background I’m happy that I don’t need It for Slick development.

You can simply download Slick and have all you need to start developing. With Maven you can get the libs via the pom file. But woe Maven has problems downloading the files, or cannot find them in the repo. -We also used the installed Maven, instead of the Eclipse built in, because of strange Maven behaviors.
Then you need a small gaming lib (which is not the nifty gui) that is not included in the official Maven repo… then you have to add it manually in your local repo and in the pom file. But this breaks the good World, because now you have online and local dependencies. And now try to give your project to a friend. Hmm.. again.

A: I stop here, because my statement is not objective. And I my aim is not to start a big pro and cons Maven discussion. It’s a „a matter of taste“, a „crucial question“. For me Maven would be too oversized. It’s an advantage to have all things packed together.

Attachment (you should jump to A:):
Yes you do automatically run JUnit tests with M. but do we have one test? –Ant can do this as well (Acdtaw).
We can exclude the tests from the lib by exporting and can same 5kb but Acdtaw.
Maven forces you to a project (big) structure. Not flexible for my projects.
Maven can help with building exe, jar etc but Acdtaw.
We already have lots of working Ant build functions –even signing jars for webstart.
Yes I know the special Maven builds which exports all included libs but now jup to A:

@Nitram: Maybe it’s an option to have an additional Maven repo based on our current. Ther’s already a Ant task which seems to create such a version. I don’t want to take the wind from your Maven sails.

Anyway, lets rock on Slick and bring to new age.

Greets,
Tobse

Author:  arielsan [ Wed Mar 07, 2012 11:25 pm ]
Post subject:  Re: [IDEA] Maven 2

If I don't remember wrong, ibxm is a library to reproduce mod/xm audio files, the new project is named micromod. I believe Slick2D integration of this library was purely experimental and almost not used for anything, but I could be wrong too.

Author:  davedes [ Wed Mar 07, 2012 11:43 pm ]
Post subject:  Re: [IDEA] Maven 2

arielsan wrote:
I believe Slick2D integration of this library was purely experimental and almost not used for anything, but I could be wrong too.

MODSound relies on ibxm. :) Not that anybody ever uses that class...

Author:  arielsan [ Thu Mar 08, 2012 12:29 am ]
Post subject:  Re: [IDEA] Maven 2

Maybe now that you are thinking in maven, you could think in having more than one module to separate stuff nobody uses. But I only suggest ideas, I am using Slick2D no more.

Author:  Gornova81 [ Thu Mar 08, 2012 10:45 am ]
Post subject:  Re: [IDEA] Maven 2

my suggestion: let's open a poll to make this change

Author:  davedes [ Thu Mar 08, 2012 3:57 pm ]
Post subject:  Re: [IDEA] Maven 2

If the change is made, who would do the work and keep the Maven stuff maintained during Slick development? It wouldn't be me because (a) I'm happy enough with the current system and haven't seen users even so much as mention Maven (I bet many of them don't know what it is), (b) I don't know anything about Maven, and (c) my priorities lie in fixing Slick's code for the end-user rather than the way developers interact with it.

Author:  Tommy [ Thu Mar 08, 2012 7:31 pm ]
Post subject:  Re: [IDEA] Maven 2

I'm with davedes here. In the end it's the development group that has to deal with it.
The build.xml stuff is working and I don't want to go the Maven route for Slick.

It should be our main target to focus on Slick improvements and bug fixes. That's already keeping us busy enough.

Other developers can upload slick.jar to Maven2 repo and use Maven for their projects if they want to. I would love to stay with ant and the current way we create the Slick package and resolve dependencies manually.

Author:  jmabrey [ Wed Jul 25, 2012 7:51 pm ]
Post subject:  Re: [IDEA] Maven 2

I began to try and re-implement the build system completely in Maven, which I discovered would essentially not be possible at this time. Maven's support for webstart generation is very simplistic, and the needs of this project surpass Maven's built in support already.

So, I created a new Maven pom that combines the best of both worlds: Maven artifact support with Ant's webstart generation.

The mercurial bundle for this is available here. It is quite large due to the number of directory moves.

Here are the available goals for the Maven script Run these with "mvn [goalname]":

package - Compiles the classes and output the slick, slick-util,slick-example, and the various tool jars, as well as their dependencies, to the dist directory.

javadoc:javadoc - Generates the javadoc to dist/javadoc/

Note that this is UNFINISHED, and NOT READY for the Slick main repo. Some things that need to be fixed/added before then are:

  • The Maven/Ant webstart generation shouldn't make a keystore each time. I just got lazy and coded that since it was easier.
  • Maven needs to output the zips to the dist directory instead of the target directory.
  • Support for direct uploading to the server
  • Currently Maven packages the former testdata directory into a JAR as part of the build. This jar is not what the test code expects to find, so to run the tests you have to unzip the jar.
  • Ideally a Maven pom shouldn't create multiple artifacts (slick.jar, slick-util.jar).

The major changes introduced are:

No more library storage in the repo.

Library dependencies are specified in the pom and downloaded when needed by Maven. To accomadate this, since Slick uses several unavailable 3rd party libraries, Ive created our own temporary Maven repository. This library repository is intended to only be temporary however, because the other libraries should be uploaded to Maven Central as 3rd party artifacts.

Ant is no longer the build system.

Ant is now only peripherally part of the build, as it is used for webstart generation only. This may change if Mavens webstart mojo plugin becomes more mature. Now the only requirement for building Slick should be Maven, as the antrun Maven plugin will download the needed ant runtime automatically when it is used.

No more separate code directories.

Previously the code was separated into examples, tools, etc directories. With Maven this is bad practice. Maven will now differentiate the packages automatically, and only package up the specified packages into each jar. Now all the source of slick is in one main directory.


Furthurmore: If the community likes this change, I can move the rest of the projects over to Maven.

EDIT: Changed bundle download. The bundle was based off the wrong repo, and included other changes not related to this patch at all.

Author:  davedes [ Thu Jul 26, 2012 2:29 am ]
Post subject:  Re: [IDEA] Maven 2

Thanks for all the work regarding Slick's packaging, jmabrey. Maven is something we would definitely like.

Have you seen this thread? It includes some discussion on how the devs eventually hope to make Slick more "modular." This should be considered when working with Maven and packaging for Slick.
viewtopic.php?f=27&t=4691

Feel free to give us a pull request on Bitbucket -- if it's all good I can accept for you.

Author:  jmabrey [ Thu Jul 26, 2012 4:47 pm ]
Post subject:  Re: [IDEA] Maven 2

I'm going to concentrate on getting everything moved to Maven, and then get the modularity worked out. Making projects modular in Maven is ultra easy, you just create pom chains to build sub-modules, so it'll be easier to do once Maven is already in place and working.

Author:  jmabrey [ Fri Jul 27, 2012 8:42 pm ]
Post subject:  Re: [IDEA] Maven 2

Alright, take a look at the repo that I forked. I will send you the pull request soon, but I am not finished with the changes. Given the massive nature of the changes, the merge will likely be very manual for the changes introduced since I forked.

I know I made a lot of HUGE changes with this move to Maven, but the changes were needed in order to make the Maven build scripts conform to Maven standards. The main projects are all converted to Maven, and the remaining unconverted projects are application proof-of-concepts built on top of the actual library. Those will be gotten to, but I'm more concentrated on ensuring that the new build scripts for the main projects match up with the old build scripts as exactly as possible in terms of output.

Is there anyway to get a few people to test the new build system? I want to be sure everything is absolutely correct.

Especially someone with the android port. That build script was highly unusual (class replacement!).

Author:  Nitram [ Sun Jul 29, 2012 12:32 am ]
Post subject:  Re: [IDEA] Maven 2

Did you start to convert the development or the default branch? If you are changing the default branch, merging in the state of the development branch will be painful.

Nitram

Author:  jmabrey [ Mon Jul 30, 2012 5:45 am ]
Post subject:  Re: [IDEA] Maven 2

I started on the default branch.

The transition was painful.

I fixed it though.

Author:  jendave [ Thu Aug 02, 2012 6:54 am ]
Post subject:  Re: [IDEA] Maven 2

Hi,

I took a look at the Maven pom.xml file and had some comments. Overall it looks very good. A few things -

1. The compilation gave source level errors. That was fixed with this
Code:
      <java.source.version>1.5</java.source.version>
      <java.source.target.version>1.5</java.source.target.version>


2. Any particular reason that Maven 2.2.1 is the default? Maven 3.0.4 is stable now.
3. Any interest in the reporting side of Maven? The site generation can be quite useful
Maybe something like this:
Code:
        <reporting>
        <plugins>
            <!-- Configure Built-In Dependency Reports NOT to scan Repos, Saves a
                   LOT of time -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                    <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                </configuration>
            </plugin>

            <!--  <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changelog-plugin</artifactId>
                <version>2.2</version>
            </plugin> -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.9.1</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>checkstyle</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <propertyExpansion>
                        cacheFile=${project.build.directory}/checkstyle-cachefile
                    </propertyExpansion>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.5.1</version>
            </plugin>

            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.4</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>analyze-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.5</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8.1</version>
                <configuration>
                    <quiet>true</quiet>
                    <failOnError>false</failOnError>
                    <detectOfflineLinks>false</detectOfflineLinks>
                    <show>package</show>
                    <level>package</level>
                </configuration>
                <reportSets>
                    <reportSet>
                        <configuration>
                            <quiet>true</quiet>
                            <failOnError>false</failOnError>
                            <detectOfflineLinks>false</detectOfflineLinks>
                        </configuration>
                        <reports>
                            <report>javadoc</report>
                            <report>test-javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>2.7.1</version>
                <configuration>
                    <linkXRef>true</linkXRef>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <minimumTokens>100</minimumTokens>
                    <targetJdk>1.6</targetJdk>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <linkJavadoc>true</linkJavadoc>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.12</version>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <tagListOptions>
                        <tagClasses>
                            <tagClass>
                                <tags>
                                    <tag>
                                        <matchString>todo</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                    <tag>
                                        <matchString>FIXME</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                    <tag>
                                        <matchString>deprecated</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                </tags>
                            </tagClass>
                        </tagClasses>
                    </tagListOptions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>1.3.1</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>dependency-updates-report</report>
                            <report>plugin-updates-report</report>
                            <report>property-updates-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

        </plugins>
    </reporting>


In any case, the pom file looks great. I would be more than happy to help with the Maven build process.

Dave

Author:  jendave [ Fri Aug 03, 2012 5:37 pm ]
Post subject:  Re: [IDEA] Maven 2

I forked the maven branch and made some changes. You can see my repo at https://bitbucket.org/jendave/slick-maven/overview
I split out the tools and examples into their own maven modules. All of the tools can be built and run easily. I still need to integrate the webstart stuff though. I have created a "standard" pom.xml for apps/games that want to use Slick. I will be converting the Slick-Based-Applications of to it.

Page 2 of 4 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/