Re: Can I alter packaging with Maven?

2014-09-30 Thread Manfred Moser
Thank you Stephen for that note. You just made my day and gave me a good laugh. 
Good luck with teaching KK ;-) 

Stephen Connolly wrote on 30.09.2014 11:03:

> Of course one of my long term goals is to teach KK how to use Maven... He
> keeps going to maven expecting a fight... And lo he gets one.
> 
> I keep trying to unwind his battles but every time I unwind one he's
> started two more...
> 
> In short, do not use the way Jenkins abuses maven as a way to learn how to
> use maven...
> 
> (Aside: KK's lack of full grök of maven explains *why* the jenkins maven
> (aka evil) job type is so evil)
> 
> On Tuesday, 30 September 2014, Les Hartzman  wrote:
> 
>> Thanks Anders. I'll take a look at Jenkins. Sounds like an interesting
>> learning experience.
>>
>> Les
>>
>> On Tue, Sep 30, 2014 at 2:33 AM, Anders Hammar > > wrote:
>>
>> > It is possible.
>> > One way is to use a generic packaging plugin like the
>> > maven-assembly-plugin. If that doesn't fit your desires, or you want a
>> > "nicer solution", writting your own plugin is a different way. For
>> example,
>> > have a look at the Android Maven Plugin which creates android archives.
>> >
>> > That being said, the web app you're talking about should be a standard
>> war
>> > projekt (which uses the maven-war-plugin to produce the war archive). The
>> > desktop app could possibly be a standard jar project. So I don't think
>> you
>> > need any special packaging plugins, but your question is rather how to
>> > handle these two flavors of your application. Something that you should
>> try
>> > to solve, as it will significantly simplify things, is to have only one
>> > package/archive. Have a look at how, for example, the Jenkins projekt has
>> > solved this. They produce a war file that is possible to deploy to a web
>> > container (web app) as well as start from command line (application).
>> When
>> > looking at that topic you're in pure Java land and shouldn't worry about
>> > Maven.
>> > If you need different config files it could be tricky to solve this way
>> > though.
>> >
>> > /Anders
>> >
>> > On Mon, Sep 29, 2014 at 7:17 PM, Les Hartzman > > wrote:
>> >
>> > > Hi,
>> > >
>> > > I'm a fairly basic maven user and would like to know if it is possible
>> to
>> > > have maven support multiple type of packaging or if I need to look at a
>> > > different mechanism.
>> > >
>> > > What I want to do is to build a JavaFX application that depending on
>> how
>> > it
>> > > is packaged is either a desktop app or a web app.
>> > >
>> > > There would potentially be some different configuration files that
>> would
>> > > pertain to the different packaging options.
>> > >
>> > > Can I use maven in this way or does someone know of another means of
>> > > accomplishing the same thing?
>> > >
>> > > Thanks.
>> > >
>> > > Les
>> > >
>> >
>>
> 
> 
> -- 
> Sent from my phone
> 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Can I alter packaging with Maven?

2014-09-30 Thread Laird Nelson
On Tue, Sep 30, 2014 at 11:03 AM, Stephen Connolly <
stephen.alan.conno...@gmail.com> wrote:

> In short, do not use the way Jenkins abuses maven as a way to learn how to
> use maven...
>

Is there a laundry list of abuses somewhere?  I've always been made faintly
queasy by the Jenkins Maven job but it sounds like you have a good
collection of evils it is perpetrating.  Where can I read about those evils?

Best,
Laird

-- 
http://about.me/lairdnelson


Re: Can I alter packaging with Maven?

2014-09-30 Thread Anders Hammar
I was only referring to Jenkins as to look at how a war file could be used
both as a "normal" war file being installed in a web container as well as a
jar file (with a war extension) to be used as a standalone application.
Look at it purely from a Java perspective and not how Maven might be abused
to accomplish it.
When you know what you want to end up with, then we can help you accomplish
that with Maven.

/Anders

On Tue, Sep 30, 2014 at 8:03 PM, Stephen Connolly <
stephen.alan.conno...@gmail.com> wrote:

> Of course one of my long term goals is to teach KK how to use Maven... He
> keeps going to maven expecting a fight... And lo he gets one.
>
> I keep trying to unwind his battles but every time I unwind one he's
> started two more...
>
> In short, do not use the way Jenkins abuses maven as a way to learn how to
> use maven...
>
> (Aside: KK's lack of full grök of maven explains *why* the jenkins maven
> (aka evil) job type is so evil)
>
> On Tuesday, 30 September 2014, Les Hartzman  wrote:
>
> > Thanks Anders. I'll take a look at Jenkins. Sounds like an interesting
> > learning experience.
> >
> > Les
> >
> > On Tue, Sep 30, 2014 at 2:33 AM, Anders Hammar  > > wrote:
> >
> > > It is possible.
> > > One way is to use a generic packaging plugin like the
> > > maven-assembly-plugin. If that doesn't fit your desires, or you want a
> > > "nicer solution", writting your own plugin is a different way. For
> > example,
> > > have a look at the Android Maven Plugin which creates android archives.
> > >
> > > That being said, the web app you're talking about should be a standard
> > war
> > > projekt (which uses the maven-war-plugin to produce the war archive).
> The
> > > desktop app could possibly be a standard jar project. So I don't think
> > you
> > > need any special packaging plugins, but your question is rather how to
> > > handle these two flavors of your application. Something that you should
> > try
> > > to solve, as it will significantly simplify things, is to have only one
> > > package/archive. Have a look at how, for example, the Jenkins projekt
> has
> > > solved this. They produce a war file that is possible to deploy to a
> web
> > > container (web app) as well as start from command line (application).
> > When
> > > looking at that topic you're in pure Java land and shouldn't worry
> about
> > > Maven.
> > > If you need different config files it could be tricky to solve this way
> > > though.
> > >
> > > /Anders
> > >
> > > On Mon, Sep 29, 2014 at 7:17 PM, Les Hartzman  > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I'm a fairly basic maven user and would like to know if it is
> possible
> > to
> > > > have maven support multiple type of packaging or if I need to look
> at a
> > > > different mechanism.
> > > >
> > > > What I want to do is to build a JavaFX application that depending on
> > how
> > > it
> > > > is packaged is either a desktop app or a web app.
> > > >
> > > > There would potentially be some different configuration files that
> > would
> > > > pertain to the different packaging options.
> > > >
> > > > Can I use maven in this way or does someone know of another means of
> > > > accomplishing the same thing?
> > > >
> > > > Thanks.
> > > >
> > > > Les
> > > >
> > >
> >
>
>
> --
> Sent from my phone
>


Re: Can I alter packaging with Maven?

2014-09-30 Thread Stephen Connolly
Of course one of my long term goals is to teach KK how to use Maven... He
keeps going to maven expecting a fight... And lo he gets one.

I keep trying to unwind his battles but every time I unwind one he's
started two more...

In short, do not use the way Jenkins abuses maven as a way to learn how to
use maven...

(Aside: KK's lack of full grök of maven explains *why* the jenkins maven
(aka evil) job type is so evil)

On Tuesday, 30 September 2014, Les Hartzman  wrote:

> Thanks Anders. I'll take a look at Jenkins. Sounds like an interesting
> learning experience.
>
> Les
>
> On Tue, Sep 30, 2014 at 2:33 AM, Anders Hammar  > wrote:
>
> > It is possible.
> > One way is to use a generic packaging plugin like the
> > maven-assembly-plugin. If that doesn't fit your desires, or you want a
> > "nicer solution", writting your own plugin is a different way. For
> example,
> > have a look at the Android Maven Plugin which creates android archives.
> >
> > That being said, the web app you're talking about should be a standard
> war
> > projekt (which uses the maven-war-plugin to produce the war archive). The
> > desktop app could possibly be a standard jar project. So I don't think
> you
> > need any special packaging plugins, but your question is rather how to
> > handle these two flavors of your application. Something that you should
> try
> > to solve, as it will significantly simplify things, is to have only one
> > package/archive. Have a look at how, for example, the Jenkins projekt has
> > solved this. They produce a war file that is possible to deploy to a web
> > container (web app) as well as start from command line (application).
> When
> > looking at that topic you're in pure Java land and shouldn't worry about
> > Maven.
> > If you need different config files it could be tricky to solve this way
> > though.
> >
> > /Anders
> >
> > On Mon, Sep 29, 2014 at 7:17 PM, Les Hartzman  > wrote:
> >
> > > Hi,
> > >
> > > I'm a fairly basic maven user and would like to know if it is possible
> to
> > > have maven support multiple type of packaging or if I need to look at a
> > > different mechanism.
> > >
> > > What I want to do is to build a JavaFX application that depending on
> how
> > it
> > > is packaged is either a desktop app or a web app.
> > >
> > > There would potentially be some different configuration files that
> would
> > > pertain to the different packaging options.
> > >
> > > Can I use maven in this way or does someone know of another means of
> > > accomplishing the same thing?
> > >
> > > Thanks.
> > >
> > > Les
> > >
> >
>


-- 
Sent from my phone


Re: Can I alter packaging with Maven?

2014-09-30 Thread Les Hartzman
Cute :-)

I was thinking about this as well. I'm dealing with people that don't know
what maven is (or spring or svn or git ...), so I'm looking for what
options I can present.

On Tue, Sep 30, 2014 at 2:38 AM, Stephen Connolly <
stephen.alan.conno...@gmail.com> wrote:

> In general, if you are building different things, you should have multiple
> modules.
>
> Do not fear having more than one module.
>
> The common code goes in a common module
>
> Then the other two modules build the desktop app and the web app with a
> dependency on the common module.
>
> To paraphrase a movie title:
>
> > Dr. Mavenlove or: How I Learned to Stop Worrying and Love the Modules
>
> modules are your friend
>
> On 30 September 2014 10:33, Anders Hammar  wrote:
>
> > It is possible.
> > One way is to use a generic packaging plugin like the
> > maven-assembly-plugin. If that doesn't fit your desires, or you want a
> > "nicer solution", writting your own plugin is a different way. For
> example,
> > have a look at the Android Maven Plugin which creates android archives.
> >
> > That being said, the web app you're talking about should be a standard
> war
> > projekt (which uses the maven-war-plugin to produce the war archive). The
> > desktop app could possibly be a standard jar project. So I don't think
> you
> > need any special packaging plugins, but your question is rather how to
> > handle these two flavors of your application. Something that you should
> try
> > to solve, as it will significantly simplify things, is to have only one
> > package/archive. Have a look at how, for example, the Jenkins projekt has
> > solved this. They produce a war file that is possible to deploy to a web
> > container (web app) as well as start from command line (application).
> When
> > looking at that topic you're in pure Java land and shouldn't worry about
> > Maven.
> > If you need different config files it could be tricky to solve this way
> > though.
> >
> > /Anders
> >
> > On Mon, Sep 29, 2014 at 7:17 PM, Les Hartzman 
> wrote:
> >
> > > Hi,
> > >
> > > I'm a fairly basic maven user and would like to know if it is possible
> to
> > > have maven support multiple type of packaging or if I need to look at a
> > > different mechanism.
> > >
> > > What I want to do is to build a JavaFX application that depending on
> how
> > it
> > > is packaged is either a desktop app or a web app.
> > >
> > > There would potentially be some different configuration files that
> would
> > > pertain to the different packaging options.
> > >
> > > Can I use maven in this way or does someone know of another means of
> > > accomplishing the same thing?
> > >
> > > Thanks.
> > >
> > > Les
> > >
> >
>


Re: Can I alter packaging with Maven?

2014-09-30 Thread Les Hartzman
Thanks Anders. I'll take a look at Jenkins. Sounds like an interesting
learning experience.

Les

On Tue, Sep 30, 2014 at 2:33 AM, Anders Hammar  wrote:

> It is possible.
> One way is to use a generic packaging plugin like the
> maven-assembly-plugin. If that doesn't fit your desires, or you want a
> "nicer solution", writting your own plugin is a different way. For example,
> have a look at the Android Maven Plugin which creates android archives.
>
> That being said, the web app you're talking about should be a standard war
> projekt (which uses the maven-war-plugin to produce the war archive). The
> desktop app could possibly be a standard jar project. So I don't think you
> need any special packaging plugins, but your question is rather how to
> handle these two flavors of your application. Something that you should try
> to solve, as it will significantly simplify things, is to have only one
> package/archive. Have a look at how, for example, the Jenkins projekt has
> solved this. They produce a war file that is possible to deploy to a web
> container (web app) as well as start from command line (application). When
> looking at that topic you're in pure Java land and shouldn't worry about
> Maven.
> If you need different config files it could be tricky to solve this way
> though.
>
> /Anders
>
> On Mon, Sep 29, 2014 at 7:17 PM, Les Hartzman  wrote:
>
> > Hi,
> >
> > I'm a fairly basic maven user and would like to know if it is possible to
> > have maven support multiple type of packaging or if I need to look at a
> > different mechanism.
> >
> > What I want to do is to build a JavaFX application that depending on how
> it
> > is packaged is either a desktop app or a web app.
> >
> > There would potentially be some different configuration files that would
> > pertain to the different packaging options.
> >
> > Can I use maven in this way or does someone know of another means of
> > accomplishing the same thing?
> >
> > Thanks.
> >
> > Les
> >
>


Re: Can I alter packaging with Maven?

2014-09-30 Thread Tamás Cservenák
... just don't end up as maj. Kong
https://www.youtube.com/watch?v=JlSQAZEp3PA

On Tue, Sep 30, 2014 at 11:38 AM, Stephen Connolly <
stephen.alan.conno...@gmail.com> wrote:

> In general, if you are building different things, you should have multiple
> modules.
>
> Do not fear having more than one module.
>
> The common code goes in a common module
>
> Then the other two modules build the desktop app and the web app with a
> dependency on the common module.
>
> To paraphrase a movie title:
>
> > Dr. Mavenlove or: How I Learned to Stop Worrying and Love the Modules
>
> modules are your friend
>
> On 30 September 2014 10:33, Anders Hammar  wrote:
>
> > It is possible.
> > One way is to use a generic packaging plugin like the
> > maven-assembly-plugin. If that doesn't fit your desires, or you want a
> > "nicer solution", writting your own plugin is a different way. For
> example,
> > have a look at the Android Maven Plugin which creates android archives.
> >
> > That being said, the web app you're talking about should be a standard
> war
> > projekt (which uses the maven-war-plugin to produce the war archive). The
> > desktop app could possibly be a standard jar project. So I don't think
> you
> > need any special packaging plugins, but your question is rather how to
> > handle these two flavors of your application. Something that you should
> try
> > to solve, as it will significantly simplify things, is to have only one
> > package/archive. Have a look at how, for example, the Jenkins projekt has
> > solved this. They produce a war file that is possible to deploy to a web
> > container (web app) as well as start from command line (application).
> When
> > looking at that topic you're in pure Java land and shouldn't worry about
> > Maven.
> > If you need different config files it could be tricky to solve this way
> > though.
> >
> > /Anders
> >
> > On Mon, Sep 29, 2014 at 7:17 PM, Les Hartzman 
> wrote:
> >
> > > Hi,
> > >
> > > I'm a fairly basic maven user and would like to know if it is possible
> to
> > > have maven support multiple type of packaging or if I need to look at a
> > > different mechanism.
> > >
> > > What I want to do is to build a JavaFX application that depending on
> how
> > it
> > > is packaged is either a desktop app or a web app.
> > >
> > > There would potentially be some different configuration files that
> would
> > > pertain to the different packaging options.
> > >
> > > Can I use maven in this way or does someone know of another means of
> > > accomplishing the same thing?
> > >
> > > Thanks.
> > >
> > > Les
> > >
> >
>


Re: Can I alter packaging with Maven?

2014-09-30 Thread Stephen Connolly
In general, if you are building different things, you should have multiple
modules.

Do not fear having more than one module.

The common code goes in a common module

Then the other two modules build the desktop app and the web app with a
dependency on the common module.

To paraphrase a movie title:

> Dr. Mavenlove or: How I Learned to Stop Worrying and Love the Modules

modules are your friend

On 30 September 2014 10:33, Anders Hammar  wrote:

> It is possible.
> One way is to use a generic packaging plugin like the
> maven-assembly-plugin. If that doesn't fit your desires, or you want a
> "nicer solution", writting your own plugin is a different way. For example,
> have a look at the Android Maven Plugin which creates android archives.
>
> That being said, the web app you're talking about should be a standard war
> projekt (which uses the maven-war-plugin to produce the war archive). The
> desktop app could possibly be a standard jar project. So I don't think you
> need any special packaging plugins, but your question is rather how to
> handle these two flavors of your application. Something that you should try
> to solve, as it will significantly simplify things, is to have only one
> package/archive. Have a look at how, for example, the Jenkins projekt has
> solved this. They produce a war file that is possible to deploy to a web
> container (web app) as well as start from command line (application). When
> looking at that topic you're in pure Java land and shouldn't worry about
> Maven.
> If you need different config files it could be tricky to solve this way
> though.
>
> /Anders
>
> On Mon, Sep 29, 2014 at 7:17 PM, Les Hartzman  wrote:
>
> > Hi,
> >
> > I'm a fairly basic maven user and would like to know if it is possible to
> > have maven support multiple type of packaging or if I need to look at a
> > different mechanism.
> >
> > What I want to do is to build a JavaFX application that depending on how
> it
> > is packaged is either a desktop app or a web app.
> >
> > There would potentially be some different configuration files that would
> > pertain to the different packaging options.
> >
> > Can I use maven in this way or does someone know of another means of
> > accomplishing the same thing?
> >
> > Thanks.
> >
> > Les
> >
>


Re: Can I alter packaging with Maven?

2014-09-30 Thread Anders Hammar
It is possible.
One way is to use a generic packaging plugin like the
maven-assembly-plugin. If that doesn't fit your desires, or you want a
"nicer solution", writting your own plugin is a different way. For example,
have a look at the Android Maven Plugin which creates android archives.

That being said, the web app you're talking about should be a standard war
projekt (which uses the maven-war-plugin to produce the war archive). The
desktop app could possibly be a standard jar project. So I don't think you
need any special packaging plugins, but your question is rather how to
handle these two flavors of your application. Something that you should try
to solve, as it will significantly simplify things, is to have only one
package/archive. Have a look at how, for example, the Jenkins projekt has
solved this. They produce a war file that is possible to deploy to a web
container (web app) as well as start from command line (application). When
looking at that topic you're in pure Java land and shouldn't worry about
Maven.
If you need different config files it could be tricky to solve this way
though.

/Anders

On Mon, Sep 29, 2014 at 7:17 PM, Les Hartzman  wrote:

> Hi,
>
> I'm a fairly basic maven user and would like to know if it is possible to
> have maven support multiple type of packaging or if I need to look at a
> different mechanism.
>
> What I want to do is to build a JavaFX application that depending on how it
> is packaged is either a desktop app or a web app.
>
> There would potentially be some different configuration files that would
> pertain to the different packaging options.
>
> Can I use maven in this way or does someone know of another means of
> accomplishing the same thing?
>
> Thanks.
>
> Les
>