You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by "Mallder, Valerie" <Va...@jhuapl.edu> on 2014/11/06 16:15:00 UTC

maven goals and what they do

Hello Everyone,

Where is the best place I should look to find out what each of the maven "goals" actually do?  I am new to 'maven' but very familiar with 'make'.  I am used to using "make install" to build my application and 'install' it into the place where my users will run it from.  But, it looks like "mvn install" does something complete different. I have noticed it is installing things in an .m2 folder in my home directory. (What the heck is this .m2 folder and why do I need it?)

So I thought I would just ask the general question where do I go to find out what all of the goals listed below actually do?

Thanks,
Val


validate,
initialize,
generate-sources,
process-sources,
generate-resources,
process-resources,
compile,
process-classes,
generate-test-sources,
process-test-sources,
generate-test-resources,
process-test-resources,
test-compile,
process-test-classes,
test,
prepare-package,
package,
pre-integration-test,
integration-test,
post-integration-test,
verify,
install,
deploy,
pre-site,
site,
post-site,
site-deploy,
pre-clean,
clean,
post-clean.

Valerie A. Mallder

New Horizons Deputy Mission System Engineer
The Johns Hopkins University/Applied Physics Laboratory
11100 Johns Hopkins Rd (MS 23-282), Laurel, MD 20723
240-228-7846 (Office) 410-504-2233 (Blackberry)


Re: maven goals and what they do

Posted by Chris Mattmann <ch...@gmail.com>.
Hey Val,

Yes, Maven itself can easily do what you need
it to do. See:

http://maven.apache.org/plugins/maven-assembly-plugin/


Also you may want to take a minute to familiarize yourself
with the Maven directory structure and layout:

http://maven.apache.org/guides/introduction/introduction-to-the-standard-di
rectory-layout.html


Also please have a look at the Maven lifecycle:

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.h
tml


Maven is a complex beast, I¹d recommend buying one of these
books to truly understand it:

http://maven.apache.org/articles.html


Cheers,
Chris


------------------------
Chris Mattmann
chris.mattmann@gmail.com




-----Original Message-----
From: "Mallder, Valerie" <Va...@jhuapl.edu>
Reply-To: <de...@oodt.apache.org>
Date: Thursday, November 6, 2014 at 8:51 AM
To: "dev@oodt.apache.org" <de...@oodt.apache.org>
Subject: RE: maven goals and what they do

>Hmm, ok. What's Puppet? Is it free? I will have to google it.....
>  
>
>Valerie A. Mallder
>New Horizons Deputy Mission System Engineer
>Johns Hopkins University/Applied Physics Laboratory
>
>
>> -----Original Message-----
>> From: Tom Barber [mailto:tom.barber@meteorite.bi]
>> Sent: Thursday, November 06, 2014 10:55 AM
>> To: dev@oodt.apache.org
>> Subject: Re: maven goals and what they do
>> 
>> I don't think there is one that ships with OODT, you could roll your
>>own using an
>> AntTask or similar, but generally speaking it's not done within Maven
>>as Maven
>> does builds and Puppet or Chef(in server world) does deployment
>>management
>> etc.
>> 
>> So, possible I'm sure, there's probably already a plugin or 3 for it,
>>but I don't think
>> its in the build by default.
>> 
>> Tom
>> 
>> On 06/11/14 15:48, Mallder, Valerie wrote:
>> > Thanks Tom, that's very helpful.  One more question. Are there any
>>goals that
>> will unzip and un-tar the distribution file into a directory you
>>specify?  Or, does that
>> step always have to be done manually?
>> >
>> > Thanks,
>> > Val
>> >
>> >
>> >
>> >
>> > Valerie A. Mallder
>> > New Horizons Deputy Mission System Engineer Johns Hopkins
>> > University/Applied Physics Laboratory
>> >
>> >
>> >> -----Original Message-----
>> >> From: Tom Barber [mailto:tom.barber@meteorite.bi]
>> >> Sent: Thursday, November 06, 2014 10:23 AM
>> >> To: dev@oodt.apache.org
>> >> Subject: Re: maven goals and what they do
>> >>
>> >> Hi Val,
>> >>
>> >> Most of the time you just need
>> >>
>> >> mvn clean install
>> >>
>> >> sometimes if you can't be bothered with the test suite
>> >>
>> >> mvn clean install -DskipTests
>> >>
>> >> is also useful.
>> >>
>> >> And if you just want to run tests you can do,
>> >>
>> >> mvn clean test
>> >>
>> >> Maven is a dependency management tool the actual compilation(much
>> >> like make
>> >> is) is passed off to javac, and as such .m2 is where all the OODT(and
>> >> any other maven projects) dependencies are stored so it can build it
>> >> again and reuse the old dependencies if they've not changed as thats
>> >> quicker than downloading them all again.
>> >>
>> >> The other goals are largely called by other processes or used for
>> >> building the old website etc, so you can ignore them.
>> >>
>> >> OODT is also a multimodule project so if you call maven from the top
>> >> level you'll build all the modules, if you are only interested in a
>> >> specific module you can also call it from within that modules
>>directory and it
>> will build that specific module.
>> >>
>> >> Hope that helps.
>> >>
>> >> Tom
>> >>
>> >>
>> >> On 06/11/14 15:15, Mallder, Valerie wrote:
>> >>> Hello Everyone,
>> >>>
>> >>> Where is the best place I should look to find out what each of the
>> >>> maven "goals" actually do?  I am new to 'maven' but very familiar
>> >>> with 'make'.  I am used to using "make install" to build my
>> >>> application and 'install' it into the place where my users will run
>> >>> it from.  But, it looks like "mvn install" does something complete
>> >>> different. I have noticed it is installing things in an .m2 folder
>>in my home
>> directory.
>> >>> (What the heck is this .m2 folder and why do I need it?)
>> >>>
>> >>> So I thought I would just ask the general question where do I go to
>> >>> find out what
>> >> all of the goals listed below actually do?
>> >>> Thanks,
>> >>> Val
>> >>>
>> >>>
>> >>> validate,
>> >>> initialize,
>> >>> generate-sources,
>> >>> process-sources,
>> >>> generate-resources,
>> >>> process-resources,
>> >>> compile,
>> >>> process-classes,
>> >>> generate-test-sources,
>> >>> process-test-sources,
>> >>> generate-test-resources,
>> >>> process-test-resources,
>> >>> test-compile,
>> >>> process-test-classes,
>> >>> test,
>> >>> prepare-package,
>> >>> package,
>> >>> pre-integration-test,
>> >>> integration-test,
>> >>> post-integration-test,
>> >>> verify,
>> >>> install,
>> >>> deploy,
>> >>> pre-site,
>> >>> site,
>> >>> post-site,
>> >>> site-deploy,
>> >>> pre-clean,
>> >>> clean,
>> >>> post-clean.
>> >>>
>> >>> Valerie A. Mallder
>> >>>
>> >>> New Horizons Deputy Mission System Engineer The Johns Hopkins
>> >>> University/Applied Physics Laboratory
>> >>> 11100 Johns Hopkins Rd (MS 23-282), Laurel, MD 20723
>> >>> 240-228-7846 (Office) 410-504-2233 (Blackberry)
>> >>>
>> >>>
>> >>
>> >> --
>> >> *Tom Barber* | Technical Director
>> >>
>> >> meteorite bi
>> >> *T:* +44 20 8133 3730
>> >> *W:* www.meteorite.bi | *Skype:* meteorite.consulting
>> >> *A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2
>> >> 7YG, UK
>> 
>> 
>> --
>> *Tom Barber* | Technical Director
>> 
>> meteorite bi
>> *T:* +44 20 8133 3730
>> *W:* www.meteorite.bi | *Skype:* meteorite.consulting
>> *A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2
>>7YG, UK



RE: maven goals and what they do

Posted by "Mallder, Valerie" <Va...@jhuapl.edu>.
Hmm, ok. What's Puppet? Is it free? I will have to google it.....
  

Valerie A. Mallder
New Horizons Deputy Mission System Engineer
Johns Hopkins University/Applied Physics Laboratory


> -----Original Message-----
> From: Tom Barber [mailto:tom.barber@meteorite.bi]
> Sent: Thursday, November 06, 2014 10:55 AM
> To: dev@oodt.apache.org
> Subject: Re: maven goals and what they do
> 
> I don't think there is one that ships with OODT, you could roll your own using an
> AntTask or similar, but generally speaking it's not done within Maven as Maven
> does builds and Puppet or Chef(in server world) does deployment management
> etc.
> 
> So, possible I'm sure, there's probably already a plugin or 3 for it, but I don't think
> its in the build by default.
> 
> Tom
> 
> On 06/11/14 15:48, Mallder, Valerie wrote:
> > Thanks Tom, that's very helpful.  One more question. Are there any goals that
> will unzip and un-tar the distribution file into a directory you specify?  Or, does that
> step always have to be done manually?
> >
> > Thanks,
> > Val
> >
> >
> >
> >
> > Valerie A. Mallder
> > New Horizons Deputy Mission System Engineer Johns Hopkins
> > University/Applied Physics Laboratory
> >
> >
> >> -----Original Message-----
> >> From: Tom Barber [mailto:tom.barber@meteorite.bi]
> >> Sent: Thursday, November 06, 2014 10:23 AM
> >> To: dev@oodt.apache.org
> >> Subject: Re: maven goals and what they do
> >>
> >> Hi Val,
> >>
> >> Most of the time you just need
> >>
> >> mvn clean install
> >>
> >> sometimes if you can't be bothered with the test suite
> >>
> >> mvn clean install -DskipTests
> >>
> >> is also useful.
> >>
> >> And if you just want to run tests you can do,
> >>
> >> mvn clean test
> >>
> >> Maven is a dependency management tool the actual compilation(much
> >> like make
> >> is) is passed off to javac, and as such .m2 is where all the OODT(and
> >> any other maven projects) dependencies are stored so it can build it
> >> again and reuse the old dependencies if they've not changed as thats
> >> quicker than downloading them all again.
> >>
> >> The other goals are largely called by other processes or used for
> >> building the old website etc, so you can ignore them.
> >>
> >> OODT is also a multimodule project so if you call maven from the top
> >> level you'll build all the modules, if you are only interested in a
> >> specific module you can also call it from within that modules directory and it
> will build that specific module.
> >>
> >> Hope that helps.
> >>
> >> Tom
> >>
> >>
> >> On 06/11/14 15:15, Mallder, Valerie wrote:
> >>> Hello Everyone,
> >>>
> >>> Where is the best place I should look to find out what each of the
> >>> maven "goals" actually do?  I am new to 'maven' but very familiar
> >>> with 'make'.  I am used to using "make install" to build my
> >>> application and 'install' it into the place where my users will run
> >>> it from.  But, it looks like "mvn install" does something complete
> >>> different. I have noticed it is installing things in an .m2 folder in my home
> directory.
> >>> (What the heck is this .m2 folder and why do I need it?)
> >>>
> >>> So I thought I would just ask the general question where do I go to
> >>> find out what
> >> all of the goals listed below actually do?
> >>> Thanks,
> >>> Val
> >>>
> >>>
> >>> validate,
> >>> initialize,
> >>> generate-sources,
> >>> process-sources,
> >>> generate-resources,
> >>> process-resources,
> >>> compile,
> >>> process-classes,
> >>> generate-test-sources,
> >>> process-test-sources,
> >>> generate-test-resources,
> >>> process-test-resources,
> >>> test-compile,
> >>> process-test-classes,
> >>> test,
> >>> prepare-package,
> >>> package,
> >>> pre-integration-test,
> >>> integration-test,
> >>> post-integration-test,
> >>> verify,
> >>> install,
> >>> deploy,
> >>> pre-site,
> >>> site,
> >>> post-site,
> >>> site-deploy,
> >>> pre-clean,
> >>> clean,
> >>> post-clean.
> >>>
> >>> Valerie A. Mallder
> >>>
> >>> New Horizons Deputy Mission System Engineer The Johns Hopkins
> >>> University/Applied Physics Laboratory
> >>> 11100 Johns Hopkins Rd (MS 23-282), Laurel, MD 20723
> >>> 240-228-7846 (Office) 410-504-2233 (Blackberry)
> >>>
> >>>
> >>
> >> --
> >> *Tom Barber* | Technical Director
> >>
> >> meteorite bi
> >> *T:* +44 20 8133 3730
> >> *W:* www.meteorite.bi | *Skype:* meteorite.consulting
> >> *A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2
> >> 7YG, UK
> 
> 
> --
> *Tom Barber* | Technical Director
> 
> meteorite bi
> *T:* +44 20 8133 3730
> *W:* www.meteorite.bi | *Skype:* meteorite.consulting
> *A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2 7YG, UK

Re: maven goals and what they do

Posted by Tom Barber <to...@meteorite.bi>.
I don't think there is one that ships with OODT, you could roll your own 
using an AntTask or similar, but generally speaking it's not done within 
Maven as Maven does builds and Puppet or Chef(in server world) does 
deployment management etc.

So, possible I'm sure, there's probably already a plugin or 3 for it, 
but I don't think its in the build by default.

Tom

On 06/11/14 15:48, Mallder, Valerie wrote:
> Thanks Tom, that's very helpful.  One more question. Are there any goals that will unzip and un-tar the distribution file into a directory you specify?  Or, does that step always have to be done manually?
>
> Thanks,
> Val
>
>
>
>
> Valerie A. Mallder
> New Horizons Deputy Mission System Engineer
> Johns Hopkins University/Applied Physics Laboratory
>
>
>> -----Original Message-----
>> From: Tom Barber [mailto:tom.barber@meteorite.bi]
>> Sent: Thursday, November 06, 2014 10:23 AM
>> To: dev@oodt.apache.org
>> Subject: Re: maven goals and what they do
>>
>> Hi Val,
>>
>> Most of the time you just need
>>
>> mvn clean install
>>
>> sometimes if you can't be bothered with the test suite
>>
>> mvn clean install -DskipTests
>>
>> is also useful.
>>
>> And if you just want to run tests you can do,
>>
>> mvn clean test
>>
>> Maven is a dependency management tool the actual compilation(much like make
>> is) is passed off to javac, and as such .m2 is where all the OODT(and any other
>> maven projects) dependencies are stored so it can build it again and reuse the old
>> dependencies if they've not changed as thats quicker than downloading them all
>> again.
>>
>> The other goals are largely called by other processes or used for building the old
>> website etc, so you can ignore them.
>>
>> OODT is also a multimodule project so if you call maven from the top level you'll
>> build all the modules, if you are only interested in a specific module you can also
>> call it from within that modules directory and it will build that specific module.
>>
>> Hope that helps.
>>
>> Tom
>>
>>
>> On 06/11/14 15:15, Mallder, Valerie wrote:
>>> Hello Everyone,
>>>
>>> Where is the best place I should look to find out what each of the
>>> maven "goals" actually do?  I am new to 'maven' but very familiar with
>>> 'make'.  I am used to using "make install" to build my application and
>>> 'install' it into the place where my users will run it from.  But, it
>>> looks like "mvn install" does something complete different. I have
>>> noticed it is installing things in an .m2 folder in my home directory.
>>> (What the heck is this .m2 folder and why do I need it?)
>>>
>>> So I thought I would just ask the general question where do I go to find out what
>> all of the goals listed below actually do?
>>> Thanks,
>>> Val
>>>
>>>
>>> validate,
>>> initialize,
>>> generate-sources,
>>> process-sources,
>>> generate-resources,
>>> process-resources,
>>> compile,
>>> process-classes,
>>> generate-test-sources,
>>> process-test-sources,
>>> generate-test-resources,
>>> process-test-resources,
>>> test-compile,
>>> process-test-classes,
>>> test,
>>> prepare-package,
>>> package,
>>> pre-integration-test,
>>> integration-test,
>>> post-integration-test,
>>> verify,
>>> install,
>>> deploy,
>>> pre-site,
>>> site,
>>> post-site,
>>> site-deploy,
>>> pre-clean,
>>> clean,
>>> post-clean.
>>>
>>> Valerie A. Mallder
>>>
>>> New Horizons Deputy Mission System Engineer The Johns Hopkins
>>> University/Applied Physics Laboratory
>>> 11100 Johns Hopkins Rd (MS 23-282), Laurel, MD 20723
>>> 240-228-7846 (Office) 410-504-2233 (Blackberry)
>>>
>>>
>>
>> --
>> *Tom Barber* | Technical Director
>>
>> meteorite bi
>> *T:* +44 20 8133 3730
>> *W:* www.meteorite.bi | *Skype:* meteorite.consulting
>> *A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2 7YG, UK


-- 
*Tom Barber* | Technical Director

meteorite bi
*T:* +44 20 8133 3730
*W:* www.meteorite.bi | *Skype:* meteorite.consulting
*A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2 7YG, UK

RE: maven goals and what they do

Posted by "Mallder, Valerie" <Va...@jhuapl.edu>.
Thanks Tom, that's very helpful.  One more question. Are there any goals that will unzip and un-tar the distribution file into a directory you specify?  Or, does that step always have to be done manually? 

Thanks,
Val




Valerie A. Mallder
New Horizons Deputy Mission System Engineer
Johns Hopkins University/Applied Physics Laboratory


> -----Original Message-----
> From: Tom Barber [mailto:tom.barber@meteorite.bi]
> Sent: Thursday, November 06, 2014 10:23 AM
> To: dev@oodt.apache.org
> Subject: Re: maven goals and what they do
> 
> Hi Val,
> 
> Most of the time you just need
> 
> mvn clean install
> 
> sometimes if you can't be bothered with the test suite
> 
> mvn clean install -DskipTests
> 
> is also useful.
> 
> And if you just want to run tests you can do,
> 
> mvn clean test
> 
> Maven is a dependency management tool the actual compilation(much like make
> is) is passed off to javac, and as such .m2 is where all the OODT(and any other
> maven projects) dependencies are stored so it can build it again and reuse the old
> dependencies if they've not changed as thats quicker than downloading them all
> again.
> 
> The other goals are largely called by other processes or used for building the old
> website etc, so you can ignore them.
> 
> OODT is also a multimodule project so if you call maven from the top level you'll
> build all the modules, if you are only interested in a specific module you can also
> call it from within that modules directory and it will build that specific module.
> 
> Hope that helps.
> 
> Tom
> 
> 
> On 06/11/14 15:15, Mallder, Valerie wrote:
> > Hello Everyone,
> >
> > Where is the best place I should look to find out what each of the
> > maven "goals" actually do?  I am new to 'maven' but very familiar with
> > 'make'.  I am used to using "make install" to build my application and
> > 'install' it into the place where my users will run it from.  But, it
> > looks like "mvn install" does something complete different. I have
> > noticed it is installing things in an .m2 folder in my home directory.
> > (What the heck is this .m2 folder and why do I need it?)
> >
> > So I thought I would just ask the general question where do I go to find out what
> all of the goals listed below actually do?
> >
> > Thanks,
> > Val
> >
> >
> > validate,
> > initialize,
> > generate-sources,
> > process-sources,
> > generate-resources,
> > process-resources,
> > compile,
> > process-classes,
> > generate-test-sources,
> > process-test-sources,
> > generate-test-resources,
> > process-test-resources,
> > test-compile,
> > process-test-classes,
> > test,
> > prepare-package,
> > package,
> > pre-integration-test,
> > integration-test,
> > post-integration-test,
> > verify,
> > install,
> > deploy,
> > pre-site,
> > site,
> > post-site,
> > site-deploy,
> > pre-clean,
> > clean,
> > post-clean.
> >
> > Valerie A. Mallder
> >
> > New Horizons Deputy Mission System Engineer The Johns Hopkins
> > University/Applied Physics Laboratory
> > 11100 Johns Hopkins Rd (MS 23-282), Laurel, MD 20723
> > 240-228-7846 (Office) 410-504-2233 (Blackberry)
> >
> >
> 
> 
> --
> *Tom Barber* | Technical Director
> 
> meteorite bi
> *T:* +44 20 8133 3730
> *W:* www.meteorite.bi | *Skype:* meteorite.consulting
> *A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2 7YG, UK

Re: maven goals and what they do

Posted by Tom Barber <to...@meteorite.bi>.
Hi Val,

Most of the time you just need

mvn clean install

sometimes if you can't be bothered with the test suite

mvn clean install -DskipTests

is also useful.

And if you just want to run tests you can do,

mvn clean test

Maven is a dependency management tool the actual compilation(much like 
make is) is passed off to javac, and as such .m2 is where all the 
OODT(and any other maven projects) dependencies are stored so it can 
build it again and reuse the old dependencies if they've not changed as 
thats quicker than downloading them all again.

The other goals are largely called by other processes or used for 
building the old website etc, so you can ignore them.

OODT is also a multimodule project so if you call maven from the top 
level you'll build all the modules, if you are only interested in a 
specific module you can also call it from within that modules directory 
and it will build that specific module.

Hope that helps.

Tom


On 06/11/14 15:15, Mallder, Valerie wrote:
> Hello Everyone,
>
> Where is the best place I should look to find out what each of the maven "goals" actually do?  I am new to 'maven' but very familiar with 'make'.  I am used to using "make install" to build my application and 'install' it into the place where my users will run it from.  But, it looks like "mvn install" does something complete different. I have noticed it is installing things in an .m2 folder in my home directory. (What the heck is this .m2 folder and why do I need it?)
>
> So I thought I would just ask the general question where do I go to find out what all of the goals listed below actually do?
>
> Thanks,
> Val
>
>
> validate,
> initialize,
> generate-sources,
> process-sources,
> generate-resources,
> process-resources,
> compile,
> process-classes,
> generate-test-sources,
> process-test-sources,
> generate-test-resources,
> process-test-resources,
> test-compile,
> process-test-classes,
> test,
> prepare-package,
> package,
> pre-integration-test,
> integration-test,
> post-integration-test,
> verify,
> install,
> deploy,
> pre-site,
> site,
> post-site,
> site-deploy,
> pre-clean,
> clean,
> post-clean.
>
> Valerie A. Mallder
>
> New Horizons Deputy Mission System Engineer
> The Johns Hopkins University/Applied Physics Laboratory
> 11100 Johns Hopkins Rd (MS 23-282), Laurel, MD 20723
> 240-228-7846 (Office) 410-504-2233 (Blackberry)
>
>


-- 
*Tom Barber* | Technical Director

meteorite bi
*T:* +44 20 8133 3730
*W:* www.meteorite.bi | *Skype:* meteorite.consulting
*A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2 7YG, UK