ljnelson commented on code in PR #104:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/104#discussion_r1161993705


##########
doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java:
##########
@@ -911,6 +924,27 @@ private File resolveSiteDescriptor(
         return siteDescriptor;
     }
 
+    // TODO Remove this transient method when everyone has migrated to Maven 
Site Plugin 4.0.0+
+    private void deletePseudoSiteDescriptorMarkerFile(RepositorySystemSession 
repoSession, ArtifactRequest request) {
+        LocalRepository localRepository = repoSession.getLocalRepository();
+        LocalRepositoryManager lrm = repoSession.getLocalRepositoryManager();
+
+        String relativeLocalArtifactPath = 
lrm.getPathForLocalArtifact(request.getArtifact());
+        Path localArtifactPath = 
localRepository.getBasedir().toPath().resolve(relativeLocalArtifactPath);
+
+        try {
+            if (Files.exists(localArtifactPath) && 
Files.size(localArtifactPath) == 0L) {
+                LOGGER.debug(
+                        "Deleting 0-byte pseudo marker file for artifact '{}' 
at '{}'",
+                        request.getArtifact(),
+                        localArtifactPath);
+                Files.delete(localArtifactPath);
+            }
+        } catch (IOException e) {
+            // swallow

Review Comment:
   Eek; at least log at debug level?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to