On Mon, Apr 19, 2021 at 12:55 AM Wayne Gemmell | Connect < 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