Firstly, when someone replies in "bottom posting" style, ie with text
beneath the original then do not reply with your text at the top. This
makes the email very hard to read - and is just rude.

I will put my reply at top here because it is now the "least bad" solution..

In maven, compiling always runs before jar. To be precise, the compile
plugin (maven-compile-plugin) is attached to an earlier phase  than the
jar plugin (maven-jar-plugin). So there is nothing to do here; maven has
this already set up.

When you run maven, you just tell it what phase you want to run, eg
   mvn compile (runs all phases up to the compile phase)
or
  mvn test (runs all phases up to the test phase)
or
  mvn package (runs all phases up to the package phase)


Please read the "introduction to maven" pages on the maven website.

Regards,
Simon

san84 schrieb:
> consider  ,
> <target name="jar" depends="compile">
> how can we achieve the same  using maven.
> wil u please explain with examples
> plz
>
>
> [EMAIL PROTECTED] wrote:
>   
>> san84 schrieb:
>>     
>>> hi all,
>>> how can i define a goal which depends on other goal in my maven.xml
>>> in ant we can do it as follow like 
>>>
>>> ............
>>> ............
>>> blabla
>>> ...................
>>> <target name="a" depends ="b"> 
>>>
>>> ............
>>> ............
>>> blabla
>>> ...................
>>> please let me know 
>>>
>>>
>>>   
>>>       
>> What is the actual problem you are trying to solve? In other words, what
>> do "a" and "b" do, and why does b need to run first?
>>
>> Maven has this concept of "phases" that it runs through in order, with
>> zero or more plugins attached to each phase. So to do something before
>> some other thing, the plugins are bound to the appropriate phases. But
>> the stuff which is set up by default covers almost all cases already...
>>
>> Regards, Simon
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to