You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Matthias Bläsing <mb...@doppel-helix.eu> on 2022/01/21 15:41:02 UTC

"Java class libray" with maven (was: Re: [NOTICE] Apache NetBeans 13 release candidate 1 available for testing)

Hi Chuck,

Am Freitag, dem 21.01.2022 um 06:46 -0800 schrieb Chuck Davis:
> Am I the only one who wants to create a Java class library with
> Maven? 
> I see it can be done with Ant or Gradle but not Maven....still.

what do you mean by "Java class library"? Do you mean a JAR?

If you mean that, it is trivial:

1. Open "File" menu
2. Choose "New project"
3. Choose category "Java with Maven"
4. Choose "Java Application"
5. Enter the required info and click finished
6. You are done

A java application is just a jar, that has a "mainclass" defined in the
manifest and which is invoked when run as "java -jar <jarfile>".

Greetings

Matthias


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

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




Re: "Java class libray" with maven (was: Re: [NOTICE] Apache NetBeans 13 release candidate 1 available for testing)

Posted by Neil C Smith <ne...@apache.org>.
On Fri, 21 Jan 2022 at 16:34, Chuck Davis <cj...@gmail.com> wrote:
> I know there is a Maven template for an application but as you say that has
> a main class, etc.

I was about to say, "does it?", then realised I was running 12.6.  So
this has changed, by https://github.com/apache/netbeans/pull/3262 I
guess.  Maybe there is an argument we should have two templates in
future.

Thanks for taking this off the [NOTICE] thread btw - that was added
for a few people who complained they'd missed release info due to the
level of traffic on dev@ - would like to try and keep those threads
empty if possible.

Best wishes,

Neil

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

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




Re: "Java class libray" with maven (was: Re: [NOTICE] Apache NetBeans 13 release candidate 1 available for testing)

Posted by Chuck Davis <cj...@gmail.com>.
Hi Matthias.  I'm just being a nerd.

I know there is a Maven template for an application but as you say that has
a main class, etc.  A library is just a collection of classes used by other
classes.  It's not difficult to delete the main class but why do Ant and
Gradle get a "class library" project but not Maven?  I know it's all
syntactic sugar as they say and I can certainly make a java class library
but seems like an inconsistency (or discrimination) that Ant and Gradle get
a project type but Maven does not....

Thanks for your answer, nevertheless.

On Fri, Jan 21, 2022 at 7:41 AM Matthias Bläsing <mb...@doppel-helix.eu>
wrote:

> Hi Chuck,
>
> Am Freitag, dem 21.01.2022 um 06:46 -0800 schrieb Chuck Davis:
> > Am I the only one who wants to create a Java class library with
> > Maven?
> > I see it can be done with Ant or Gradle but not Maven....still.
>
> what do you mean by "Java class library"? Do you mean a JAR?
>
> If you mean that, it is trivial:
>
> 1. Open "File" menu
> 2. Choose "New project"
> 3. Choose category "Java with Maven"
> 4. Choose "Java Application"
> 5. Enter the required info and click finished
> 6. You are done
>
> A java application is just a jar, that has a "mainclass" defined in the
> manifest and which is invoked when run as "java -jar <jarfile>".
>
> Greetings
>
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>