You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Thomas Kellerer <sh...@gmx.net> on 2023/02/26 12:14:30 UTC

Creating a new platform application: Maven or Ant?

Hello,

I am trying to "migrate" an old NetBeans platform application that I created with NetBeans 8.0 about 10 years ago

I decided to create a new NetBeans platform application from scratch as there is a lot of stuff I would do differently today.

However, I am not sure if I should go for Maven or Ant as the basis for my new application.

What is the recommendation from the NetBeans team for a new platform project?

I am using Java 17 if that matters.

Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

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


Re: Creating a new platform application: Maven or Ant?

Posted by Davide Grandi <da...@email.it>.
IMHO, the difference is the maven's declarative approach instead of 
ant's imperative one.

Maven "style" is all about default behavior/naming that you should 
follow unless you have

some good reasons not to.

Maven help and docs are very useful, and there's many pom.xml ... to copy !

Have a nice sunday,

     Davide

On 26/02/2023 13:14, Thomas Kellerer wrote:
> Hello,
>
> I am trying to "migrate" an old NetBeans platform application that I 
> created with NetBeans 8.0 about 10 years ago
>
> I decided to create a new NetBeans platform application from scratch 
> as there is a lot of stuff I would do differently today.
>
> However, I am not sure if I should go for Maven or Ant as the basis 
> for my new application.
>
> What is the recommendation from the NetBeans team for a new platform 
> project?
>
> I am using Java 17 if that matters.
>
> Thomas
>
-- 
ing. Davide Grandi
email    : davide.grandi@email.it
linkedin : http://linkedin.com/in/davidegrandi


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

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


Re: Creating a new platform application: Maven or Ant?

Posted by Neil C Smith <ne...@apache.org>.
On Sun, 26 Feb 2023 at 21:58, Joseph Huber <JH...@stanref.com.invalid> wrote:
> I considered moving from Ant to Maven, but really found no good reason to do so.  I have customized build macros in Ant (creating installers ...

This was one reason I was using Ant too.  Those installer aspects of
my build were rewritten in plain Java as the early basis of NBPackage.
I'm now using that for building RCP packages as well as the community
NetBeans installers, and am looking at a Maven plugin wrapper.  It's
also how the Apache DEB and RPM are built.

I'm keen to look at meeting the needs of other platform applications
with it too, so I'd be curious how well it'd work for you or anyone
else building platform applications, and what it might be missing for
you?

https://github.com/apache/netbeans-nbpackage/

Am also working on a blog post / docs page for use with the platform.

Thanks and best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

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


RE: Creating a new platform application: Maven or Ant?

Posted by Joseph Huber <JH...@stanref.com.INVALID>.
I just finished doing what you are starting (moving a substantial NetBeans 8/Java 8 platform application to NetBeans 15/Java 17).  In my case, I didn't have to "start over" like you are doing.  The move was not trivial, and issues came up that required research to solve, but fortunately there were no issues that derailed the process.  All is working good now.  

I considered moving from Ant to Maven, but really found no good reason to do so.  I have customized build macros in Ant (creating installers, copy installers to download sites, auto-generating Windows DLLs with ikvm from my java support classes, etc.), and I am proficient enough in Ant to handle the build changes that come up from time to time.  I use only a couple of third party libraries in my application.  The Ant build scripts were working fine in NetBeans 15.

If you are good at Ant, don't have a lot of third party dependencies to manage, and are the primary person working on the project, stick with Ant.  A downside might be that if you have to turn this application over to someone else at some point, that person might not know Ant.

Thank You!

Joe Huber
Standard Refrigeration LLC

-----Original Message-----
From: Thomas Kellerer <sh...@gmx.net> 
Sent: Sunday, February 26, 2023 6:15 AM
To: NetBeans Mailing List <us...@netbeans.apache.org>
Subject: Creating a new platform application: Maven or Ant?

Hello,

I am trying to "migrate" an old NetBeans platform application that I created with NetBeans 8.0 about 10 years ago

I decided to create a new NetBeans platform application from scratch as there is a lot of stuff I would do differently today.

However, I am not sure if I should go for Maven or Ant as the basis for my new application.

What is the recommendation from the NetBeans team for a new platform project?

I am using Java 17 if that matters.

Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&data=05%7C01%7CJHuber%40stanref.com%7Ccf32cfda4b8548dc8f2108db17f30f93%7Cd40cfd3f9c3648f3a5f48e75dc69cdbc%7C0%7C0%7C638130104935139603%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KTY6BPe%2FY%2FSMhMpFcKmMwTenm5cxRoJmn2B9wSyiKm0%3D&reserved=0


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

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


Re: Creating a new platform application: Maven or Ant?

Posted by Mathieu Bastian <ma...@gephi.org>.
Hi Thomas,

I've had a very good experience with Maven for Gephi
<https://github.com/gephi/gephi>, which is based on the latest Netbeans
Platform. The pom files are fairly well documented so you can probably get
some inspiration.

If you run into specific issues feel free to reach out.

Mathieu

On Sun, Feb 26, 2023 at 4:04 PM Thomas Kellerer <sh...@gmx.net> wrote:

> Scott Palmer schrieb am 26.02.2023 um 15:47:
> >> I am trying to "migrate" an old NetBeans platform application that I
> created with NetBeans 8.0 about 10 years ago
> >>
> >> I decided to create a new NetBeans platform application from scratch as
> there is a lot of stuff I would do differently today.
> >>
> >> However, I am not sure if I should go for Maven or Ant as the basis for
> my new application.
> >>
> >> What is the recommendation from the NetBeans team for a new platform
> project?
> >>
> >> I am using Java 17 if that matters.
> >
> > For any Java project (my opinion, based on experience with all three
> options.):
> >
> > Prefer Maven over Ant.
> > Prefer Gradle over Maven.
> >
> > There are exceptions and how well you know each tool will certainly
> influence the order that works for you.
> >
> > I don’t think Gradle is an option for a NetBeans Platform project.  So
> Maven is the best choice in this situation.
> >
> > I don’t think there is a case where I would ever choose to create a
> > new Ant-based project these days.  It is more flexible than Maven,
> > but far more awkward to work with than Gradle.  IMO it should
> > probably be hidden as a legacy option in the New Project dialog.
>
> My initial attempt with creating a Maven RCP application was not very
> successful,
> and I did have some problems with that.
>
> Maven is fine for me (I loathe Gradle), but seeing that NetBeans itself
> still uses Ant I was wondering
> if Ant was a more stable/safe approach for a NetBeans RCP application.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

Re: Creating a new platform application: Maven or Ant?

Posted by Neil C Smith <ne...@apache.org>.
On Sun, 26 Feb 2023 at 15:04, Thomas Kellerer <sh...@gmx.net> wrote:
> Scott Palmer schrieb am 26.02.2023 um 15:47:
> > I don’t think there is a case where I would ever choose to create a
> > new Ant-based project these days.  It is more flexible than Maven,
> > but far more awkward to work with than Gradle.  IMO it should
> > probably be hidden as a legacy option in the New Project dialog.

It was deliberately moved down the list of build options in the
dialog.  For  the platform there are still some benefits.

> Maven is fine for me (I loathe Gradle)

:-)  Gradle is just Ant with slightly better syntax ...

> but seeing that NetBeans itself still uses Ant I was wondering
> if Ant was a more stable/safe approach for a NetBeans RCP application.

I would choose Maven out of preference for almost anything, but at the
moment I'm still using Ant for the platform.  Either should be stable
and safe options.  It may depend how much you want to keep to the
standard layout (my application has to hack around the platform
structure a bit) or run custom tasks.  The one other benefit of the
Ant build is the platform download, which will pick up changes in the
update centre, which are not always released via Maven.

My 2c.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

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


Re: Creating a new platform application: Maven or Ant?

Posted by Thomas Kellerer <sh...@gmx.net>.
Scott Palmer schrieb am 26.02.2023 um 15:47:
>> I am trying to "migrate" an old NetBeans platform application that I created with NetBeans 8.0 about 10 years ago
>>
>> I decided to create a new NetBeans platform application from scratch as there is a lot of stuff I would do differently today.
>>
>> However, I am not sure if I should go for Maven or Ant as the basis for my new application.
>>
>> What is the recommendation from the NetBeans team for a new platform project?
>>
>> I am using Java 17 if that matters.
>
> For any Java project (my opinion, based on experience with all three options.):
>
> Prefer Maven over Ant.
> Prefer Gradle over Maven.
>
> There are exceptions and how well you know each tool will certainly influence the order that works for you.
>
> I don’t think Gradle is an option for a NetBeans Platform project.  So Maven is the best choice in this situation.
>
> I don’t think there is a case where I would ever choose to create a
> new Ant-based project these days.  It is more flexible than Maven,
> but far more awkward to work with than Gradle.  IMO it should
> probably be hidden as a legacy option in the New Project dialog.

My initial attempt with creating a Maven RCP application was not very successful,
and I did have some problems with that.

Maven is fine for me (I loathe Gradle), but seeing that NetBeans itself still uses Ant I was wondering
if Ant was a more stable/safe approach for a NetBeans RCP application.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

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


Re: Creating a new platform application: Maven or Ant?

Posted by "Mark A. Flacy" <mf...@verizon.net.INVALID>.
There used to be a gradle plugin for NetBeans. Sent from my Galaxy
-------- Original message --------From: Scott Palmer <sw...@gmail.com> Date: 2/26/23  08:49  (GMT-06:00) To: Thomas Kellerer <sh...@gmx.net> Cc: NetBeans Mailing List <us...@netbeans.apache.org> Subject: Re: Creating a new platform application: Maven or Ant? > On Feb 26, 2023, at 7:14 AM, Thomas Kellerer <sh...@gmx.net> wrote:> > Hello,> > I am trying to "migrate" an old NetBeans platform application that I created with NetBeans 8.0 about 10 years ago> > I decided to create a new NetBeans platform application from scratch as there is a lot of stuff I would do differently today.> > However, I am not sure if I should go for Maven or Ant as the basis for my new application.> > What is the recommendation from the NetBeans team for a new platform project?> > I am using Java 17 if that matters.For any Java project (my opinion, based on experience with all three options.):Prefer Maven over Ant.Prefer Gradle over Maven.There are exceptions and how well you know each tool will certainly influence the order that works for you.I don’t think Gradle is an option for a NetBeans Platform project.  So Maven is the best choice in this situation.I don’t think there is a case where I would ever choose to create a new Ant-based project these days.  It is more flexible than Maven, but far more awkward to work with than Gradle.  IMO it should probably be hidden as a legacy option in the New Project dialog.Scott---------------------------------------------------------------------To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.orgFor additional commands, e-mail: users-help@netbeans.apache.orgFor further information about the NetBeans mailing lists, visit:https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Re: Creating a new platform application: Maven or Ant?

Posted by Scott Palmer <sw...@gmail.com>.
> On Feb 26, 2023, at 7:14 AM, Thomas Kellerer <sh...@gmx.net> wrote:
> 
> Hello,
> 
> I am trying to "migrate" an old NetBeans platform application that I created with NetBeans 8.0 about 10 years ago
> 
> I decided to create a new NetBeans platform application from scratch as there is a lot of stuff I would do differently today.
> 
> However, I am not sure if I should go for Maven or Ant as the basis for my new application.
> 
> What is the recommendation from the NetBeans team for a new platform project?
> 
> I am using Java 17 if that matters.

For any Java project (my opinion, based on experience with all three options.):

Prefer Maven over Ant.
Prefer Gradle over Maven.

There are exceptions and how well you know each tool will certainly influence the order that works for you.

I don’t think Gradle is an option for a NetBeans Platform project.  So Maven is the best choice in this situation.

I don’t think there is a case where I would ever choose to create a new Ant-based project these days.  It is more flexible than Maven, but far more awkward to work with than Gradle.  IMO it should probably be hidden as a legacy option in the New Project dialog.

Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

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