Quantcast

Mocking a repository, sort of

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Mocking a repository, sort of

Benson Margulies
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]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mocking a repository, sort of

stephenconnolly
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]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mocking a repository, sort of

Benson Margulies
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]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mocking a repository, sort of

stephenconnolly
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]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mocking a repository, sort of

Wendy Smoak
In reply to this post by Benson Margulies
On Mon, Jun 27, 2011 at 8:55 AM, Benson Margulies <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mocking a repository, sort of

Benson Margulies
In reply to this post by stephenconnolly
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
<[hidden email]> wrote:

> 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]
>
>

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mocking a repository, sort of

Benson Margulies
In reply to this post by Wendy Smoak
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 <[hidden email]> wrote:

> On Mon, Jun 27, 2011 at 8:55 AM, Benson Margulies <[hidden email]> 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: [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
|  
Report Content as Inappropriate

Re: Mocking a repository, sort of

Wendy Smoak
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.

--
Wendy

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mocking a repository, sort of

Wendy Smoak
On Mon, Jun 27, 2011 at 10:08 AM, Wendy Smoak <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mocking a repository, sort of

Tim Kettler
In reply to this post by Benson Margulies
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
> <[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]

Loading...