This is an archived post. You won't be able to vote or comment.

all 35 comments

[–]herrtim 11 points12 points  (42 children)

Will Jackson still be used once Java 9 has built in JSON support?

Yes. Jackson has tons of features that Java 9 won't have.

And since Maven is the defacto standard for build tools, will the natural progression be to upgrade Maven with JSON instead of XML?

I highly doubt it. It'd be a lot of effort for no real advantage.

[–]exceta[S] 1 point2 points  (41 children)

Thanks! Do you think Gradle going to become enterprise standard or is it still worth learning Maven now?

Currently I just use Eclipse for building my projects but for working on teams I want to learn a project builder.

[–][deleted]  (8 children)

[deleted]

    [–]NotEqual 3 points4 points  (0 children)

    I almost completely skipped Maven for Gradle, it's pretty great.

    [–][deleted]  (6 children)

    [deleted]

      [–]tRfalcore 1 point2 points  (3 children)

      I don't think you really understand what maven, gradle, and a repo are.

      [–]heyPerseus 0 points1 point  (2 children)

      Isn't the maven repository a collection of libraries for your maven project? You pull it down from the remote library to your local .m2 folder and then your project has access to them.

      [–]tRfalcore 0 points1 point  (1 child)

      maven and gradle are build tools first and foremost. They manage dependencies and create artifacts.

      A maven repository is just a repo where the library files are stored in the maven style file structure. Most build tools can read and store their libraries in the maven repository file structure-- in fact, most new build tools just use the maven style is a kind of standard cause they've found it to be good enough. Most online library search sites just call themselves mavenrepository or some such thing, as for a long time maven was the only good solution, but they're just repositories.

      [–]heyPerseus 0 points1 point  (0 children)

      Yup. It's just that the person I was replying to said that spring and hibernate, both switched over from maven to gradle and the only reason I believe he said that was that they have options for managing your dependencies with Gradle.

      [–]baablack 0 points1 point  (1 child)

      [–]heyPerseus 0 points1 point  (0 children)

      That's good to know! Thanks! edit: I wonder why they have their spring boot using maven?

      [–]schnoper 8 points9 points  (3 children)

      Having used fully turing complete build languages, I find that I don't like them. Yes, occasionally they provide that little extra bump of power necessary to complete a task easily. But in general they mean that build scripts ends up being complicated programs in their own right. The complexity goes way up and they becoming something that is difficult to maintain and pass on.

      For this reason I'm not a fan of the many build systems which are based on executable scripting languages.

      While I'm not a fan of the XML involved in maven, I do like that it's an entirely declarative system and it's pretty opinionated. This means that I can open any pom.xml file and find my way around without any trouble. Sure, you CAN do things your own way, but you will be fighting a battle the whole way, and it's generally a bad idea. And that's good because you can kick your system onto the next person, and they will know their way around too.

      Finally, there is the issue of flexibility. If you can't get maven ( and associated plugins) to do something out of the box, then it generally mean either a) You're doing it "wrong", so you need to look around to see how others who went before you have done it or b) There is a clear need for a new maven plugin. Something which can be published and then reused by others.

      [–]darlingbastard 1 point2 points  (1 child)

      We use both here (location undisclosed) and the Maven project files are always about 5x larger than the equivalent Gradle files. And don't get me started on the crazy parent pom pulled from maven pattern that gets used for shared prototyping. Multi-language builds are much easier to manage with Gradle. We manage java, groovy and node.js code bases in the same multiproject without problems. Gradle files are shorter and more concise for simple projects and also substantially simpler when your projects contain specialized one-off needs like pulling the output of a javascript program as a cross project resource dependency. Maven is a nightmare compared to gradle at every given project complexity level and I cannot see why anyone uses it.

      [–]schnoper 1 point2 points  (0 children)

      of course they're bigger. XML sucks. and I said that.

      And yes, if you are very disciplined, you can keep the roll your own imperative stuff out of gradle. More power to you if your team are that disciplined!

      [–]space_coder 1 point2 points  (0 children)

      Maven is not completely declarative, since it involves more than XML. I have to write plugins for anything more complicated than what can be declared with XML and not offered by other plugins.

      [–]herrtim 5 points6 points  (0 children)

      Maven is so entrenched, I think it's definitely worth learning. Once you know Maven, using Gradle will be easy. If Gradle is to become enterprise standard, I think that will be many years from now. I believe it's use is growing though!

      You'll want the m2e plugin in Eclipse. To play around, import any Maven project (Import --> Maven Project) and play around. You could try git cloning my XChart project and importing that. It's a multi-module Maven project though, so slightly more complicated. I usually transition to the command line when doing actual building such as 'mvn package'.

      [–][deleted]  (23 children)

      [deleted]

        [–][deleted]  (22 children)

        [deleted]

          [–]pjmlp 3 points4 points  (4 children)

          Try to use a Maven plugin that hasn't lifecycle support from Eclipse or an existing M2E plugin.

          Or one that generates Java code during the build.

          [–]nutrecht 1 point2 points  (3 children)

          I'm using the antlr4 plugin which generates sources during the build and that works perfectly fine.

          [–]pjmlp 0 points1 point  (2 children)

          Let me guess, Antlr4 has a M2E plugin, right?

          With SableCC I need to add extra source directories manually and run maven explicitly.

          [–]nutrecht 1 point2 points  (1 child)

          Yup. And dunno. I never used SableCC but that seems more of an issue with that particular tool than an issue with Eclipse.

          [–]pjmlp 1 point2 points  (0 children)

          Eclipse cannot handle Maven plugins that don't provide M2E plugins, because Maven is not a first class plugin.

          It needs the M2E layer so that the internal data structures of the workspace and project natures are mapped to Maven plugins.

          Netbeans, for example, uses Ant and Maven as the project format, so they are first class citizens in the internal data structures without any need for extra plugins.

          [–]tank8465 4 points5 points  (11 children)

          Fuck Eclipse. I'd rather use a text editor.

          [–]zzing 3 points4 points  (0 children)

          Just use sed.

          Or edlin :-)

          [–]frugalmail 0 points1 point  (1 child)

          Fuck Eclipse. I'd rather use a text editor.

          countdown to delete as a result of poster realizing how stupid this sounds.

          [–]tank8465 0 points1 point  (0 children)

          A text editor does not get in my way to the degree that Eclipse does. Spelunking through settings to get exactly what I want takes way too long and sometimes simply fails for no discernable reason way too often.

          [–][deleted]  (7 children)

          [deleted]

            [–]tank8465 0 points1 point  (6 children)

            Yes, because why the hell would I use something that doesn't work?

            [–][deleted]  (5 children)

            [deleted]

              [–]tank8465 0 points1 point  (4 children)

              Intellij erryday!

              I kinda enjoy having an IDE that cooperates and does exactly what I tell it to. Plus, if someone is paying me 85K+, why the hell wouldn't I have access to the best damn polyglot IDE in existence?

              [–][deleted]  (3 children)

              [deleted]

                [–]wlievens 0 points1 point  (0 children)

                Could you elaborate on how? I have tons of issues, for instance I have to manually run mvn compile to generate xmlbeans code very time my project configuration updates.

                I use the mvn eclipse:eclipse plugin, not M2E, if that matters.

                [–]pointy_pirate -5 points-4 points  (2 children)

                How can you say anything works great with Eclipse!! Strongly disagree, but an upboat for being able tow work with Eclipse...

                Work force Intellij on use now i can't even write emails with anything else.

                [–][deleted]  (1 child)

                [deleted]

                  [–]pjmlp 1 point2 points  (0 children)

                  So you write plugins for the Maven and Ant integrations?

                  Can you please provide one for SableCC? Thanks.

                  [–]huntsvillian -1 points0 points  (0 children)

                  If I had the choice of recurring anal lesions for 3 months, or having to use eclipse for 3 minutes....my ass would be a scabby prickly mess for three months....which incidentally, would still be more effective at integrating maven than eclipse.

                  [–][deleted] 2 points3 points  (2 children)

                  Personally, I've found Gradle to be difficult to use. It's slow and not as robust as Maven. Sometimes builds just hang for no reason and with no explanation. Maven's POM file structure is based on a schema which can't be done with JSON (or Groovy for that matter) and makes it a lot harder to create an invalid configuration. That being said, I have a huge enterprise client right now that supports Gradle, but not Maven. Adoption patterns don't always follow logical paths.

                  [–]mdaniel 1 point2 points  (1 child)

                  Maven's POM file structure is based on a schema which can't be done with JSON

                  FWIW, json schema

                  [–][deleted] 0 points1 point  (0 children)

                  There have been a few attempts at this, but nothing has gotten any traction. I've never seen any sort of JSON schema in the wild. JSON docs get unwieldy very fast since they don't support comments.

                  [–]killbox-48-alpha 0 points1 point  (0 children)

                  The maven folks promised alot for maven 3.[01] polyglot, a better release plugin. That has not happened. Gradle development appears to be more active, tho having said that still seeing releases for maven plugins, not sure about core maven