NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Is maven platform support as full-featured as ant based?

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
brett.ryan



Joined: 25 Feb 2011
Posts: 5
Location: Melbourne, Australia

PostPosted: Sun Mar 27, 2011 6:59 pm    Post subject: Is maven platform support as full-featured as ant based? Reply with quote

We have been looking at developing a new NetBeans platform application and wish to use maven as our build tool as now all our projects are maven based which has simplified our environment.

It does seem that NetBeans does not have the same feature set for Maven platform projects as it does for non-maven platform projects, two examples we have found:


    * No "Libraries" node in project properties to (un)select platform library dependencies.
    * In the separate "branding" project, the icons don't save when the dialog is closed.
    * Project structure is completely different, I'm not sure where things are in the Maven based projects


Can someone tell me what are the differences and if there are any other features that are available in the ant based version but aren't in the maven based one.

What is the NetBeans recommendation at the moment? Is the focus to eventually move to Maven based and deprecate the ant based?[/list]
Back to top
David Beer
Posted via mailing list.





PostPosted: Mon Mar 28, 2011 11:00 am    Post subject: [platform-dev] Re: Is maven platform support as full-featured as ant based? Reply with quote

On Sun, 2011-03-27 at 18:59 +0000, brett.ryan wrote:
Quote:
We have been looking at developing a new NetBeans platform application and wish to use maven as our build tool as now all our projects are maven based which has simplified our environment.

It does seem that NetBeans does not have the same feature set for Maven platform projects as it does for non-maven platform projects, two examples we have found:


* No "Libraries" node in project properties to (un)select platform library dependencies.
* In the separate "branding" project, the icons don't save when the dialog is closed.
* Project structure is completely different, I'm not sure where things are in the Maven based projects


Can someone tell me what are the differences and if there are any other features that are available in the ant based version but aren't in the maven based one.

What is the NetBeans recommendation at the moment? Is the focus to eventually move to Maven based and deprecate the ant based?[/list]


Hi

I use both ANT and Maven for NetBeans Platform projects mainly ANT on
older projects and Maven for newer projects. Where Maven has helped a
lot is looking for specific versionlibraries or trying to keep these
up-to-date myself.

As for the process of the Maven vs ANT structure they are two very
different build systems and Maven is not just a build system, so yes the
Maven way of working is different. In terms of branding it has been
sugested before by some users that branding is done in a separate module
as this helps with upgrading later or sending out patched or updated
NBMs (NetBeans Jar Modules). As for the way libraries work I assume you
are talking about Wrapped library Jar files. All this does in my
understanding is to package the jar file as an NBM so that NetBeans can
access it. This is exactly the same when you add the jar file as a
library to your module using Maven. It just repackages the jar file as
an NBM (As I understand it).

The structure is slightly different due to the way Maven works but not
massively the only difference I noticed or have not found a solution to
is that I have to rebuild the app each time I make a change you can get
away with just rebuilding the module and then running the app for
testing.

These are just my thoughts and experiences, I hope others can shed some
more light and information.

Hope it helps.

David
Back to top
brett.ryan



Joined: 25 Feb 2011
Posts: 5
Location: Melbourne, Australia

PostPosted: Mon Mar 28, 2011 4:06 pm    Post subject: Re: [platform-dev] Re: Is maven platform support as full-featured as ant based? Reply with quote

Thanks for your reply David, please see my comments.

David Beer wrote:

In terms of branding it has been sugested before by some users that branding is done in a separate module as this helps with upgrading later or sending out patched or updated NBMs (NetBeans Jar Modules).


Definitely agree that this should be the way this is handled, the more that is abstracted between the two the better for consistency.

David Beer wrote:

As for the way libraries work I assume you are talking about Wrapped library Jar files. All this does in my understanding is to package the jar file as an NBM so that NetBeans can access it.


No, I'm actually talking about the NetBeans Platform modules that ship with the platform, in the ANT based I can simply select/unselect the modules for the parent suite/application (Project Properties > Libraries), I have not found this same ability anywhere in the Maven based version. I can't find anywhere to also change the NetBeans platform version in Maven except for modifying netbeans.version manually in my master POM.

David Beer wrote:

The structure is slightly different due to the way Maven works but not
massively the only difference I noticed or have not found a solution to
is that I have to rebuild the app each time I make a change you can get
away with just rebuilding the module and then running the app for
testing.


In my testing so far I have to "Rebuild/Install in Development IDE" for the module otherwise the changes don't get picked up.

I've also found that in ANT based I can simply right click "Modules" in the suite/application and choose "Add New", In the Maven based project I have to first create the module remembering to put it "inside" the master project, then edit it's POM and the master POM to link the two together.
Back to top
David Beer
Posted via mailing list.





PostPosted: Mon Mar 28, 2011 11:49 pm    Post subject: [platform-dev] Re: Is maven platform support as full-featured as ant based? Reply with quote

Hi Brett Please see my comments in line.
On Mon, 2011-03-28 at 16:07 +0000, brett.ryan wrote:

Quote:
David Beer wrote:
No, I'm actually talking about the NetBeans Platform modules that ship with the platform, in the ANT based I can simply select/unselect the modules for the parent suite/application (Project Properties > Libraries), I have not found this same ability anywhere in the Maven based version. I can't find anywhere to also change the NetBeans platform version in Maven except for modifying netbeans.version manually in my master POM.

This is handled slightly differently and can probably be better
explained with the following two tutorials and information about the
nbm-plugin.

http://mojo.codehaus.org/nbm-maven-plugin/

http://platform.netbeans.org/tutorials/nbm-maven-quickstart.html

http://platform.netbeans.org/tutorials/nbm-maven-crud.html - I found
this tutorial particuarly useful when learning how Maven acts with the
netbeans libraries.

Quote:

David Beer wrote:
Quote:

The structure is slightly different due to the way Maven works but not
massively the only difference I noticed or have not found a solution to
is that I have to rebuild the app each time I make a change you can get
away with just rebuilding the module and then running the app for
testing.



In my testing so far I have to "Rebuild/Install in Development IDE" for the module otherwise the changes don't get picked up.

I have found that the process differs ever so slightly. You just need to
do a local deploy and changes should be picked up. If the application
you are developing is running then this is different but the debug
option works just the same as with ANT based projects.

Quote:
I've also found that in ANT based I can simply right click "Modules" in the suite/application and choose "Add New", In the Maven based project I have to first create the module remembering to put it "inside" the master project, then edit it's POM and the master POM to link the two together.
Yes having to create the module with out being able to right click is
annoying. But I never had to link the two POM files this was all done
when I created the module all I had to do was it as a dependency to the
NB Application module. So that it gor built into the end app.

I suggest you have a look at some of the maven tutorials with the
platform. I am happy to answer your queries where I can, but I have
limited experience on the maven side at the moment.

Hope this helps.

David
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo