You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ajbanck (JIRA)" <ji...@codehaus.org> on 2007/10/05 17:15:08 UTC

[jira] Created: (MRM-535) metadata-updater is changing lastUpdating timestamp when it shouldn't

metadata-updater is changing lastUpdating timestamp when it shouldn't
---------------------------------------------------------------------

                 Key: MRM-535
                 URL: http://jira.codehaus.org/browse/MRM-535
             Project: Archiva
          Issue Type: Bug
          Components: repository scanning
         Environment: JDK 1.5.0_11, Maven 2.0.7
            Reporter: ajbanck
            Priority: Minor


This is a bit of a trivial 'bug' and the result is not harmfull, but I think the metadata-updater should not change data that is valid.

As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.

During scanning, some (~200) maven-metadata.xml files are updated in my repository .
The metadata being updated is:
<?xml version="1.0" encoding="UTF-8"?><metadata>
  <groupId>com.informatica.profiling.services</groupId>
  <artifactId>profiling-model-persist</artifactId>
  <version>1.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20070213.050129</timestamp>
      <buildNumber>79</buildNumber>
    </snapshot>
    <lastUpdated>20070213050130</lastUpdated>
  </versioning>
</metadata>

After update the lastUpdated field is changed to 20070213050129:
    <lastUpdated>20070213050129</lastUpdated>

As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.

Scanlog:
2007-10-05 14:38:41,043 [pool-2-thread-1] DEBUG org.apache.maven.archiva.repository.scanner.RepositoryScanner:default  - Sending to consumer: metadata-updater
2007-10-05 14:38:41,090 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/1.0-SNAPSHOT/maven-metadata.xml
2007-10-05 14:38:46,356 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/maven-metadata.xml


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MRM-535) metadata-updater is changing lastUpdating timestamp when it shouldn't

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRM-535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MRM-535:
-----------------------------

    Fix Version/s: 1.0-beta-3

> metadata-updater is changing lastUpdating timestamp when it shouldn't
> ---------------------------------------------------------------------
>
>                 Key: MRM-535
>                 URL: http://jira.codehaus.org/browse/MRM-535
>             Project: Archiva
>          Issue Type: Bug
>          Components: repository scanning
>         Environment: JDK 1.5.0_11, Maven 2.0.7
>            Reporter: ajbanck
>            Priority: Minor
>             Fix For: 1.0-beta-3
>
>
> This is a bit of a trivial 'bug' and the result is not harmfull, but I think the metadata-updater should not change data that is valid.
> As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.
> During scanning, some (~200) maven-metadata.xml files are updated in my repository .
> The metadata being updated is:
> <?xml version="1.0" encoding="UTF-8"?><metadata>
>   <groupId>com.informatica.profiling.services</groupId>
>   <artifactId>profiling-model-persist</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <versioning>
>     <snapshot>
>       <timestamp>20070213.050129</timestamp>
>       <buildNumber>79</buildNumber>
>     </snapshot>
>     <lastUpdated>20070213050130</lastUpdated>
>   </versioning>
> </metadata>
> After update the lastUpdated field is changed to 20070213050129:
>     <lastUpdated>20070213050129</lastUpdated>
> As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.
> Scanlog:
> 2007-10-05 14:38:41,043 [pool-2-thread-1] DEBUG org.apache.maven.archiva.repository.scanner.RepositoryScanner:default  - Sending to consumer: metadata-updater
> 2007-10-05 14:38:41,090 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/1.0-SNAPSHOT/maven-metadata.xml
> 2007-10-05 14:38:46,356 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/maven-metadata.xml

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRM-535) metadata-updater is changing lastUpdating timestamp when it shouldn't

Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRM-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_109806 ] 

Joakim Erdfelt commented on MRM-535:
------------------------------------

It needs to keep up that field to date.
But going backwards on the lastUpdated field is just bad.

What is being implemented and tested on archiva/trunk right now. (project view is working, version view is not, yet)

* Never decrease the value of the lastUpdated field.

Technique
1) Read the existing metadata's lastUpdated timestamp (if it exists)
2) Iterate through the artifacts on the managed repository for their timestamps. (filename or file last modified date/time).
3) Iterate through the proxy metadata files for their lastUpdated.
4) Use the highest value found.



> metadata-updater is changing lastUpdating timestamp when it shouldn't
> ---------------------------------------------------------------------
>
>                 Key: MRM-535
>                 URL: http://jira.codehaus.org/browse/MRM-535
>             Project: Archiva
>          Issue Type: Bug
>          Components: repository scanning
>         Environment: JDK 1.5.0_11, Maven 2.0.7
>            Reporter: ajbanck
>            Assignee: Joakim Erdfelt
>            Priority: Minor
>             Fix For: 1.0-beta-3
>
>
> This is a bit of a trivial 'bug' and the result is not harmfull, but I think the metadata-updater should not change data that is valid.
> As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.
> During scanning, some (~200) maven-metadata.xml files are updated in my repository .
> The metadata being updated is:
> <?xml version="1.0" encoding="UTF-8"?><metadata>
>   <groupId>com.informatica.profiling.services</groupId>
>   <artifactId>profiling-model-persist</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <versioning>
>     <snapshot>
>       <timestamp>20070213.050129</timestamp>
>       <buildNumber>79</buildNumber>
>     </snapshot>
>     <lastUpdated>20070213050130</lastUpdated>
>   </versioning>
> </metadata>
> After update the lastUpdated field is changed to 20070213050129:
>     <lastUpdated>20070213050129</lastUpdated>
> As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.
> Scanlog:
> 2007-10-05 14:38:41,043 [pool-2-thread-1] DEBUG org.apache.maven.archiva.repository.scanner.RepositoryScanner:default  - Sending to consumer: metadata-updater
> 2007-10-05 14:38:41,090 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/1.0-SNAPSHOT/maven-metadata.xml
> 2007-10-05 14:38:46,356 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/maven-metadata.xml

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRM-535) metadata-updater is changing lastUpdating timestamp when it shouldn't

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRM-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_109858 ] 

Brett Porter commented on MRM-535:
----------------------------------

wait, I'm confused.

I don't believe the lastUpdated should reflect file timestamps at all - just using the ones from the proxied metadata (or the previous value in the file, since you can deploy directly to archiva). Highest value is right.

If a value cannot be determined, just leave it out - Maven deals fine with that case - it's only looking for a delta.

I'm not sure what you are referring to with project view / version view?

> metadata-updater is changing lastUpdating timestamp when it shouldn't
> ---------------------------------------------------------------------
>
>                 Key: MRM-535
>                 URL: http://jira.codehaus.org/browse/MRM-535
>             Project: Archiva
>          Issue Type: Bug
>          Components: repository scanning
>         Environment: JDK 1.5.0_11, Maven 2.0.7
>            Reporter: ajbanck
>            Assignee: Joakim Erdfelt
>            Priority: Minor
>             Fix For: 1.0-beta-3
>
>
> This is a bit of a trivial 'bug' and the result is not harmfull, but I think the metadata-updater should not change data that is valid.
> As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.
> During scanning, some (~200) maven-metadata.xml files are updated in my repository .
> The metadata being updated is:
> <?xml version="1.0" encoding="UTF-8"?><metadata>
>   <groupId>com.informatica.profiling.services</groupId>
>   <artifactId>profiling-model-persist</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <versioning>
>     <snapshot>
>       <timestamp>20070213.050129</timestamp>
>       <buildNumber>79</buildNumber>
>     </snapshot>
>     <lastUpdated>20070213050130</lastUpdated>
>   </versioning>
> </metadata>
> After update the lastUpdated field is changed to 20070213050129:
>     <lastUpdated>20070213050129</lastUpdated>
> As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.
> Scanlog:
> 2007-10-05 14:38:41,043 [pool-2-thread-1] DEBUG org.apache.maven.archiva.repository.scanner.RepositoryScanner:default  - Sending to consumer: metadata-updater
> 2007-10-05 14:38:41,090 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/1.0-SNAPSHOT/maven-metadata.xml
> 2007-10-05 14:38:46,356 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/maven-metadata.xml

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MRM-535) metadata-updater is changing lastUpdating timestamp when it shouldn't

Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRM-535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joakim Erdfelt closed MRM-535.
------------------------------

    Resolution: Fixed

Fixed in archiva/trunk revision 584994.

> metadata-updater is changing lastUpdating timestamp when it shouldn't
> ---------------------------------------------------------------------
>
>                 Key: MRM-535
>                 URL: http://jira.codehaus.org/browse/MRM-535
>             Project: Archiva
>          Issue Type: Bug
>          Components: repository scanning
>         Environment: JDK 1.5.0_11, Maven 2.0.7
>            Reporter: ajbanck
>            Assignee: Joakim Erdfelt
>            Priority: Minor
>             Fix For: 1.0-beta-3
>
>
> This is a bit of a trivial 'bug' and the result is not harmfull, but I think the metadata-updater should not change data that is valid.
> As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.
> During scanning, some (~200) maven-metadata.xml files are updated in my repository .
> The metadata being updated is:
> <?xml version="1.0" encoding="UTF-8"?><metadata>
>   <groupId>com.informatica.profiling.services</groupId>
>   <artifactId>profiling-model-persist</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <versioning>
>     <snapshot>
>       <timestamp>20070213.050129</timestamp>
>       <buildNumber>79</buildNumber>
>     </snapshot>
>     <lastUpdated>20070213050130</lastUpdated>
>   </versioning>
> </metadata>
> After update the lastUpdated field is changed to 20070213050129:
>     <lastUpdated>20070213050129</lastUpdated>
> As far as I could find the lastUpdated field is the timestamp on which the metadata was last updated, so should not be touched in this case.
> Scanlog:
> 2007-10-05 14:38:41,043 [pool-2-thread-1] DEBUG org.apache.maven.archiva.repository.scanner.RepositoryScanner:default  - Sending to consumer: metadata-updater
> 2007-10-05 14:38:41,090 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/1.0-SNAPSHOT/maven-metadata.xml
> 2007-10-05 14:38:46,356 [pool-2-thread-1] INFO  org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer:metadata-updater  - Updated metadata: com/xxx/profiling/services/profiling-model-persist/maven-metadata.xml

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira