My public repository is basically a massive hack: generating a dummy JAR from dummy sourcecode, then replacing the JAR Eclipse generated and I obfuscated, then injecting the required Maven META-INF entries into the JAR, rehashing the *.jar.md5 and *.jar.sha1, then uploading the entire repo to a dir on my webserver.
Legal note: If the codebase is GPLed, the you should explicitly state what the license is for any AOT outputā¦assuming that the AOT can run without the library.
As the author you just need to state what the license rules areā¦but you should explicitly state them. So youād need to state that class files and generated code is BSD or whatever. This opens up a can of worms however. Consider that using a reverse engineering tools of BSD licensed .class files is a āderived worksā of the .class files and so logically BSD licensed, so defeating youāre purpose. You could add an exception clause, but Iād guess that would be deemed to be unenforceable. Iād suggest that you GPL everything and get the GPL taint and state that other licensing options are available from the original authorā¦if youāre willing to deal with the generated emails. You could always drop to a less restrictive license in the future if that becomes too much of a PITA.
NOTE: Iām not a lawyer so take this for what itās worthā¦which isnāt much.
I reworked it to this simple procedure:
[x] take your mylib-{version}.jar
[x] inject some META-INF entire in your JAR (take previous entries and replace the version string in those)
[x] generate a mylib-{version}.pom (take previous POM and replace version string)
[x] md5sum mylib-{version}.jar
[x] sha1sum mylib-{version}.jar
[x] md5sum mylib-{version}.pom
[x] sha1sum mylib-{version}.pom
[x] dump in some online folder that you defined in your dependencies
(yes, this really is the simplified method, and iām now investigating maven install-file for funzies)
My attempt at thread derailment: Maven is a symptom of everything wrong with software development in the modern age And as an aside: Project Jigsaw - solving a problem nobody has any more, in the most complicated way possible, so that they have failed to deliver what nearly everyone asked for 10 years ago that only took a couple of hours for an amateur to implement. Way to go, software engineers. The same guys probably invented Maven.
In theory: Jigsaw coupled with the proposed (and AFIK unspecified) lightweight native interface should could be very interestingā¦too bad weāre not going to see it soon.
I know that you arenāt so fond of all these software design stuff and so on cas, but not everybody is writing only tiny little 1k loc mini games in the world. All this practices which evolved over time might be to big or complicated for some projects, but the nearly all have good ideas behind them. And I would even say that one should start to use them as early as possible.
I get when riven donāt want to go through all the hassle to set things up, but it would be a small price to pay to make it for a lot of people easier.
To finish things up, wtf are you talking about maven???
There are alternatives to maven like grandle ā¦ which I did not try yet, but overall it just makes the hole project live-cycle management so much easier. One might have to read 1-2 pages and try it once to understand the basics, but it is just so much easier to use then any other available tool + all the new positive aspects it brings with it.
So that was my little rant for all the āconservativeā guys here.
Well, when I think about maven I always have the same question in mind : ''Why was Maven invented?"
I read here and there that it makes your project lifecycle a lot easier and it can replace ant, and that ant build are a pain to maintain and that it slow down your project velocity and etc.
But really, what does Maven do that I canāt do with Eclipse + a few mouse click + some .bat files?
Not require the .bat files. Want to add a dependency on commons-io? Type FileUtils in an editor in eclipse. It gets redlined because it doesnāt know what that is. Right click it, say āsearch for maven dependencyā (or whatever it says in eclipse these days). Find commons-io in the list. It will download it, the source and javadoc (optionally), add it to your compile and run classpath, and the same for anything it depends on.
All clicky. No XML.
Oh but right, REAL MEN do it all by hand. Whatevs.
I will assume that for now. Something like that is really a good thing. I would want something that could manage all the external jar I need for my project without having to go download them by hand and that would update the jar for the newest version when I want. That would be really useful for sure. But why doesnāt maven only do that? Or is there any plugin or tool out there that only do that?
I donāt want maven to create my eclipse project. Eclipse can do it.
I donāt want maven to build my jar. Eclipse can do it.
I donāt want maven to run my test. Eclipse can do it.
I mean why did they tried to make 1 tool do everything and even worse force you to do everything with that tool? Nobody want thatā¦ Everyone like to work his own way.
My question stand, why was maven invented? To force you to do everything with it or to give you the opportunity to automatically download all the jars you need for your project to run?
Dependency management is a big reason for Mavenās existence, yes. It also does quite a few other things.
As for the preference for eclipse, fine. If you prefer eclipseās layout, change them from the defaults. No one is āforcingā you to use it at all, let alone use every last feature of it. Perhaps you should reserve your remaining criticisms of maven until youāve learned more about it
Wait, I made a public maven repository, I thought by doing that I actually went through the hassle - believe me, it was. And now you insinuate I didnāt bother.
Anyways, Iām willing to tolerate even more of a derailment than this! Iād appreciate it though if we could also discuss mapped objects, while weāre at it.
Iām currently entertaining the idea of making a block-world kind of test game using MappedObjects, where I would have a Block class thatās a MappedType. No, not minecraft.
Give me a week to get back to my computer though.
You didnāt go through the hassle of getting your library hosted on the Maven central repository (which is managed by Sonatype). Itās āniceā to host things on the central repository because all Maven projects will check that location for libraries. With your way, we have to update our own project to use the additional repository
I use Maven quite a bit with work and really like it, and it sounds like some people have misconceptions or just donāt know much about Maven so hereās my take on what it can do and why itās cuddly:
Maven is a combined dependency management system and project build/lifecycle manager. The build system is powerful but can be largely ignored if conventions are followed. The dependency manager is nice because it forces you to document the exact libraries AND their versions that you depend on. As said before, it will download the JARs for those dependencies, and the JARs of any transitive dependencies, etc. It will also resolve as best version conflicts between dependencies.
At work before Maven, my classpaths might grow to 50 jars in some of our servers, with libraries Iād never use personally but were a dependency. If I wanted to update Struts or Hibernate, it was a very bug prone hassle to try and get the correct new versions of their dependencies. This is trivially easy to do with Maven and should not be sneezed at. I doubt my games will ever need that many dependencies, but itās still nice to have as a feature.
There is a very nice Maven plugin for Eclipse so you still create your project through Eclipse (just a different type than plain Java). Eclipse still does all of the compiling and it can still do its magic classpath sharing between projects (even other Maven ones in your workspace). The plugin will automatically download the Javadocs and source associated with a dependency when you go to inspect an element, and links it for you into the normal Eclipse source inspection system.
By the time you need to build your final application, you might have to mess with some XML funny business, but thereās a good chance youād have done that with ant. Maven has much better fat-jar support compared with Eclipse.
IMO Maven helps keep your own projects more modularized because you can split them into separate modules. Do you have custom math functions and vectors, etc. Itās a module. Physics library or helper code; itās a module. Input system or event system, or core AI routines? Module. Then you can have them depend on each other as needed, and have a last module that brings them all together and implements your game.
Want to make a new game, just pull in your modules you want to reuse instead of trying to gut pieces by hand.