Anyway, is there any way currently or maybe in the future that can
    easily convert Ant based projects to Maven?

Start by creating a Maven project and then copy and paste the packages from your Ant-based project to packages in your Maven-based project.

That should get you very far. Though there are several specifics that you'll need to learn about Maven (many resources available on-line), e.g., images go in the 'resources' folder, and Maven projects in general are very strictly structured. Good news: NetBeans has great support for Maven.


I've made and converted other projects before, but this one is both JavaFX and is therefor the end-of-the-road with a several dependencies. Not impossible, but if there was a magic "convert project build system" it'd make such conversions easier.


I have to disagree with the Maven support, at least when compared to Ant. Netbeans with Ant makes sure all build dependencies are up-to-date on build/run while Maven in Netbeans takes the "Do it yourself" approach.


There is, I've noticed, an issue with filesystem jar detection in Netbeans. I've had my Ant based require the jar outputs of the several Maven projects. Problem is that if any of the projects have a build failure, Netbeans will correctly show an error that the dependency is missing but won't do the same on the next successful build. I have to do somekind of ritual including switching between files(module-info usually works), typing letters within them, and mashing ctrl + s in order for it to rescan and detect the jar files.


Netbeans and Maven, for whatever reason, feels the need to reconfigure itself everytime a new JDK is used, even if it's the same version(15, for example) but different builds, resulting me having to wait 5 minutes to finish whatever it's trying to do.


There is also the issues of Netbeans not showing build errors until you actually try to build if a project uses removed APIs, like I am with incubating modules, and a lack of clarity on what the difference is between "build" and "build with dependencies". I wish there was an IDE toggle for "always build with deps".


TL;DR Maven support in Netbeans is either way worse than Ant or Maven just sucks. I wish I could still use Ant, it was truly a blissful experience compared to Maven, but there isn't any real cross-ide support nor do you have Maven central.




Gj

On Thu, Apr 23, 2020 at 7:21 PM Ty Young <youngty1...@gmail.com <mailto:youngty1...@gmail.com>> wrote:


    On 4/23/20 12:11 PM, Geertjan Wielenga wrote:
    You'll only get love and respect from us.

    File those issues and fight for them on the mailing lists. :-)


    If I joined any more mailing lists I think my inbox will implode!


    Anyway, is there any way currently or maybe in the future that can
    easily convert Ant based projects to Maven?



    Gj

    On Thu, Apr 23, 2020 at 7:08 PM Ty Young <youngty1...@gmail.com
    <mailto:youngty1...@gmail.com>> wrote:


        On 4/23/20 12:04 PM, Geertjan Wielenga wrote:

        It's pretty good for you that the people working hard on
        this project don't have the opinion of you that you have of
        us. :-)


        No offense meant! I've just had some very bad experiences
        with many different open source projects.  I've reported
        around 12 different bugs on some projects before only to get
        an angry message in return and/or every single one ignored.



        Have a nice day. :-)

        Gj


        On Thu, Apr 23, 2020 at 7:01 PM Ty Young
        <youngty1...@gmail.com <mailto:youngty1...@gmail.com>> wrote:


            On 4/23/20 11:33 AM, Geertjan Wielenga wrote:
            Guess it's time to file an issue. :-)

            Here's where you do that:
            https://issues.apache.org/jira/projects/NETBEANS


            I'll be honest, unless I'm confident that someone is
            actually going to fix the bug I don't usually report
            them. It's not worth my time, or the people who will
            inevitably do janitor work by closing ignored bug
            reports, to file these. There are already 5(or more)
            pages so it doesn't exactly stir confidence that anyone
            is fixing them.


            Which, to be clear, is fine. I'm not making a big stink
            here and demanding anyone fix anything. I'm just saying
            that it's not worth anyone's time if there is no
            interest in it nor is it worth create yet another
            account online in which may have a data breach in the
            future.


            Anyway, I've signed up and filed, which you commented
            on:
            
https://issues.apache.org/jira/projects/NETBEANS/issues/NETBEANS-4233?filter=allopenissues



            Gj

            On Thu, Apr 23, 2020 at 6:31 PM Ty Young
            <youngty1...@gmail.com <mailto:youngty1...@gmail.com>>
            wrote:

                Bit of a PSA for those that don't build the
                in-development(15, right
                now) from source, Modular Ant based projects WILL
                NOT compile, failing on:


                Unable to create javax script engine for javascript


                which then points to:


                <j2semodularproject1:modsource_regexp
                
xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1";

                modsource="${test.src.dir.path}"
                property="have.tests.test.src.dir.regexp"/>


                I'm guessing this has something to do with
                Nashorn's removal since
                building spams the console with deprecation and
                removal warnings for it
                in previous JDK builds. Non modular Ant based
                projects seem to still
                compile, at least compiling a newly created project
                still works.


                Guess it's time to move to Maven...


                And no, Netbeans 12 doesn't make a difference.


                
---------------------------------------------------------------------
                To unsubscribe, e-mail:
                users-unsubscr...@netbeans.apache.org
                <mailto:users-unsubscr...@netbeans.apache.org>
                For additional commands, e-mail:
                users-h...@netbeans.apache.org
                <mailto:users-h...@netbeans.apache.org>

                For further information about the NetBeans mailing
                lists, visit:
                
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to