I agree with a lot of what has been said:

 * Deprecate ANT - New Project (don't remove)
 * Keep ANT for existing projects

Also, I agree that Maven can seem quite overwhelming at first.  I have been using it for only about a year now, and still remember the OMG experience when I first looked at Maven.  However, with a little persistence, and a lot of research, I was able to get past that.  IT WAS WORTH IT!  Maven is NOT "the be all and end all". But it does work.  I have been using it for many small projects, including my own libraries and a number of open source projects (https://github.com/bewillcott <https://github.com/bewillcott>).

My environment:

 * ASUS Laptop
 * I7
 * 12Gb RAM
 * 1 Tb SSD
 * Fedora Linux 32
 * JDK 15
 * NB 12.1

I first had a problem with the unpacking of the Maven index when I only had 4Gb RAM, as Linux was set-up with /tmp as a RAM Drive using only 1Gb of RAM.  However once I upgraded the RAM I had no further problems.  NB is set to update the Maven index once a week, so this is not a problem either.

The benefits of using Maven are as extensive as the Maven repository.  Once you know what the dependencies are that you need, adding then is quite simple.  I believe that someone just starting out would greatly benefit from going straight into Maven, by-passing Ant altogether.  Further, the process of converting existing projects would be of long term benefit, and would simplify the on-going support of the project.

I would like to offer my assistance in the conversion process - as an example/training exercise so that you will know how to do it yourself - "If you give a man a fish, he eats for a day; If you teach a man to fish, he eats for a lifetime."(# <https://www.phrases.org.uk/meanings/give-a-man-a-fish.html>).

Brad.

On 21/4/21 1:10 am, Lisa Ruby wrote:
For those of you who have used Maven for a long time it may seem simple and straightforward, but for those of us who haven't it's not. I've struggled to try and understand it and figure out how to use it for my software project and gave up. And it's a huge amount of overhead, extra disk space usage, and more bits and pieces to keep track of that isn't justifiable for small simple projects. ANT works just fine for me, and I will keep using it for as long as I possibly can. I need to focus my time on getting my software out, not on the tools I have to use to do it.

Lisa

On 4/20/2021 10:00 AM, Geertjan Wielenga wrote:
I agree, the Ant-based project creation should be removed and I disagree that there should be any kind of conversion between Ant and Maven -- that simply will never work and we'll spend the rest of our days fixing bugs in that. To convert from Ant to Maven: create a new Maven project and copy the Java source files from your Ant project into it.

Gj

On Tue, Apr 20, 2021 at 6:58 PM <pszud...@throwarock.com <mailto:pszud...@throwarock.com>> wrote:

    Honestly, I think NB should have an internal conversation about
    removing the "new project" support for Ant projects, while still
    being able to open existing ones. It just confuses a lot of
    people if they're not going to be supported.

    I agree, if and ONLY if you provide at least a rudimentary way to
    convert ANT projects to Maven projects.   I have been struggling
    with this issue too long.  I have hundreds of Ant based projects
    that I would love to turn over immediately to Maven... but I
    can't , am struggling, and haven't coded a darn line in two
    months...  I used to code 10 hours a day ... and now...
    embarrassed by my inability to convert.,.

    I exaggerate a bit, I still code in "Old" Netbeans 8.2, but I
    know the days are numbered...



    On 2021-04-20 08:23, Will Hartung wrote:


    On Mon, Apr 19, 2021 at 12:55 AM Wayne Gemmell | Connect
    <wa...@connect-mobile.co.za <mailto:wa...@connect-mobile.co.za>>
    wrote:

        Is the perception that nobody does Maven EAR's anymore or
        that nobody uses EARs? I have a web app that has given me no
        shortage of issuse with ant.
        I'm trying to move it to Maven. If nobody is using maven
        then I need to move to something else. If nobody is using
        EAR's anymore then I'm pretty stuck figuring out this Maven
        issue.

    Well, it's several things.
    EARs are less popular because their necessity has been greatly
    reduced. Session beans can be placed in WARs now, so for many
    use cases, a WAR is completely adequate to the task.
    However, it's not suitable for all use cases.
    Notably, MDBs can not be deployed in WARs. But only as an EJB
    either deployed standalone, or bundled within an EAR.
    With the hue and cry over micro services and "down with the
    monolith", just the idea of a large application bundled in a EAR
    is falling out of favor.
    Also, there's a history of advocacy underlying this. Sun used
    NetBeans as a mechanism to advocate for Java and Java EE. It
    behooved them to have something like NetBeans to make Java EE
    development easier. So, it was important for NetBeans to have
    really first class Java EE support. Bundling the Java EE wizards
    and templates along with Glassfish all helped promote that.
    Of course, now, with the great Java Diaspora out of Oracle, the
    goals and drivers are different.
    For your project, if all you have is a web app and some session
    beans, then a simple WAR file is good to go. The Ant projects
    seem to essentially be deprecated now, so I would not rely on
    those for anything. If practical, especially if your project is
    young, I would migrate it to Maven. The Maven WAR is a pretty
    simple project and seems to work ok. Maven isn't going away any
    time soon, Gradle, it's primary competitor, doesn't really have
    the traction to overcome it yet, and it's been going for some
    time. If nothing else, the pom.xml file has become a de facto
    portable project format if, for nothing else, to capture
    dependencies.
    Honestly, I think NB should have an internal conversation about
    removing the "new project" support for Ant projects, while still
    being able to open existing ones. It just confuses a lot of
    people if they're not going to be supported.
    And I still haven't heard any concrete position the project has
    on internalizing Maven archetypes used for project wizards, or
    the process of adopting that.
    Legacy archetypes that used to work in NB 8 are now failing
    because they've vanished from Maven central. So, an external
    dependency broke an internal feature.
    Feel free to follow up with specific questions about getting
    your project to work and/or converted to Maven.
    Regards,
    Will Hartung


Reply via email to