To a new user, it is unexpected and the disconnect between some of the
project properties and Maven is a surprise.  I think the some users expect
more from the IDE.

I can understand the challenges of doing this in that it is like adding
another programming language where some of the syntax is in a vast
collection of independent modules.   Additionally, I think many want to
ensure the pom file is useable by other contributors who don’t use the same
IDE.

It seems like the present strategy is to help build the initial pom for a
new project and then stay out of the way.

It seems that this page
https://netbeans.apache.org/wiki/MavenBestPractices.asciidoc
, while old, documents what the IDE does and where one must work with the
Pom file.

On Wed, Feb 16, 2022 at 6:45 PM Vladimir Machat <macha...@gmail.com> wrote:

> Thanks, I know how to do it, I was just wondering why it's not done by
> Netbeans the same it is done for Ant project...
>
> On 16/02/2022 21:31, Tim de Vries wrote:
> > I have a tool which packages to executable jar with optional manifest
> attributes. I was hoping to charge $1/user/month. I don’t know if that’s
> allowed here.
> >
> > Sent from my iPhone
> >
> >> On Feb 16, 2022, at 11:55 AM, antonio<anto...@vieiro.net>  wrote:
> >>
> >> Hi,
> >>
> >> Adding the main class in MANIFEST.MF is not good enough to run a Maven
> project with "java -jar". You also want to create a "fat jar" with all the
> dependencies in it. See [1] for guidance.
> >>
> >>> Is there a reason why Netbeans doesn't do it?
> >> Here're some possible answers (of my own, doesn't mean NetBeans
> endorses them):
> >>
> >> a) I don't like my IDE to mess around with my pom.xml files but for
> very specific things (adding dependencies, for instance).
> >> b) This is something users are expected to do.
> >> c) This is project-specific. Maven based Spring-Boot projects, for
> instance, have a main class of their own. NetBeans Platform based projects
> do also have a main class of their own.
> >> d) Nobody has created a PR for this feature.
> >>
> >> Hope this helps,
> >> Antonio
> >>
> >> [1]
> >> https://www.baeldung.com/executable-jar-with-maven
> >>
> >>
> >>> El 16/2/22 a las 11:43, Vladimir Machat escribió:
> >>> Hi all,
> >>> I was just wondering, is Netbeans supposed to fill out the main
> attribute in MANIFEST.MF that goes to the jar file, when building Maven
> project?
> >>> At the moment it doesn't do it, which means that the resulting jar
> can't be executed just by
> >>> $ java -jar App.jar
> >>> I would expect Netbeans to set the main attribute when setting the
> main class either in the Project properties or when it asks you the very
> fist time you run the application in the IDE.
> >>> Is there a reason why Netbeans doesn't do it?
> >>> Thanks
> >>> Vlad
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:dev-unsubscr...@netbeans.apache.org
> >> For additional commands, e-mail:dev-h...@netbeans.apache.org
> >>
> >> For further information about the NetBeans mailing lists, visit:
> >> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:dev-unsubscr...@netbeans.apache.org
> > For additional commands, e-mail:dev-h...@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >

-- 
Sent from a mobile device. Please excuse any typos.

Reply via email to