Mocking a repository, sort of

Mocking a repository, sort of

There's a jira claiming that the 'don't update snapshots' flag isn't
working. I thought to build a real test case; I wondered if we have
anything in the way of a precedent. I need to construct a repo that
claims to have a very new snapshot so that Maven will be tempted to
download it. I can think of a way to set this up, but i didn't want to
repeat history.

> There's a jira claiming that the 'don't update snapshots' flag isn't
> working. I thought to build a real test case; I wondered if we have
> anything in the way of a precedent. I need to construct a repo that
> claims to have a very new snapshot so that Maven will be tempted to
> download it. I can think of a way to set this up, but i didn't want to
> repeat history.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]> For additional commands, e-mail: [hidden email]>
>

Re: Mocking a repository, sort of

> I have been working on the mock-repository-maven-plugin over at
> mojo... but it's a side-project of one of my side-projects'
> side-projects...
>
> I shall be getting back at some time in the near future.
>
> I would do something like a file:/// based repo for now until I can
> get you the mock-repo plugin
>
> -Stephen
>
> On 27 June 2011 13:24, Benson Margulies <[hidden email]> wrote:
>> There's a jira claiming that the 'don't update snapshots' flag isn't
>> working. I thought to build a real test case; I wondered if we have
>> anything in the way of a precedent. I need to construct a repo that
>> claims to have a very new snapshot so that Maven will be tempted to
>> download it. I can think of a way to set this up, but i didn't want to
>> repeat history.
>>
>> ---------------------------------------------------------------------
>> 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]>
>

Re: Mocking a repository, sort of

> I'm checking into whether archiva can be launched embeddedly.
>
> On Mon, Jun 27, 2011 at 8:36 AM, Stephen Connolly
> <[hidden email]> wrote:
>> I have been working on the mock-repository-maven-plugin over at
>> mojo... but it's a side-project of one of my side-projects'
>> side-projects...
>>
>> I shall be getting back at some time in the near future.
>>
>> I would do something like a file:/// based repo for now until I can
>> get you the mock-repo plugin
>>
>> -Stephen
>>
>> On 27 June 2011 13:24, Benson Margulies <[hidden email]> wrote:
>>> There's a jira claiming that the 'don't update snapshots' flag isn't
>>> working. I thought to build a real test case; I wondered if we have
>>> anything in the way of a precedent. I need to construct a repo that
>>> claims to have a very new snapshot so that Maven will be tempted to
>>> download it. I can think of a way to set this up, but i didn't want to
>>> repeat history.
>>>
>>> ---------------------------------------------------------------------
>>> 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]>
>

> Ugh! very heavyweight.... file:/// is usually sufficient
>
>
> On 27 June 2011 13:55, Benson Margulies <[hidden email]> wrote:
>> I'm checking into whether archiva can be launched embeddedly.
>>
>> On Mon, Jun 27, 2011 at 8:36 AM, Stephen Connolly
>> <[hidden email]> wrote:
>>> I have been working on the mock-repository-maven-plugin over at
>>> mojo... but it's a side-project of one of my side-projects'
>>> side-projects...
>>>
>>> I shall be getting back at some time in the near future.
>>>
>>> I would do something like a file:/// based repo for now until I can
>>> get you the mock-repo plugin
>>>
>>> -Stephen
>>>
>>> On 27 June 2011 13:24, Benson Margulies <[hidden email]> wrote:
>>>> There's a jira claiming that the 'don't update snapshots' flag isn't
>>>> working. I thought to build a real test case; I wondered if we have
>>>> anything in the way of a precedent. I need to construct a repo that
>>>> claims to have a very new snapshot so that Maven will be tempted to
>>>> download it. I can think of a way to set this up, but i didn't want to
>>>> repeat history.
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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]>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]> For additional commands, e-mail: [hidden email]>
>

Re: Mocking a repository, sort of

On Mon, Jun 27, 2011 at 9:44 AM, Benson Margulies <[hidden email]> wrote:
> OK, bear of little brain time here. If I use install:install-file on a
> file URL, I can turn around after that and use the resulting thing as
> a <repository>?

No, you'd want deploy:deploy-file, however I wouldn't try that with a
snapshot, I'm not sure it would get the timestamped snapshot filename
and metadata quite right, and in any case it isn't going to test what
a user would be reporting.

I would set up project A that uses dependency B. In B, configure
distributionManagement to file://path/to/remote/repo . When you
deploy that snapshot, use a separate local repository so you don't
step on the one you're using with A to test the snapshot download.

Now build A normally, and it should retrieve the snapshot. Then
deploy a new snapshot of B (again using the separate local repo.)

Build A using whatever setting is supposed to NOT retrieve snapshots,
and see if it does.

> I'm checking into whether archiva can be launched embeddedly.
>
> On Mon, Jun 27, 2011 at 8:36 AM, Stephen Connolly
> <[hidden email]> wrote:
>> I have been working on the mock-repository-maven-plugin over at
>> mojo... but it's a side-project of one of my side-projects'
>> side-projects...
>>
>> I shall be getting back at some time in the near future.
>>
>> I would do something like a file:/// based repo for now until I can
>> get you the mock-repo plugin
>>
>> -Stephen
>>
>> On 27 June 2011 13:24, Benson Margulies<[hidden email]> wrote:
>>> There's a jira claiming that the 'don't update snapshots' flag isn't
>>> working. I thought to build a real test case; I wondered if we have
>>> anything in the way of a precedent. I need to construct a repo that
>>> claims to have a very new snapshot so that Maven will be tempted to
>>> download it. I can think of a way to set this up, but i didn't want to
>>> repeat history.
>>>
>>> ---------------------------------------------------------------------
>>> 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]>