Can I do scm checkout from inside a plugin?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can I do scm checkout from inside a plugin?

Kathryn Huxtable
I know the release plugin can do it, but the source is fairly complex.

Is there an easy way?

My goal is to check out an earlier version of the artifact, copy its resources (so I'll also be running the copy-resources plugin), which produces some data as side effects, and then compare that data to the current data. I'm trying to make an incremental updater.

Obviously I can keep the earlier version around, but it would be nice not to have to depend on that.

Any advice would be appreciated.

-K
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can I do scm checkout from inside a plugin?

olamy
Hi,
Maybe will be more easy to have a look at the CheckoutMojo ?

http://svn.apache.org/repos/asf/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java

2012/6/26 Kathryn Huxtable <[hidden email]>:

> I know the release plugin can do it, but the source is fairly complex.
>
> Is there an easy way?
>
> My goal is to check out an earlier version of the artifact, copy its resources (so I'll also be running the copy-resources plugin), which produces some data as side effects, and then compare that data to the current data. I'm trying to make an incremental updater.
>
> Obviously I can keep the earlier version around, but it would be nice not to have to depend on that.
>
> Any advice would be appreciated.
>
> -K
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can I do scm checkout from inside a plugin?

Kathryn Huxtable
Thanks!

I'm also checking out the mojo-executor plugin. It looks kind of squirrelly, but it may do what I want. I'm going to need to run a plugin on the checked out code, so I guess I can't avoid either embedding Maven or forking it. (I think I'll fork.)

Part of me wonders if sticking to shell scripting for this might be easier.

-K

On Jun 26, 2012, at 8:29 AM, Olivier Lamy wrote:

> Hi,
> Maybe will be more easy to have a look at the CheckoutMojo ?
>
> http://svn.apache.org/repos/asf/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
>
> 2012/6/26 Kathryn Huxtable <[hidden email]>:
>> I know the release plugin can do it, but the source is fairly complex.
>>
>> Is there an easy way?
>>
>> My goal is to check out an earlier version of the artifact, copy its resources (so I'll also be running the copy-resources plugin), which produces some data as side effects, and then compare that data to the current data. I'm trying to make an incremental updater.
>>
>> Obviously I can keep the earlier version around, but it would be nice not to have to depend on that.
>>
>> Any advice would be appreciated.
>>
>> -K
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can I do scm checkout from inside a plugin?

olamy
2012/6/26 Kathryn Huxtable <[hidden email]>:
> Thanks!
>
> I'm also checking out the mojo-executor plugin. It looks kind of squirrelly, but it may do what I want. I'm going to need to run a plugin on the checked out code, so I guess I can't avoid either embedding Maven or forking it. (I think I'll fork.)
Probably maven-invoker (http://maven.apache.org/shared/maven-invoker/)
library can help you.
If you use maven3 maybe you can have a look at
https://github.com/jenkinsci/lib-jenkins-maven-embedder which is "not
prefect" :-) embedder.

>
> Part of me wonders if sticking to shell scripting for this might be easier.
>
> -K
>
> On Jun 26, 2012, at 8:29 AM, Olivier Lamy wrote:
>
>> Hi,
>> Maybe will be more easy to have a look at the CheckoutMojo ?
>>
>> http://svn.apache.org/repos/asf/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
>>
>> 2012/6/26 Kathryn Huxtable <[hidden email]>:
>>> I know the release plugin can do it, but the source is fairly complex.
>>>
>>> Is there an easy way?
>>>
>>> My goal is to check out an earlier version of the artifact, copy its resources (so I'll also be running the copy-resources plugin), which produces some data as side effects, and then compare that data to the current data. I'm trying to make an incremental updater.
>>>
>>> Obviously I can keep the earlier version around, but it would be nice not to have to depend on that.
>>>
>>> Any advice would be appreciated.
>>>
>>> -K
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>>
>>
>> --
>> Olivier Lamy
>> Talend: http://coders.talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can I do scm checkout from inside a plugin?

Ansgar Konermann
In reply to this post by Kathryn Huxtable
Inject a maven ScmManager into your Mojo. Checkout code is fairly simple.
Can give example code later if desired.

Sent on the go

A
Am 26.06.2012 15:26 schrieb "Kathryn Huxtable" <[hidden email]
>:

> I know the release plugin can do it, but the source is fairly complex.
>
> Is there an easy way?
>
> My goal is to check out an earlier version of the artifact, copy its
> resources (so I'll also be running the copy-resources plugin), which
> produces some data as side effects, and then compare that data to the
> current data. I'm trying to make an incremental updater.
>
> Obviously I can keep the earlier version around, but it would be nice not
> to have to depend on that.
>
> Any advice would be appreciated.
>
> -K
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can I do scm checkout from inside a plugin?

Kathryn Huxtable
In reply to this post by olamy
Thanks. I am using maven3, but I think the invoker looks simpler. If we were using Jenkins already I might think differently… -K

On Jun 26, 2012, at 11:27 AM, Olivier Lamy wrote:

> 2012/6/26 Kathryn Huxtable <[hidden email]>:
>> Thanks!
>>
>> I'm also checking out the mojo-executor plugin. It looks kind of squirrelly, but it may do what I want. I'm going to need to run a plugin on the checked out code, so I guess I can't avoid either embedding Maven or forking it. (I think I'll fork.)
> Probably maven-invoker (http://maven.apache.org/shared/maven-invoker/)
> library can help you.
> If you use maven3 maybe you can have a look at
> https://github.com/jenkinsci/lib-jenkins-maven-embedder which is "not
> prefect" :-) embedder.
>>
>> Part of me wonders if sticking to shell scripting for this might be easier.
>>
>> -K
>>
>> On Jun 26, 2012, at 8:29 AM, Olivier Lamy wrote:
>>
>>> Hi,
>>> Maybe will be more easy to have a look at the CheckoutMojo ?
>>>
>>> http://svn.apache.org/repos/asf/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
>>>
>>> 2012/6/26 Kathryn Huxtable <[hidden email]>:
>>>> I know the release plugin can do it, but the source is fairly complex.
>>>>
>>>> Is there an easy way?
>>>>
>>>> My goal is to check out an earlier version of the artifact, copy its resources (so I'll also be running the copy-resources plugin), which produces some data as side effects, and then compare that data to the current data. I'm trying to make an incremental updater.
>>>>
>>>> Obviously I can keep the earlier version around, but it would be nice not to have to depend on that.
>>>>
>>>> Any advice would be appreciated.
>>>>
>>>> -K
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>
>>>
>>>
>>> --
>>> Olivier Lamy
>>> Talend: http://coders.talend.com
>>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can I do scm checkout from inside a plugin?

Kathryn Huxtable
Okay, I have what I need. Thanks to everyone. The most useful advice (for me) was Olivier's pointer at the invoker plugin. I had never needed it and didn't really know about it. Knowing about it, I was able to find its uses in the release plugin, so I can make my use of it more robust.

-K

On Jun 26, 2012, at 1:56 PM, Kathryn Huxtable wrote:

> Thanks. I am using maven3, but I think the invoker looks simpler. If we were using Jenkins already I might think differently… -K
>
> On Jun 26, 2012, at 11:27 AM, Olivier Lamy wrote:
>
>> 2012/6/26 Kathryn Huxtable <[hidden email]>:
>>> Thanks!
>>>
>>> I'm also checking out the mojo-executor plugin. It looks kind of squirrelly, but it may do what I want. I'm going to need to run a plugin on the checked out code, so I guess I can't avoid either embedding Maven or forking it. (I think I'll fork.)
>> Probably maven-invoker (http://maven.apache.org/shared/maven-invoker/)
>> library can help you.
>> If you use maven3 maybe you can have a look at
>> https://github.com/jenkinsci/lib-jenkins-maven-embedder which is "not
>> prefect" :-) embedder.
>>>
>>> Part of me wonders if sticking to shell scripting for this might be easier.
>>>
>>> -K
>>>
>>> On Jun 26, 2012, at 8:29 AM, Olivier Lamy wrote:
>>>
>>>> Hi,
>>>> Maybe will be more easy to have a look at the CheckoutMojo ?
>>>>
>>>> http://svn.apache.org/repos/asf/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
>>>>
>>>> 2012/6/26 Kathryn Huxtable <[hidden email]>:
>>>>> I know the release plugin can do it, but the source is fairly complex.
>>>>>
>>>>> Is there an easy way?
>>>>>
>>>>> My goal is to check out an earlier version of the artifact, copy its resources (so I'll also be running the copy-resources plugin), which produces some data as side effects, and then compare that data to the current data. I'm trying to make an incremental updater.
>>>>>
>>>>> Obviously I can keep the earlier version around, but it would be nice not to have to depend on that.
>>>>>
>>>>> Any advice would be appreciated.
>>>>>
>>>>> -K
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Olivier Lamy
>>>> Talend: http://coders.talend.com
>>>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>>
>>
>> --
>> Olivier Lamy
>> Talend: http://coders.talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]