@@ -70,7 +70,10 @@ public void filterAccess(@Nonnull RepoPath repoPath) {
7070 }
7171
7272 private Optional <MonitoredArtifact > resolveArtifact (RepoPath repoPath ) {
73- return artifactResolver .get (properties (repoPath ), () -> runTest (repoPath ));
73+ Optional <MonitoredArtifact > monitoredArtifact = artifactResolver .get (properties (repoPath ), () -> runTest (repoPath ));
74+ Instant lastModifiedDate = getLastModifiedDate (repoPath );
75+ monitoredArtifact .ifPresent (artifact -> artifact .setLastModifiedDate (lastModifiedDate ));
76+ return monitoredArtifact ;
7477 }
7578
7679 private ArtifactProperties properties (RepoPath repoPath ) {
@@ -98,8 +101,6 @@ private void filter(MonitoredArtifact artifact) {
98101 private @ NotNull MonitoredArtifact toMonitoredArtifact (TestResult testResult , @ NotNull RepoPath repoPath ) {
99102 Ignores ignores = Ignores .read (new RepositoryArtifactProperties (repoPath , repositories ));
100103 Instant lastModifiedDate = getLastModifiedDate (repoPath );
101-
102- LOG .debug ("Retrieved last modified date of {} for {}" , lastModifiedDate , repoPath );
103104
104105 // Only apply lastModifiedDate to packages from remote repositories.
105106 if (lastModifiedDateRemoteOnly ()) {
@@ -117,7 +118,7 @@ private Instant getLastModifiedDate(RepoPath repoPath) {
117118 ItemInfo itemInfo = repositories .getItemInfo (repoPath );
118119 if (itemInfo != null ) {
119120 Instant lastModified = Instant .ofEpochMilli (itemInfo .getLastModified ());
120- LOG .debug ("Retrieved last modifed date of {}" , lastModified . toString () );
121+ LOG .debug ("Retrieved last modified date of {} for {} " , lastModified , repoPath );
121122 return lastModified ;
122123 } else {
123124 LOG .debug ("Unable to retrieve ItemInfo for {}, could not retrieve last modified date" , repoPath );
0 commit comments