Dne čtvrtek 17. února 2022 1:45:20 CET, Vladimir Machat napsal(a): > 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...
Improvements and contributions to https://github.com/apache/netbeans/pull/3262 welcomed! -jt > > 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<[email protected]> 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:[email protected] > >> For additional commands, e-mail:[email protected] > >> > >> For further information about the NetBeans mailing lists, visit: > >> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail:[email protected] > > For additional commands, e-mail:[email protected] > > > > For further information about the NetBeans mailing lists, visit: > > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
