You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan Tran <da...@gmail.com> on 2012/09/27 17:35:37 UTC

Ability to use latest plugin snapshot from maven 3 command line

Hello

Back in Maven 2, when executing  a plugin goal from command line,
Maven always tries to look for latest version and its snapshot

In Maven 3, this capability disappear, Maven only looks for latest
released version.

Would it possible to turn it on from command line?

I fully understand the benefit of predictability. However, it becomes
very inconvenient to cut the plugin release while still testing.
and we cannt use maven2 because the plugin itself uses maven 3 api ( ie aether )

Is there already a request for this?

Big thanks

-D

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


Re: Ability to use latest plugin snapshot from maven 3 command line

Posted by Dan Tran <da...@gmail.com>.
I was hoping  like 'mvn -another-flag myplugin:goal'

I am surely understand the long name, for those ppl dont know too much
about maven will resist to use. but that is another story

Thank you

-D

On Thu, Sep 27, 2012 at 3:31 PM, Jörg Schaible <jo...@gmx.de> wrote:
> Dan Tran wrote:
>
>> hi Jörg
>>
>> The problem here is I run my plugin from command line, no pom.
>
> Then all you can do is to follow Roy's example.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Ability to use latest plugin snapshot from maven 3 command line

Posted by Jörg Schaible <jo...@gmx.de>.
Dan Tran wrote:

> hi Jörg
> 
> The problem here is I run my plugin from command line, no pom.

Then all you can do is to follow Roy's example.

- Jörg


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


Re: Ability to use latest plugin snapshot from maven 3 command line

Posted by Dan Tran <da...@gmail.com>.
hi Jörg

The problem here is I run my plugin from command line, no pom.

-D

On Thu, Sep 27, 2012 at 9:53 AM, Jörg Schaible <jo...@gmx.de> wrote:
> Hi Dan,
>
> Dan Tran wrote:
>
>> Hello
>>
>> Back in Maven 2, when executing  a plugin goal from command line,
>> Maven always tries to look for latest version and its snapshot
>>
>> In Maven 3, this capability disappear, Maven only looks for latest
>> released version.
>>
>> Would it possible to turn it on from command line?
>>
>> I fully understand the benefit of predictability. However, it becomes
>> very inconvenient to cut the plugin release while still testing.
>> and we cannt use maven2 because the plugin itself uses maven 3 api ( ie
>> aether )
>>
>> Is there already a request for this?
>
> AFAICS this has nothing to do with M2/M3, but early M2 versions simply did
> not pin-point the versions of the plugins they used. For latest releases of
> M2 (and IIRC all releases of M3) this policy have changed, and you will have
> to declare the version of a plugin explicitly in your POMs, if you want to
> use a different version than the one that is declared internally.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Ability to use latest plugin snapshot from maven 3 command line

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Dan,

Dan Tran wrote:

> Hello
> 
> Back in Maven 2, when executing  a plugin goal from command line,
> Maven always tries to look for latest version and its snapshot
> 
> In Maven 3, this capability disappear, Maven only looks for latest
> released version.
> 
> Would it possible to turn it on from command line?
> 
> I fully understand the benefit of predictability. However, it becomes
> very inconvenient to cut the plugin release while still testing.
> and we cannt use maven2 because the plugin itself uses maven 3 api ( ie
> aether )
> 
> Is there already a request for this?

AFAICS this has nothing to do with M2/M3, but early M2 versions simply did 
not pin-point the versions of the plugins they used. For latest releases of 
M2 (and IIRC all releases of M3) this policy have changed, and you will have 
to declare the version of a plugin explicitly in your POMs, if you want to 
use a different version than the one that is declared internally.

- Jörg


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


Re: Ability to use latest plugin snapshot from maven 3 command line

Posted by Dan Tran <da...@gmail.com>.
Thanks for the pointer?  are you talking about plugin registry?  It
seems this feature is not recommended ( i have not dig deep into it
yet )

btw, specify full plugin is not desirable ( ie mvn
groupId:artifactId:version:goal )

more suggestion is greatly appreciated.

-D

On Thu, Sep 27, 2012 at 9:17 AM, Lyons, Roy <Ro...@cmegroup.com> wrote:
> Extremely easy fix for that:
>
> http://maven.apache.org/guides/introduction/introduction-to-plugin-resoluti
> on.html
>
> -- snip --
>
> For clarity, the following are the three ways to reference a mojo
> from the command line. These will all result in the clean mojo of the
> maven-clean-plugin being invoked:
>   mvn org.apache.maven.plugins:maven-clean-plugin:2.0:clean
>   mvn org.apache.maven.plugins:maven-clean-plugin:clean
>   mvn clean:clean
>
>
>
>
> -- /snip --
>
> So just reference your snapshot plugin with:
>  mvn <groupId>:<artifactId>:<yourVersionIncluding-SNAPSHOT>:<goal>
>
> That's it.
>
>
>
>
> On 9/27/12 10:35 AM, "Dan Tran" <da...@gmail.com> wrote:
>
>>Hello
>>
>>Back in Maven 2, when executing  a plugin goal from command line,
>>Maven always tries to look for latest version and its snapshot
>>
>>In Maven 3, this capability disappear, Maven only looks for latest
>>released version.
>>
>>Would it possible to turn it on from command line?
>>
>>I fully understand the benefit of predictability. However, it becomes
>>very inconvenient to cut the plugin release while still testing.
>>and we cannt use maven2 because the plugin itself uses maven 3 api ( ie
>>aether )
>>
>>Is there already a request for this?
>>
>>Big thanks
>>
>>-D
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Ability to use latest plugin snapshot from maven 3 command line

Posted by "Lyons, Roy" <Ro...@cmegroup.com>.
Extremely easy fix for that:

http://maven.apache.org/guides/introduction/introduction-to-plugin-resoluti
on.html

-- snip --

For clarity, the following are the three ways to reference a mojo
from the command line. These will all result in the clean mojo of the
maven-clean-plugin being invoked:
  mvn org.apache.maven.plugins:maven-clean-plugin:2.0:clean
  mvn org.apache.maven.plugins:maven-clean-plugin:clean
  mvn clean:clean




-- /snip --

So just reference your snapshot plugin with:
 mvn <groupId>:<artifactId>:<yourVersionIncluding-SNAPSHOT>:<goal>

That's it.




On 9/27/12 10:35 AM, "Dan Tran" <da...@gmail.com> wrote:

>Hello
>
>Back in Maven 2, when executing  a plugin goal from command line,
>Maven always tries to look for latest version and its snapshot
>
>In Maven 3, this capability disappear, Maven only looks for latest
>released version.
>
>Would it possible to turn it on from command line?
>
>I fully understand the benefit of predictability. However, it becomes
>very inconvenient to cut the plugin release while still testing.
>and we cannt use maven2 because the plugin itself uses maven 3 api ( ie
>aether )
>
>Is there already a request for this?
>
>Big thanks
>
>-D
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>


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