You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2011/06/27 14:24:12 UTC

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.

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


Re: Mocking a repository, sort of

Posted by Wendy Smoak <ws...@gmail.com>.
On Mon, Jun 27, 2011 at 10:08 AM, Wendy Smoak <ws...@gmail.com> wrote:

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

Then again, it only retrieves snapshots once a day by default, so
you'd either have to wait until tomorrow for that part of the test, or
perhaps configure that repository to 'always'.

-- 
Wendy

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


Re: Mocking a repository, sort of

Posted by Wendy Smoak <ws...@gmail.com>.
On Mon, Jun 27, 2011 at 9:44 AM, Benson Margulies <bi...@gmail.com> 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.

-- 
Wendy

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


Re: Mocking a repository, sort of

Posted by Benson Margulies <bi...@gmail.com>.
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>?

On Mon, Jun 27, 2011 at 9:08 AM, Wendy Smoak <ws...@gmail.com> wrote:
> On Mon, Jun 27, 2011 at 8:55 AM, Benson Margulies <bi...@gmail.com> wrote:
>> I'm checking into whether archiva can be launched embeddedly.
>
> Seems like overkill.  Deploying to file:// using
> -Dmaven.repo.local=/tmp/repo (to keep from updating the local repo of
> the project you are testing with) should do it.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: Mocking a repository, sort of

Posted by Wendy Smoak <ws...@gmail.com>.
On Mon, Jun 27, 2011 at 8:55 AM, Benson Margulies <bi...@gmail.com> wrote:
> I'm checking into whether archiva can be launched embeddedly.

Seems like overkill.  Deploying to file:// using
-Dmaven.repo.local=/tmp/repo (to keep from updating the local repo of
the project you are testing with) should do it.

-- 
Wendy

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


Re: Mocking a repository, sort of

Posted by Tim Kettler <ti...@udo.edu>.
The assembly-plugin can create a repository structure [1] which can then 
be used as a file:/// based repo.

[1] 
http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_repository

Am 27.06.2011 14:55, schrieb Benson Margulies:
> I'm checking into whether archiva can be launched embeddedly.
>
> On Mon, Jun 27, 2011 at 8:36 AM, Stephen Connolly
> <st...@gmail.com>  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<bi...@gmail.com>  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: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

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


Re: Mocking a repository, sort of

Posted by Benson Margulies <bi...@gmail.com>.
If the dates are all in the .xml files, that would 'serve' for this purpose.

How heavy depends on how cleverly they've provided maven plugins,
after all, on the other hand.

On Mon, Jun 27, 2011 at 9:01 AM, Stephen Connolly
<st...@gmail.com> wrote:
> Ugh! very heavyweight.... file:/// is usually sufficient
>
>
> On 27 June 2011 13:55, Benson Margulies <bi...@gmail.com> wrote:
>> I'm checking into whether archiva can be launched embeddedly.
>>
>> On Mon, Jun 27, 2011 at 8:36 AM, Stephen Connolly
>> <st...@gmail.com> 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 <bi...@gmail.com> 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: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: Mocking a repository, sort of

Posted by Stephen Connolly <st...@gmail.com>.
Ugh! very heavyweight.... file:/// is usually sufficient


On 27 June 2011 13:55, Benson Margulies <bi...@gmail.com> wrote:
> I'm checking into whether archiva can be launched embeddedly.
>
> On Mon, Jun 27, 2011 at 8:36 AM, Stephen Connolly
> <st...@gmail.com> 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 <bi...@gmail.com> 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: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: Mocking a repository, sort of

Posted by Benson Margulies <bi...@gmail.com>.
I'm checking into whether archiva can be launched embeddedly.

On Mon, Jun 27, 2011 at 8:36 AM, Stephen Connolly
<st...@gmail.com> 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 <bi...@gmail.com> 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: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: Mocking a repository, sort of

Posted by Stephen Connolly <st...@gmail.com>.
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 <bi...@gmail.com> 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: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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