You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Henri Gomez <he...@gmail.com> on 2009/11/25 14:05:09 UTC

how to preserve artifact time from repository to local repository

Hi to all,

I'm faced a weird problem.

On our nexus repository, artifacts have the correct time stamp, ie :

log4j-1.2.15.jar file is Thu Aug 30 19:41:16 CEST 2007

Same timestamp in both repo1 and our nexus repo.

When maven get the artifact from nexus to my local repository
(~m2/repository), the timestamp is not conserved, the files get the
timestamp of creation on the local repo.

It's a problem since the artifacts are after used thru JavaWebStart
and differents developpers producing the application give different
timestamp for the same artifacts ;(
Is it something we could fix with some maven configuration or should
it be requested as 'enhancement' ?

Best regards

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


Re: how to preserve artifact time from repository to local repository

Posted by Henri Gomez <he...@gmail.com>.
I was thinking more about it.

There is stable date for an artifact, ie META-INF/MANIFEST.MF inside
the jar, it should allways be the date of the artifact creation

2009/11/25 Henri Gomez <he...@gmail.com>:
> 3.0.x, good, that's the target version for us (m2eclipse users)
>
> 2009/11/25 Wayne Fay <wa...@gmail.com>:
>>> Question, If I should file it as an enhancement, it should be for :
>>> 2.1.x, 2.2.x and 3.0.x ?
>>
>> I would file for 3.0.x simply because that is where the most activity
>> is happening lately.
>>
>> But it sounds like Marat has a better suggestion, which I would pursue
>> before going down this road.
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> 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: how to preserve artifact time from repository to local repository

Posted by Henri Gomez <he...@gmail.com>.
3.0.x, good, that's the target version for us (m2eclipse users)

2009/11/25 Wayne Fay <wa...@gmail.com>:
>> Question, If I should file it as an enhancement, it should be for :
>> 2.1.x, 2.2.x and 3.0.x ?
>
> I would file for 3.0.x simply because that is where the most activity
> is happening lately.
>
> But it sounds like Marat has a better suggestion, which I would pursue
> before going down this road.
>
> Wayne
>
> ---------------------------------------------------------------------
> 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: how to preserve artifact time from repository to local repository

Posted by Wayne Fay <wa...@gmail.com>.
> Question, If I should file it as an enhancement, it should be for :
> 2.1.x, 2.2.x and 3.0.x ?

I would file for 3.0.x simply because that is where the most activity
is happening lately.

But it sounds like Marat has a better suggestion, which I would pursue
before going down this road.

Wayne

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


Re: how to preserve artifact time from repository to local repository

Posted by Henri Gomez <he...@gmail.com>.
> timestamps isn't the only versioning mechanism for java webstart. it's just
> the most fragile (as you already see) one. Why don't you use
> maven-webstart-plugin? it creates  webstart descriptor with artifact
> version-based versioning.

We allready use maven to feed the jnlp, the problem is elsewhere.
HTTP protocol used by java webstart use the If-Modified header.

And if the say, log4j-1.2.14.jar is requested and the JWS cached
version is earlier than the one in the webapp, it will be downloaded
another time even it's exactly the same, HTTP protocol use time
markers and not md5 or sha1 to difference between 2 files.



> 2009/11/25, Henri Gomez <he...@gmail.com>:
>>
>> >> When maven get the artifact from nexus to my local repository
>> >> (~m2/repository), the timestamp is not conserved, the files get the
>> >> timestamp of creation on the local repo.
>> >
>> > You are certainly welcome to file it as an enhancement, but it seems
>> > like an edge case and I doubt it will be addressed unless you are
>> > willing to do the work yourself and contribute it back...
>> >
>> > This is the only time I've ever heard of needing a particular
>> > timestamp for a given artifact. I don't personally believe in there
>> > being "one true timestamp" for a given artifact and think this should
>> > rather be handled via proper versioning.
>>
>>
>> Well it's more than needed when in some case like Java WebStart
>> applications.
>>
>> Developper Joe get log4j from the repository on monday, log4j
>> timestamp is monday locally.
>> It produce an WS application on Tuesday where log4j is timestamped as
>> monday.
>>
>> User Dan get the WS applications on Wednesday and the WS cache system
>> mark the log4j (monday).
>>
>> Developper Jill get log4j from the repository on Thursday, log4j is
>> timestamped Thursday locally.
>> It produce an WS application on Thursday where log4j is timestamped as
>> tuesday.
>>
>> Dan get back to the WS application on Friday, it's the same log4j but
>> since the WS application report it to be Thursday and its cached
>> version is earlier, it will download it another time.
>>
>> It just brake the WS/JNLP caching system and add uneeded network load.
>>
>> And if Dan is not alone, say 50 or 100 users, it became a serious
>> infrastructure problem.
>>
>> I don't know very well the wagon support but I think maven could know
>> the timestamp of the downloaded artifact ?
>> If so, it should be easy to setLastModified after download ?
>>
>> Question, If I should file it as an enhancement, it should be for :
>>
>> 2.1.x, 2.2.x and 3.0.x ?
>>
>>
>> ---------------------------------------------------------------------
>> 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: how to preserve artifact time from repository to local repository

Posted by Marat Radchenko <sl...@gmail.com>.
timestamps isn't the only versioning mechanism for java webstart. it's just
the most fragile (as you already see) one. Why don't you use
maven-webstart-plugin? it creates  webstart descriptor with artifact
version-based versioning.

2009/11/25, Henri Gomez <he...@gmail.com>:
>
> >> When maven get the artifact from nexus to my local repository
> >> (~m2/repository), the timestamp is not conserved, the files get the
> >> timestamp of creation on the local repo.
> >
> > You are certainly welcome to file it as an enhancement, but it seems
> > like an edge case and I doubt it will be addressed unless you are
> > willing to do the work yourself and contribute it back...
> >
> > This is the only time I've ever heard of needing a particular
> > timestamp for a given artifact. I don't personally believe in there
> > being "one true timestamp" for a given artifact and think this should
> > rather be handled via proper versioning.
>
>
> Well it's more than needed when in some case like Java WebStart
> applications.
>
> Developper Joe get log4j from the repository on monday, log4j
> timestamp is monday locally.
> It produce an WS application on Tuesday where log4j is timestamped as
> monday.
>
> User Dan get the WS applications on Wednesday and the WS cache system
> mark the log4j (monday).
>
> Developper Jill get log4j from the repository on Thursday, log4j is
> timestamped Thursday locally.
> It produce an WS application on Thursday where log4j is timestamped as
> tuesday.
>
> Dan get back to the WS application on Friday, it's the same log4j but
> since the WS application report it to be Thursday and its cached
> version is earlier, it will download it another time.
>
> It just brake the WS/JNLP caching system and add uneeded network load.
>
> And if Dan is not alone, say 50 or 100 users, it became a serious
> infrastructure problem.
>
> I don't know very well the wagon support but I think maven could know
> the timestamp of the downloaded artifact ?
> If so, it should be easy to setLastModified after download ?
>
> Question, If I should file it as an enhancement, it should be for :
>
> 2.1.x, 2.2.x and 3.0.x ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: how to preserve artifact time from repository to local repository

Posted by Henri Gomez <he...@gmail.com>.
>> When maven get the artifact from nexus to my local repository
>> (~m2/repository), the timestamp is not conserved, the files get the
>> timestamp of creation on the local repo.
>
> You are certainly welcome to file it as an enhancement, but it seems
> like an edge case and I doubt it will be addressed unless you are
> willing to do the work yourself and contribute it back...
>
> This is the only time I've ever heard of needing a particular
> timestamp for a given artifact. I don't personally believe in there
> being "one true timestamp" for a given artifact and think this should
> rather be handled via proper versioning.

Well it's more than needed when in some case like Java WebStart applications.

Developper Joe get log4j from the repository on monday, log4j
timestamp is monday locally.
It produce an WS application on Tuesday where log4j is timestamped as monday.

User Dan get the WS applications on Wednesday and the WS cache system
mark the log4j (monday).

Developper Jill get log4j from the repository on Thursday, log4j is
timestamped Thursday locally.
It produce an WS application on Thursday where log4j is timestamped as tuesday.

Dan get back to the WS application on Friday, it's the same log4j but
since the WS application report it to be Thursday and its cached
version is earlier, it will download it another time.

It just brake the WS/JNLP caching system and add uneeded network load.

And if Dan is not alone, say 50 or 100 users, it became a serious
infrastructure problem.

I don't know very well the wagon support but I think maven could know
the timestamp of the downloaded artifact ?
If so, it should be easy to setLastModified after download ?

Question, If I should file it as an enhancement, it should be for :

2.1.x, 2.2.x and 3.0.x ?

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


Re: how to preserve artifact time from repository to local repository

Posted by Wayne Fay <wa...@gmail.com>.
> When maven get the artifact from nexus to my local repository
> (~m2/repository), the timestamp is not conserved, the files get the
> timestamp of creation on the local repo.

You are certainly welcome to file it as an enhancement, but it seems
like an edge case and I doubt it will be addressed unless you are
willing to do the work yourself and contribute it back...

This is the only time I've ever heard of needing a particular
timestamp for a given artifact. I don't personally believe in there
being "one true timestamp" for a given artifact and think this should
rather be handled via proper versioning.

Wayne

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